diff options
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r-- | apps/s_cb.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/s_cb.c b/apps/s_cb.c index 3cfad32593..c0f089c4b4 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -603,6 +603,26 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void * } } } + +#ifndef OPENSSL_NO_HEARTBEATS + if (content_type == 24) /* Heartbeat */ + { + str_details1 = ", Heartbeat"; + + if (len > 0) + { + switch (((const unsigned char*)buf)[0]) + { + case 1: + str_details1 = ", HeartbeatRequest"; + break; + case 2: + str_details1 = ", HeartbeatResponse"; + break; + } + } + } +#endif } BIO_printf(bio, "%s %s%s [length %04lx]%s%s\n", str_write_p, str_version, str_content_type, (unsigned long)len, str_details1, str_details2); |