aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.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/s3_enc.c
parent32620fe9d15749dc35aa0c96fe38f9b431229f90 (diff)
downloadopenssl-dd7e60bd70730da4c9f8f542a6bd8951746ac2ca.tar.gz
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/s3_enc.c')
-rw-r--r--ssl/s3_enc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 196f0739d5..0282ef4620 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -730,7 +730,7 @@ int n_ssl3_mac(SSL *ssl, unsigned char *md, int send)
EVP_MD_CTX md_ctx;
const EVP_MD_CTX *hash;
unsigned char *p,rec_char;
- size_t md_size, orig_len;
+ size_t md_size;
int npad;
int t;
@@ -755,10 +755,6 @@ int n_ssl3_mac(SSL *ssl, unsigned char *md, int send)
md_size=t;
npad=(48/md_size)*md_size;
- /* kludge: ssl3_cbc_remove_padding passes padding length in rec->type */
- orig_len = rec->length+md_size+((unsigned int)rec->type>>8);
- rec->type &= 0xff;
-
if (!send &&
EVP_CIPHER_CTX_mode(ssl->enc_read_ctx) == EVP_CIPH_CBC_MODE &&
ssl3_cbc_record_digest_supported(hash))
@@ -790,7 +786,7 @@ int n_ssl3_mac(SSL *ssl, unsigned char *md, int send)
hash,
md, &md_size,
header, rec->input,
- rec->length + md_size, orig_len,
+ rec->length + md_size, rec->orig_len,
mac_sec, md_size,
1 /* is SSLv3 */);
}