aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-10-11 08:14:00 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-11 08:14:00 (GMT)
commitfaf8f2937937a19eebd43f97492b0a2f8334fa93 (patch)
tree6d75342ada7f2aaff58d97dd61476b0b60fe512b /src/crypto
parent37211e15fafb5f3eb969e8d9d9c0b4962a685a01 (diff)
downloadhostap-faf8f2937937a19eebd43f97492b0a2f8334fa93.zip
hostap-faf8f2937937a19eebd43f97492b0a2f8334fa93.tar.gz
hostap-faf8f2937937a19eebd43f97492b0a2f8334fa93.tar.bz2
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 <j@w1.fi>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/tls_openssl.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index ae92941..1d5c742 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);