ssl/[d1|s3]_pkt.c: harmomize orig_len handling.
(cherry picked from commit 8545f73b8919770a5d012fe7a82d6785b69baa27)
This commit is contained in:
parent
be125aa5ba
commit
f73546df92
@ -402,7 +402,6 @@ dtls1_process_record(SSL *s)
|
|||||||
|
|
||||||
/* decrypt in place in 'rr->input' */
|
/* decrypt in place in 'rr->input' */
|
||||||
rr->data=rr->input;
|
rr->data=rr->input;
|
||||||
orig_len=rr->length;
|
|
||||||
|
|
||||||
enc_err = s->method->ssl3_enc->enc(s,0);
|
enc_err = s->method->ssl3_enc->enc(s,0);
|
||||||
/* enc_err is:
|
/* enc_err is:
|
||||||
@ -434,6 +433,9 @@ printf("\n");
|
|||||||
mac_size=EVP_MD_CTX_size(s->read_hash);
|
mac_size=EVP_MD_CTX_size(s->read_hash);
|
||||||
OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE);
|
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
|
/* orig_len is the length of the record before any padding was
|
||||||
* removed. This is public information, as is the MAC in use,
|
* removed. This is public information, as is the MAC in use,
|
||||||
* therefore we can safely process the record in a different
|
* therefore we can safely process the record in a different
|
||||||
|
@ -397,7 +397,6 @@ fprintf(stderr, "Record type=%d, Length=%d\n", rr->type, rr->length);
|
|||||||
|
|
||||||
/* decrypt in place in 'rr->input' */
|
/* decrypt in place in 'rr->input' */
|
||||||
rr->data=rr->input;
|
rr->data=rr->input;
|
||||||
orig_len=rr->length;
|
|
||||||
|
|
||||||
enc_err = s->method->ssl3_enc->enc(s,0);
|
enc_err = s->method->ssl3_enc->enc(s,0);
|
||||||
/* enc_err is:
|
/* enc_err is:
|
||||||
@ -428,6 +427,9 @@ printf("\n");
|
|||||||
mac_size=EVP_MD_CTX_size(s->read_hash);
|
mac_size=EVP_MD_CTX_size(s->read_hash);
|
||||||
OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE);
|
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
|
/* orig_len is the length of the record before any padding was
|
||||||
* removed. This is public information, as is the MAC in use,
|
* removed. This is public information, as is the MAC in use,
|
||||||
* therefore we can safely process the record in a different
|
* therefore we can safely process the record in a different
|
||||||
|
Loading…
x
Reference in New Issue
Block a user