SSL/TLS record tracing code (backport from HEAD).

This commit is contained in:
Dr. Stephen Henson
2012-12-26 22:40:46 +00:00
parent a08f8d73cc
commit bc200e691c
14 changed files with 1460 additions and 11 deletions

View File

@@ -321,6 +321,8 @@ again:
s->rstate=SSL_ST_READ_BODY;
p=s->packet;
if (s->msg_callback)
s->msg_callback(0, 0, SSL3_RT_HEADER, p, 5, s, s->msg_callback_arg);
/* Pull apart the header into the SSL3_RECORD */
rr->type= *(p++);
@@ -822,6 +824,9 @@ static int do_ssl3_write(SSL *s, int type, const unsigned char *buf,
/* record length after mac and block padding */
s2n(wr->length,plen);
if (s->msg_callback)
s->msg_callback(1, 0, SSL3_RT_HEADER, plen - 5, 5, s, s->msg_callback_arg);
/* we should now have
* wr->data pointing to the encrypted data, which is
* wr->length long */