Permalink
Browse files

FL-300: Openssl-1.0.1e bug patch

  • Loading branch information...
Dan Molik
Dan Molik committed Apr 29, 2013
1 parent 8ad70f1 commit a1933ef013d59005f5b9ba083ec911ed9b654812
@@ -0,0 +1,21 @@
+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
+
@@ -56,6 +56,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-1.0.1-x32.patch
epatch "${FILESDIR}"/${PN}-1.0.1e-ipv6.patch
epatch "${FILESDIR}"/${PN}-clang-compat.patch
+ epatch "${FILESDIR}"/${P}-bad-mac-aes-ni.patch
epatch_user #332661
fi

0 comments on commit a1933ef

Please sign in to comment.