diff options
author | Andy Polyakov <appro@openssl.org> | 2013-02-07 22:47:05 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2013-02-08 10:40:51 +0100 |
commit | b05561c4b75f332698505b99921489d00b0a6b1e (patch) | |
tree | 5b7037f0709d3dff3434123e46ef59b04aefb437 /ssl/s3_pkt.c | |
parent | b7355af4216305d62e167bc867989192ed3465ad (diff) |
ssl/[d1|s3]_pkt.c: harmomize orig_len handling.
(cherry picked from commit 8545f73b8919770a5d012fe7a82d6785b69baa27)
Diffstat (limited to 'ssl/s3_pkt.c')
-rw-r--r-- | ssl/s3_pkt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ssl/s3_pkt.c b/ssl/s3_pkt.c index 64cef2abfa..f2c413e0ef 100644 --- a/ssl/s3_pkt.c +++ b/ssl/s3_pkt.c @@ -400,7 +400,6 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length); /* decrypt in place in 'rr->input' */ rr->data=rr->input; - orig_len=rr->length; enc_err = s->method->ssl3_enc->enc(s,0); /* enc_err is: @@ -431,6 +430,9 @@ printf("\n"); mac_size=EVP_MD_CTX_size(s->read_hash); OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE); + /* kludge: *_cbc_remove_padding passes padding length in rr->type */ + orig_len = rr->length+((unsigned int)rr->type>>8); + /* orig_len is the length of the record before any padding was * removed. This is public information, as is the MAC in use, * therefore we can safely process the record in a different |