summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_pkt.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/ssl_pkt.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/ssl_pkt.c')
-rw-r--r--src/lib/libssl/ssl_pkt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_pkt.c b/src/lib/libssl/ssl_pkt.c
index 4302794d94..0d1d4f78c7 100644
--- a/src/lib/libssl/ssl_pkt.c
+++ b/src/lib/libssl/ssl_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_pkt.c,v 1.22 2020/03/12 17:01:53 jsing Exp $ */ 1/* $OpenBSD: ssl_pkt.c,v 1.23 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 *
@@ -451,8 +451,7 @@ ssl3_get_record(SSL *s)
451 mac_size = EVP_MD_CTX_size(s->read_hash); 451 mac_size = EVP_MD_CTX_size(s->read_hash);
452 OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE); 452 OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE);
453 453
454 /* kludge: *_cbc_remove_padding passes padding length in rr->type */ 454 orig_len = rr->length + rr->padding_length;
455 orig_len = rr->length + ((unsigned int)rr->type >> 8);
456 455
457 /* orig_len is the length of the record before any padding was 456 /* orig_len is the length of the record before any padding was
458 * removed. This is public information, as is the MAC in use, 457 * removed. This is public information, as is the MAC in use,