Skip to content

Commit

Permalink
Update dtls max version
Browse files Browse the repository at this point in the history
  • Loading branch information
fwh-dc committed Oct 4, 2023
1 parent 6bd0794 commit a0c53fd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/openssl/dtls1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion ssl/ssl_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ssl/statem/statem_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
5 changes: 3 additions & 2 deletions ssl/statem/statem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1834,12 +1834,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
Expand Down

0 comments on commit a0c53fd

Please sign in to comment.