diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2012-12-26 22:40:46 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2012-12-26 22:40:46 +0000 |
commit | bc200e691cd68870c2062d3c1e74280a59aaa5ab (patch) | |
tree | 52713bc083b97da4ba573ac996b20041f614933e /ssl/s3_pkt.c | |
parent | a08f8d73ccac52dfd6e674f2d5abbe70986c7fc8 (diff) |
SSL/TLS record tracing code (backport from HEAD).
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r-- | ssl/s3_pkt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index dca345865a..4299af1e7c 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -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 */ |