Browse Source

Update dtls max version

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22275)
Frederik Wedel-Heinen 7 months ago
parent
commit
3a9148e0cd
4 changed files with 6 additions and 5 deletions
  1. 1 1
      include/openssl/dtls1.h
  2. 1 1
      ssl/ssl_local.h
  3. 1 1
      ssl/statem/statem_clnt.c
  4. 3 2
      ssl/statem/statem_lib.c

+ 1 - 1
include/openssl/dtls1.h

@@ -27,7 +27,7 @@ extern "C" {
 /* DTLS*_VERSION constants are defined in prov_ssl.h */
 # ifndef OPENSSL_NO_DEPRECATED_3_0
 #  define DTLS_MIN_VERSION                DTLS1_VERSION
-#  define DTLS_MAX_VERSION                DTLS1_2_VERSION
+#  define DTLS_MAX_VERSION                DTLS1_3_VERSION
 # endif
 # define DTLS1_VERSION_MAJOR             0xFE
 

+ 1 - 1
ssl/ssl_local.h

@@ -45,7 +45,7 @@
 # endif
 
 # define TLS_MAX_VERSION_INTERNAL TLS1_3_VERSION
-# define DTLS_MAX_VERSION_INTERNAL DTLS1_2_VERSION
+# define DTLS_MAX_VERSION_INTERNAL DTLS1_3_VERSION
 
 /*
  * DTLS version numbers are strange because they're inverted. Except for

+ 1 - 1
ssl/statem/statem_clnt.c

@@ -191,7 +191,7 @@ static int ossl_statem_client13_read_transition(SSL_CONNECTION *s, int mt)
         if (mt == SSL3_MT_CERTIFICATE_REQUEST) {
 #if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
             /* Restore digest for PHA before adding message.*/
-# error Internal DTLS version error
+# warning Internal DTLS version error
 #endif
             if (!SSL_CONNECTION_IS_DTLS(s)
                 && s->post_handshake_auth == SSL_PHA_EXT_SENT) {

+ 3 - 2
ssl/statem/statem_lib.c

@@ -1841,12 +1841,13 @@ static const version_info tls_version_table[] = {
     {0, NULL, NULL},
 };
 
-#if DTLS_MAX_VERSION_INTERNAL != DTLS1_2_VERSION
-# error Code needs update for DTLS_method() support beyond DTLS1_2_VERSION.
+#if DTLS_MAX_VERSION_INTERNAL != DTLS1_3_VERSION
+# error Code needs update for DTLS_method() support beyond DTLS1_3_VERSION.
 #endif
 
 /* Must be in order high to low */
 static const version_info dtls_version_table[] = {
+    {DTLS1_3_VERSION, dtlsv1_3_client_method, dtlsv1_3_server_method},
 #ifndef OPENSSL_NO_DTLS1_2
     {DTLS1_2_VERSION, dtlsv1_2_client_method, dtlsv1_2_server_method},
 #else