From: Andy Polyakov Date: Wed, 5 Feb 2014 15:38:22 +0000 (+0100) Subject: e_aes_cbc_hmac_sha[1|256].c: fix compiler warning. X-Git-Tag: master-pre-reformat~926 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5a42c8f07f2062b6a964bb8d38b0cfe3a8fb0775;p=openssl e_aes_cbc_hmac_sha[1|256].c: fix compiler warning. --- diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c index b14d8371c8..09f928190d 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -208,6 +208,9 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA1 *key, unsigned int frag, last, packlen, i, x4=4*n4x; size_t ret = 0; u8 *IVs; +#if defined(BSWAP8) + u64 seqnum; +#endif ctx = (SHA1_MB_CTX *)(storage+32-((size_t)storage%32)); /* align */ @@ -221,6 +224,10 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA1 *key, hash_d[0].ptr = inp; for (i=1;imd.data,8); + seqnum = BSWAP8(blocks[0].q[0]); +#endif for (i=0;imd.data)+i); + blocks[i].q[0] = BSWAP8(seqnum+i); #else blocks[i].c[7] += ((u8*)key->md.data)[7]+i; if (blocks[i].c[7] < i) { diff --git a/crypto/evp/e_aes_cbc_hmac_sha256.c b/crypto/evp/e_aes_cbc_hmac_sha256.c index 01823d201e..95bdd42b13 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha256.c +++ b/crypto/evp/e_aes_cbc_hmac_sha256.c @@ -204,6 +204,9 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA256 *key, unsigned int frag, last, packlen, i, x4=4*n4x; size_t ret = 0; u8 *IVs; +#if defined(BSWAP8) + u64 seqnum; +#endif ctx = (SHA256_MB_CTX *)(storage+32-((size_t)storage%32)); /* align */ @@ -217,6 +220,10 @@ static size_t tls1_1_multi_block_encrypt(EVP_AES_HMAC_SHA256 *key, hash_d[0].ptr = inp; for (i=1;imd.data,8); + seqnum = BSWAP8(blocks[0].q[0]); +#endif for (i=0;imd.data)+i); + blocks[i].q[0] = BSWAP8(seqnum+i); #else blocks[i].c[7] += ((u8*)key->md.data)[7]+i; if (blocks[i].c[7] < i) {