summaryrefslogtreecommitdiff
path: root/src/lib/libssl/d1_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/d1_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/d1_pkt.c')
-rw-r--r--src/lib/libssl/d1_pkt.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c
index 31415b7c3a..524cfc3351 100644
--- a/src/lib/libssl/d1_pkt.c
+++ b/src/lib/libssl/d1_pkt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: d1_pkt.c,v 1.71 2020/03/12 17:01:53 jsing Exp $ */ 1/* $OpenBSD: d1_pkt.c,v 1.72 2020/03/12 17:09:02 jsing Exp $ */
2/* 2/*
3 * DTLS implementation written by Nagendra Modadugu 3 * DTLS implementation written by Nagendra Modadugu
4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. 4 * (nagendra@cs.stanford.edu) for the OpenSSL project 2005.
@@ -380,8 +380,7 @@ dtls1_process_record(SSL *s)
380 mac_size = EVP_MD_CTX_size(s->read_hash); 380 mac_size = EVP_MD_CTX_size(s->read_hash);
381 OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE); 381 OPENSSL_assert(mac_size <= EVP_MAX_MD_SIZE);
382 382
383 /* kludge: *_cbc_remove_padding passes padding length in rr->type */ 383 orig_len = rr->length + rr->padding_length;
384 orig_len = rr->length + ((unsigned int)rr->type >> 8);
385 384
386 /* orig_len is the length of the record before any padding was 385 /* orig_len is the length of the record before any padding was
387 * removed. This is public information, as is the MAC in use, 386 * removed. This is public information, as is the MAC in use,