|
@@ -883,7 +883,7 @@ static int safexcel_hmac_sha1_setkey(struct crypto_ahash *tfm, const u8 *key,
|
|
if (ret)
|
|
if (ret)
|
|
return ret;
|
|
return ret;
|
|
|
|
|
|
- for (i = 0; i < ARRAY_SIZE(istate.state); i++) {
|
|
|
|
|
|
+ for (i = 0; i < SHA1_DIGEST_SIZE / sizeof(u32); i++) {
|
|
if (ctx->ipad[i] != le32_to_cpu(istate.state[i]) ||
|
|
if (ctx->ipad[i] != le32_to_cpu(istate.state[i]) ||
|
|
ctx->opad[i] != le32_to_cpu(ostate.state[i])) {
|
|
ctx->opad[i] != le32_to_cpu(ostate.state[i])) {
|
|
ctx->base.needs_inv = true;
|
|
ctx->base.needs_inv = true;
|