From: Frederik Wedel-Heinen Date: Mon, 16 Oct 2023 07:57:00 +0000 (+0200) Subject: Fix session print for dtls1.3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61039932505414bbef6947b5b97ecd42ff046b31;p=thirdparty%2Fopenssl.git Fix session print for dtls1.3 Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/22936) --- diff --git a/ssl/ssl_txt.c b/ssl/ssl_txt.c index d928cb9bbd6..7f7af8a53a2 100644 --- a/ssl/ssl_txt.c +++ b/ssl/ssl_txt.c @@ -35,11 +35,12 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) { size_t i; const char *s; - int istls13; + int isversion13; if (x == NULL) goto err; - istls13 = (x->ssl_version == TLS1_3_VERSION); + isversion13 = (x->ssl_version == TLS1_3_VERSION) + || (x->ssl_version == DTLS1_3_VERSION); if (BIO_puts(bp, "SSL-Session:\n") <= 0) goto err; s = ssl_protocol_to_string(x->ssl_version); @@ -74,7 +75,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) if (BIO_printf(bp, "%02X", x->sid_ctx[i]) <= 0) goto err; } - if (istls13) { + if (isversion13) { if (BIO_puts(bp, "\n Resumption PSK: ") <= 0) goto err; } else if (BIO_puts(bp, "\n Master-Key: ") <= 0) @@ -153,7 +154,7 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) x->flags & SSL_SESS_FLAG_EXTMS ? "yes" : "no") <= 0) goto err; - if (istls13) { + if (isversion13) { if (BIO_printf(bp, " Max Early Data: %u\n", (unsigned int)x->ext.max_early_data) <= 0) goto err;