summaryrefslogtreecommitdiffstats
path: root/ssl/d1_pkt.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2013-02-08 10:20:48 +0100
committerAndy Polyakov <appro@openssl.org>2013-02-08 10:20:48 +0100
commitdd7e60bd70730da4c9f8f542a6bd8951746ac2ca (patch)
tree8d78bd05712c52527f1552f2bb9ce8de53308888 /ssl/d1_pkt.c
parent32620fe9d15749dc35aa0c96fe38f9b431229f90 (diff)
ssl/*: revert "remove SSL_RECORD->orig_len" and merge "fix IV".
Revert is appropriate because binary compatibility is not an issue in 1.1.
Diffstat (limited to 'ssl/d1_pkt.c')
-rw-r--r--ssl/d1_pkt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index 0ad8b5f559..02c881ab31 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -379,7 +379,7 @@ dtls1_process_record(SSL *s)
int enc_err;
SSL_SESSION *sess;
SSL3_RECORD *rr;
- unsigned int mac_size, orig_len;
+ unsigned int mac_size;
unsigned char md[EVP_MAX_MD_SIZE];
rr= &(s->s3->rrec);
@@ -410,7 +410,7 @@ dtls1_process_record(SSL *s)
/* decrypt in place in 'rr->input' */
rr->data=rr->input;
- orig_len=rr->length;
+ rr->orig_len=rr->length;
enc_err = s->method->ssl3_enc->enc(s,0);
/* enc_err is:
@@ -447,10 +447,10 @@ printf("\n");
* therefore we can safely process the record in a different
* amount of time if it's too short to possibly contain a MAC.
*/
- if (orig_len < mac_size ||
+ if (rr->orig_len < mac_size ||
/* CBC records must have a padding length byte too. */
(EVP_CIPHER_CTX_mode(s->enc_read_ctx) == EVP_CIPH_CBC_MODE &&
- orig_len < mac_size+1))
+ rr->orig_len < mac_size+1))
{
al=SSL_AD_DECODE_ERROR;
SSLerr(SSL_F_SSL3_GET_RECORD,SSL_R_LENGTH_TOO_SHORT);
@@ -465,12 +465,12 @@ printf("\n");
* without leaking the contents of the padding bytes.
* */
mac = mac_tmp;
- ssl3_cbc_copy_mac(mac_tmp, rr, mac_size, orig_len);
+ ssl3_cbc_copy_mac(mac_tmp, rr, mac_size);
rr->length -= mac_size;
}
else
{
- /* In this case there's no padding, so |orig_len|
+ /* In this case there's no padding, so |rec->orig_len|
* equals |rec->length| and we checked that there's
* enough bytes for |mac_size| above. */
rr->length -= mac_size;