aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/ccm.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/ccm.c')
-rw-r--r--crypto/ccm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ccm.c b/crypto/ccm.c
index 499c91717d93..3e05499d183a 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -363,7 +363,7 @@ static void crypto_ccm_decrypt_done(struct crypto_async_request *areq,
363 363
364 if (!err) { 364 if (!err) {
365 err = crypto_ccm_auth(req, req->dst, cryptlen); 365 err = crypto_ccm_auth(req, req->dst, cryptlen);
366 if (!err && memcmp(pctx->auth_tag, pctx->odata, authsize)) 366 if (!err && crypto_memneq(pctx->auth_tag, pctx->odata, authsize))
367 err = -EBADMSG; 367 err = -EBADMSG;
368 } 368 }
369 aead_request_complete(req, err); 369 aead_request_complete(req, err);
@@ -422,7 +422,7 @@ static int crypto_ccm_decrypt(struct aead_request *req)
422 return err; 422 return err;
423 423
424 /* verify */ 424 /* verify */
425 if (memcmp(authtag, odata, authsize)) 425 if (crypto_memneq(authtag, odata, authsize))
426 return -EBADMSG; 426 return -EBADMSG;
427 427
428 return err; 428 return err;