summaryrefslogtreecommitdiffstats
path: root/crypto/evp/e_aes_cbc_hmac_sha1.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-07-17 17:55:32 +0200
committerMatt Caswell <matt@openssl.org>2017-07-19 12:49:08 +0200
commitd5475e319575a45b20f560bdfae56cbfb165cb01 (patch)
tree18c68fe2798792743437157f93ff58cdd9f57124 /crypto/evp/e_aes_cbc_hmac_sha1.c
parentFix undefined behaviour in e_aes_cbc_hmac_sha256.c and e_aes_cbc_hmac_sha1.c (diff)
downloadopenssl-d5475e319575a45b20f560bdfae56cbfb165cb01.tar.xz
openssl-d5475e319575a45b20f560bdfae56cbfb165cb01.zip
Remove some dead code
The intention of the removed code was to check if the previous operation carried. However this does not work. The "mask" value always ends up being a constant and is all ones - thus it has no effect. This check is no longer required because of the previous commit. Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3832)
Diffstat (limited to 'crypto/evp/e_aes_cbc_hmac_sha1.c')
-rw-r--r--crypto/evp/e_aes_cbc_hmac_sha1.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c
index 65f13c2c61..09d24dc3d0 100644
--- a/crypto/evp/e_aes_cbc_hmac_sha1.c
+++ b/crypto/evp/e_aes_cbc_hmac_sha1.c
@@ -539,9 +539,6 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
pad = constant_time_select(mask, pad, maxpad);
inp_len = len - (SHA_DIGEST_LENGTH + pad + 1);
- mask = (0 - ((inp_len - len) >> (sizeof(inp_len) * 8 - 1)));
- inp_len &= mask;
- ret &= (int)mask;
key->aux.tls_aad[plen - 2] = inp_len >> 8;
key->aux.tls_aad[plen - 1] = inp_len;