From: Frederik Wedel-Heinen Date: Fri, 13 Oct 2023 10:21:47 +0000 (+0200) Subject: Correct traces for certificates in dtls13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f4e2b3890615a9be67bddc10ca75dd581aeffe8;p=thirdparty%2Fopenssl.git Correct traces for certificates in dtls13 Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/22935) --- diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c index 87a16f36983..35e8ede063d 100644 --- a/ssl/t1_trce.c +++ b/ssl/t1_trce.c @@ -1351,7 +1351,7 @@ static int ssl_print_certificates(BIO *bio, const SSL_CONNECTION *sc, int server { size_t clen; - if (SSL_CONNECTION_IS_TLS13(sc) + if (SSL_CONNECTION_IS_VERSION13(sc) && !ssl_print_hexbuf(bio, indent, "context", 1, &msg, &msglen)) return 0; @@ -1365,7 +1365,7 @@ static int ssl_print_certificates(BIO *bio, const SSL_CONNECTION *sc, int server || (!server && sc->ext.client_cert_type == TLSEXT_cert_type_rpk)) { if (!ssl_print_raw_public_key(bio, &sc->ssl, server, indent, &msg, &clen)) return 0; - if (SSL_CONNECTION_IS_TLS13(sc) + if (SSL_CONNECTION_IS_VERSION13(sc) && !ssl_print_extensions(bio, indent + 2, server, SSL3_MT_CERTIFICATE, &msg, &clen)) return 0; @@ -1376,7 +1376,7 @@ static int ssl_print_certificates(BIO *bio, const SSL_CONNECTION *sc, int server while (clen > 0) { if (!ssl_print_certificate(bio, sc, indent + 2, &msg, &clen)) return 0; - if (SSL_CONNECTION_IS_TLS13(sc) + if (SSL_CONNECTION_IS_VERSION13(sc) && !ssl_print_extensions(bio, indent + 2, server, SSL3_MT_CERTIFICATE, &msg, &clen)) return 0; @@ -1462,7 +1462,7 @@ static int ssl_print_cert_request(BIO *bio, int indent, const SSL_CONNECTION *sc size_t xlen; unsigned int sigalg; - if (SSL_CONNECTION_IS_TLS13(sc)) { + if (SSL_CONNECTION_IS_VERSION13(sc)) { if (!ssl_print_hexbuf(bio, indent, "request_context", 1, &msg, &msglen)) return 0; if (!ssl_print_extensions(bio, indent, 1, @@ -1537,7 +1537,7 @@ static int ssl_print_cert_request(BIO *bio, int indent, const SSL_CONNECTION *sc xlen -= dlen + 2; msg += dlen; } - if (SSL_CONNECTION_IS_TLS13(sc)) { + if (SSL_CONNECTION_IS_VERSION13(sc)) { if (!ssl_print_hexbuf(bio, indent, "request_extensions", 2, &msg, &msglen)) return 0;