summaryrefslogtreecommitdiff
path: root/src/lib/libssl/t1_enc.c
diff options
context:
space:
mode:
authorjsing <>2020-03-12 17:09:02 +0000
committerjsing <>2020-03-12 17:09:02 +0000
commit8a5e591492888ac3f5e804aaef546ffe93f39818 (patch)
tree61a0513c2ec7ebe3d441481d66f9efe8b9bba584 /src/lib/libssl/t1_enc.c
parentcf38ddcaf43a2f6fd1de2405aa74feca6523733c (diff)
downloadopenbsd-8a5e591492888ac3f5e804aaef546ffe93f39818.tar.gz
openbsd-8a5e591492888ac3f5e804aaef546ffe93f39818.tar.bz2
openbsd-8a5e591492888ac3f5e804aaef546ffe93f39818.zip
Stop overloading the record type for padding length.
Currently the CBC related code stuffs the padding length in the upper bits of the type field... stop doing that and add a padding_length field to the record struct instead. ok inoguchi@ tb@
Diffstat (limited to 'src/lib/libssl/t1_enc.c')
-rw-r--r--src/lib/libssl/t1_enc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libssl/t1_enc.c b/src/lib/libssl/t1_enc.c
index b399f2bd3c..347d34d455 100644
--- a/src/lib/libssl/t1_enc.c
+++ b/src/lib/libssl/t1_enc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: t1_enc.c,v 1.119 2020/03/12 17:01:53 jsing Exp $ */ 1/* $OpenBSD: t1_enc.c,v 1.120 2020/03/12 17:09:02 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -971,9 +971,7 @@ tls1_mac(SSL *ssl, unsigned char *md, int send)
971 else 971 else
972 memcpy(header, seq, SSL3_SEQUENCE_SIZE); 972 memcpy(header, seq, SSL3_SEQUENCE_SIZE);
973 973
974 /* kludge: tls1_cbc_remove_padding passes padding length in rec->type */ 974 orig_len = rec->length + md_size + rec->padding_length;
975 orig_len = rec->length + md_size + ((unsigned int)rec->type >> 8);
976 rec->type &= 0xff;
977 975
978 header[8] = rec->type; 976 header[8] = rec->type;
979 header[9] = (unsigned char)(ssl->version >> 8); 977 header[9] = (unsigned char)(ssl->version >> 8);