From: Jouni Malinen Date: Sun, 11 Oct 2015 08:14:00 +0000 (+0300) Subject: OpenSSL: Recognize special write_p == 2 in msg_callback X-Git-Tag: hostap_2_6~1548 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=faf8f2937937a19eebd43f97492b0a2f8334fa93;p=thirdparty%2Fhostap.git OpenSSL: Recognize special write_p == 2 in msg_callback OpenSSL could use this to identify crypto tracing values if built with OPENSSL_SSL_TRACE_CRYPTO. Signed-off-by: Jouni Malinen --- diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index ae929419e..1d5c742ef 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -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);