]> granicus.if.org Git - curl/commitdiff
openssl: fix debug messages
authorDaniel Jelinski <djelinski1@gmail.com>
Mon, 6 Aug 2018 21:35:33 +0000 (23:35 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 9 Aug 2018 10:31:24 +0000 (12:31 +0200)
Fixes #2806
Closes #2843

lib/vtls/openssl.c

index 9ce1ae5ab5e6da9936c87482b716cc56bd23c58f..f747db9ac9b50913f84edced27341e8eef6fcf97 100644 (file)
@@ -1974,7 +1974,15 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
     }
     else
 #endif
-    {
+    if(content_type == SSL3_RT_CHANGE_CIPHER_SPEC) {
+      msg_type = *(char *)buf;
+      msg_name = "Change cipher spec";
+    }
+    else if(content_type == SSL3_RT_ALERT) {
+      msg_type = (((char *)buf)[0] << 8) + ((char *)buf)[1];
+      msg_name = SSL_alert_desc_string_long(msg_type);
+    }
+    else {
       msg_type = *(char *)buf;
       msg_name = ssl_msg_type(ssl_ver, msg_type);
     }