diff options
Diffstat (limited to 'crypto/authenc.c')
-rw-r--r-- | crypto/authenc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c index ffce19de05cf..2b3f4abda929 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c | |||
@@ -188,7 +188,7 @@ static void authenc_verify_ahash_update_done(struct crypto_async_request *areq, | |||
188 | scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen, | 188 | scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen, |
189 | authsize, 0); | 189 | authsize, 0); |
190 | 190 | ||
191 | err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG : 0; | 191 | err = crypto_memneq(ihash, ahreq->result, authsize) ? -EBADMSG : 0; |
192 | if (err) | 192 | if (err) |
193 | goto out; | 193 | goto out; |
194 | 194 | ||
@@ -227,7 +227,7 @@ static void authenc_verify_ahash_done(struct crypto_async_request *areq, | |||
227 | scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen, | 227 | scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen, |
228 | authsize, 0); | 228 | authsize, 0); |
229 | 229 | ||
230 | err = memcmp(ihash, ahreq->result, authsize) ? -EBADMSG : 0; | 230 | err = crypto_memneq(ihash, ahreq->result, authsize) ? -EBADMSG : 0; |
231 | if (err) | 231 | if (err) |
232 | goto out; | 232 | goto out; |
233 | 233 | ||
@@ -462,7 +462,7 @@ static int crypto_authenc_verify(struct aead_request *req, | |||
462 | ihash = ohash + authsize; | 462 | ihash = ohash + authsize; |
463 | scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen, | 463 | scatterwalk_map_and_copy(ihash, areq_ctx->sg, areq_ctx->cryptlen, |
464 | authsize, 0); | 464 | authsize, 0); |
465 | return memcmp(ihash, ohash, authsize) ? -EBADMSG : 0; | 465 | return crypto_memneq(ihash, ohash, authsize) ? -EBADMSG : 0; |
466 | } | 466 | } |
467 | 467 | ||
468 | static int crypto_authenc_iverify(struct aead_request *req, u8 *iv, | 468 | static int crypto_authenc_iverify(struct aead_request *req, u8 *iv, |