OpenSSL: Parse msg_callback inner content type into debug messages

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2019-07-12 22:42:13 +03:00
parent 8b57a37808
commit 0ef509f15e

View file

@ -1335,6 +1335,8 @@ static const char * openssl_content_type(int content_type)
return "heartbeat"; return "heartbeat";
case 256: case 256:
return "TLS header info"; /* pseudo content type */ return "TLS header info"; /* pseudo content type */
case 257:
return "inner content type"; /* pseudo content type */
default: default:
return "?"; return "?";
} }
@ -1344,6 +1346,8 @@ static const char * openssl_content_type(int content_type)
static const char * openssl_handshake_type(int content_type, const u8 *buf, static const char * openssl_handshake_type(int content_type, const u8 *buf,
size_t len) size_t len)
{ {
if (content_type == 257 && buf && len == 1)
return openssl_content_type(buf[0]);
if (content_type != 22 || !buf || len == 0) if (content_type != 22 || !buf || len == 0)
return ""; return "";
switch (buf[0]) { switch (buf[0]) {