summaryrefslogtreecommitdiff
path: root/dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch
diff options
context:
space:
mode:
authorBlackNoxis <steven.darklight@gmail.com>2014-11-07 12:54:17 +0200
committerBlackNoxis <steven.darklight@gmail.com>2014-11-07 12:54:17 +0200
commit5a01792340999d37435f5000a3f6b8e0f2d11815 (patch)
tree4bcca1f73cc4ab721b3c31ea81585917f909ebc7 /dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch
parent86c8d1f28bd2b785ccbb28f41c4e0763d062ba2f (diff)
Added the full elimination of sabayon-version
Diffstat (limited to 'dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch')
-rw-r--r--dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch b/dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch
new file mode 100644
index 00000000..4422a62c
--- /dev/null
+++ b/dev-libs/openssl/files/openssl-1.0.1e-bad-mac-aes-ni.patch
@@ -0,0 +1,35 @@
+https://bugs.gentoo.org/463444
+
+From 9ab3ce124616cb12bd39c6aa1e1bde0f46969b29 Mon Sep 17 00:00:00 2001
+From: Andy Polyakov <appro@openssl.org>
+Date: Mon, 18 Mar 2013 19:29:41 +0100
+Subject: [PATCH] e_aes_cbc_hmac_sha1.c: fix rare bad record mac on AES-NI
+ plaforms.
+
+PR: 3002
+(cherry picked from commit 5c60046553716fcf160718f59160493194f212dc)
+---
+ crypto/evp/e_aes_cbc_hmac_sha1.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c
+index 483e04b..fb2c884 100644
+--- a/crypto/evp/e_aes_cbc_hmac_sha1.c
++++ b/crypto/evp/e_aes_cbc_hmac_sha1.c
+@@ -328,10 +328,11 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
+
+ if (res!=SHA_CBLOCK) continue;
+
+- mask = 0-((inp_len+8-j)>>(sizeof(j)*8-1));
++ /* j is not incremented yet */
++ mask = 0-((inp_len+7-j)>>(sizeof(j)*8-1));
+ data->u[SHA_LBLOCK-1] |= bitlen&mask;
+ sha1_block_data_order(&key->md,data,1);
+- mask &= 0-((j-inp_len-73)>>(sizeof(j)*8-1));
++ mask &= 0-((j-inp_len-72)>>(sizeof(j)*8-1));
+ pmac->u[0] |= key->md.h0 & mask;
+ pmac->u[1] |= key->md.h1 & mask;
+ pmac->u[2] |= key->md.h2 & mask;
+--
+1.8.2.1
+