summaryrefslogtreecommitdiffstats
path: root/lib/libssl/t1_enc.c
diff options
context:
space:
mode:
authorbcook <bcook@openbsd.org>2019-05-13 22:48:30 +0000
committerbcook <bcook@openbsd.org>2019-05-13 22:48:30 +0000
commit0e3e32e80cf4120682c366613fa642a97de6972e (patch)
tree0f50c39e4b2c7533a2e6c9132ce66db7c6b9442f /lib/libssl/t1_enc.c
parentAcquire mutex before incrementing the refcount. Fixes COV-186144 (diff)
downloadwireguard-openbsd-0e3e32e80cf4120682c366613fa642a97de6972e.tar.xz
wireguard-openbsd-0e3e32e80cf4120682c366613fa642a97de6972e.zip
Remove unused pad check, which is handled by tls1_cbc_remove_padding() now.
Fixes COV-174858 ok tb@
Diffstat (limited to 'lib/libssl/t1_enc.c')
-rw-r--r--lib/libssl/t1_enc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/libssl/t1_enc.c b/lib/libssl/t1_enc.c
index 79a5bdd2b37..1eaa0873832 100644
--- a/lib/libssl/t1_enc.c
+++ b/lib/libssl/t1_enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: t1_enc.c,v 1.117 2019/02/09 15:26:15 jsing Exp $ */
+/* $OpenBSD: t1_enc.c,v 1.118 2019/05/13 22:48:30 bcook Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -671,7 +671,7 @@ tls1_enc(SSL *s, int send)
SSL3_RECORD *rec;
unsigned char *seq;
unsigned long l;
- int bs, i, j, k, pad = 0, ret, mac_size = 0;
+ int bs, i, j, k, ret, mac_size = 0;
if (send) {
aead = s->internal->aead_write_ctx;
@@ -904,8 +904,6 @@ tls1_enc(SSL *s, int send)
mac_size = EVP_MD_CTX_size(s->read_hash);
if ((bs != 1) && !send)
ret = tls1_cbc_remove_padding(s, rec, bs, mac_size);
- if (pad && !send)
- rec->length -= pad;
}
return ret;
}