]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
OpenSSL: Recognize special write_p == 2 in msg_callback
authorJouni Malinen <j@w1.fi>
Sun, 11 Oct 2015 08:14:00 +0000 (11:14 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Oct 2015 08:14:00 +0000 (11:14 +0300)
OpenSSL could use this to identify crypto tracing values if built with
OPENSSL_SSL_TRACE_CRYPTO.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/tls_openssl.c

index ae929419ec07b7910c1ff157f85037f0358122ec..1d5c742ef0c3ad2de7132fe0770e253da79678f3 100644 (file)
@@ -1132,6 +1132,14 @@ static void tls_msg_cb(int write_p, int version, int content_type,
        struct tls_connection *conn = arg;
        const u8 *pos = buf;
 
+       if (write_p == 2) {
+               wpa_printf(MSG_DEBUG,
+                          "OpenSSL: session ver=0x%x content_type=%d",
+                          version, content_type);
+               wpa_hexdump_key(MSG_MSGDUMP, "OpenSSL: Data", buf, len);
+               return;
+       }
+
        wpa_printf(MSG_DEBUG, "OpenSSL: %s ver=0x%x content_type=%d",
                   write_p ? "TX" : "RX", version, content_type);
        wpa_hexdump_key(MSG_MSGDUMP, "OpenSSL: Message", buf, len);