OpenSSL 1.1.1-pre2
This commit is contained in:
@@ -570,7 +570,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
}
|
||||
# endif
|
||||
|
||||
# if 1
|
||||
# if 1 /* see original reference version in #else */
|
||||
len -= SHA_DIGEST_LENGTH; /* amend mac */
|
||||
if (len >= (256 + SHA_CBLOCK)) {
|
||||
j = (len - (256 + SHA_CBLOCK)) & (0 - SHA_CBLOCK);
|
||||
@@ -664,7 +664,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
}
|
||||
# endif
|
||||
len += SHA_DIGEST_LENGTH;
|
||||
# else
|
||||
# else /* pre-lucky-13 reference version of above */
|
||||
SHA1_Update(&key->md, out, inp_len);
|
||||
res = key->md.num;
|
||||
SHA1_Final(pmac->c, &key->md);
|
||||
@@ -691,7 +691,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
/* verify HMAC */
|
||||
out += inp_len;
|
||||
len -= inp_len;
|
||||
# if 1
|
||||
# if 1 /* see original reference version in #else */
|
||||
{
|
||||
unsigned char *p = out + len - 1 - maxpad - SHA_DIGEST_LENGTH;
|
||||
size_t off = out - p;
|
||||
@@ -713,7 +713,7 @@ static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
|
||||
res = 0 - ((0 - res) >> (sizeof(res) * 8 - 1));
|
||||
ret &= (int)~res;
|
||||
}
|
||||
# else
|
||||
# else /* pre-lucky-13 reference version of above */
|
||||
for (res = 0, i = 0; i < SHA_DIGEST_LENGTH; i++)
|
||||
res |= out[i] ^ pmac->c[i];
|
||||
res = 0 - ((0 - res) >> (sizeof(res) * 8 - 1));
|
||||
|
||||
Reference in New Issue
Block a user