]> git.pld-linux.org Git - packages/openssl.git/blob - aesni-mac.patch
- rel 2; add debian fixes
[packages/openssl.git] / aesni-mac.patch
1 From: Andy Polyakov <appro@openssl.org>
2 Date: Mon, 18 Mar 2013 19:29:41 +0100
3 Subject: e_aes_cbc_hmac_sha1.c: fix rare bad record mac on AES-NI plaforms.
4 Origin: upstream: http://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff_plain;h=9ab3ce124616cb12bd39c6aa1e1bde0f46969b29
5 Bug-Debian: http://bugs.debian.org/701868
6 Bug: http://rt.openssl.org/Ticket/Display.html?id=3002&user=guest&pass=guest
7
8 diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c
9 index 483e04b..fb2c884 100644
10 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c
11 +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c
12 @@ -328,10 +328,11 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
13  
14                                 if (res!=SHA_CBLOCK) continue;
15  
16 -                               mask = 0-((inp_len+8-j)>>(sizeof(j)*8-1));
17 +                               /* j is not incremented yet */
18 +                               mask = 0-((inp_len+7-j)>>(sizeof(j)*8-1));
19                                 data->u[SHA_LBLOCK-1] |= bitlen&mask;
20                                 sha1_block_data_order(&key->md,data,1);
21 -                               mask &= 0-((j-inp_len-73)>>(sizeof(j)*8-1));
22 +                               mask &= 0-((j-inp_len-72)>>(sizeof(j)*8-1));
23                                 pmac->u[0] |= key->md.h0 & mask;
24                                 pmac->u[1] |= key->md.h1 & mask;
25                                 pmac->u[2] |= key->md.h2 & mask;
26
This page took 0.02278 seconds and 3 git commands to generate.