Do not print extensions in Certificate message for TLS1.2 and lower
[openssl.git] / ssl / t1_trce.c
index a2cb4f7385aa897d85cefe8513565f74d485ffa8..c55c172b88b1cc2117d8890159493176d766d31b 100644 (file)
@@ -1242,8 +1242,9 @@ static int ssl_print_certificates(BIO *bio, const SSL *ssl, int server,
     while (clen > 0) {
         if (!ssl_print_certificate(bio, indent + 2, &msg, &clen))
             return 0;
-        if (!ssl_print_extensions(bio, indent + 2, server, SSL3_MT_CERTIFICATE,
-                                  &msg, &clen))
+        if (SSL_IS_TLS13(ssl)
+            && !ssl_print_extensions(bio, indent + 2, server,
+                                     SSL3_MT_CERTIFICATE, &msg, &clen))
             return 0;
 
     }