diff options
author | jsing <jsing@openbsd.org> | 2020-03-12 17:09:02 +0000 |
---|---|---|
committer | jsing <jsing@openbsd.org> | 2020-03-12 17:09:02 +0000 |
commit | 6a588c51e9c9755abee8a26baecd87dabc68f91d (patch) | |
tree | 748f7b463648e955cff77ac53aad242c508a1132 /lib/libssl/t1_enc.c | |
parent | Use internal versions of SSL3_BUFFER, SSL3_RECORD and DTLS1_RECORD_DATA. (diff) | |
download | wireguard-openbsd-6a588c51e9c9755abee8a26baecd87dabc68f91d.tar.xz wireguard-openbsd-6a588c51e9c9755abee8a26baecd87dabc68f91d.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 'lib/libssl/t1_enc.c')
-rw-r--r-- | lib/libssl/t1_enc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c index b399f2bd3ce..347d34d4550 100644 --- a/lib/libssl/t1_enc.c +++ b/lib/libssl/t1_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t1_enc.c,v 1.119 2020/03/12 17:01:53 jsing Exp $ */ +/* $OpenBSD: t1_enc.c,v 1.120 2020/03/12 17:09:02 jsing Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -971,9 +971,7 @@ tls1_mac(SSL *ssl, unsigned char *md, int send) else memcpy(header, seq, SSL3_SEQUENCE_SIZE); - /* kludge: tls1_cbc_remove_padding passes padding length in rec->type */ - orig_len = rec->length + md_size + ((unsigned int)rec->type >> 8); - rec->type &= 0xff; + orig_len = rec->length + md_size + rec->padding_length; header[8] = rec->type; header[9] = (unsigned char)(ssl->version >> 8); |