diff options
author | Matt Caswell <matt@openssl.org> | 2017-07-17 16:55:32 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-07-19 13:33:34 +0100 |
commit | e3d1a4e56572c71db5f297a50b8aa97bd7b39d3a (patch) | |
tree | e9c05e560dd0ce6f4929e943239193bda029e0a6 | |
parent | ec642d5aaaea85ac84597dc8ee56afb2114b6eda (diff) |
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)
(cherry picked from commit d5475e319575a45b20f560bdfae56cbfb165cb01)
-rw-r--r-- | crypto/evp/e_aes_cbc_hmac_sha1.c | 3 | ||||
-rw-r--r-- | crypto/evp/e_aes_cbc_hmac_sha256.c | 3 |
2 files changed, 0 insertions, 6 deletions
diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c index c798270bd2..b25fc6d541 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -590,9 +590,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; diff --git a/crypto/evp/e_aes_cbc_hmac_sha256.c b/crypto/evp/e_aes_cbc_hmac_sha256.c index 2d06c49dd8..aaa724a2d6 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha256.c +++ b/crypto/evp/e_aes_cbc_hmac_sha256.c @@ -601,9 +601,6 @@ static int aesni_cbc_hmac_sha256_cipher(EVP_CIPHER_CTX *ctx, pad = constant_time_select(mask, pad, maxpad); inp_len = len - (SHA256_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; |