X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=crypto%2Fccm.c;h=3e05499d183aa8e49d41b83be448e7f52d76b10c;hb=62f5694343e6f6389d37e410178936186346ebbd;hp=499c91717d937bfaba9364a5bcde94988626195c;hpb=75fcf64dc7180a6258dbefd671edb9d86a38d22f;p=karo-tx-linux.git 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, if (!err) { err = crypto_ccm_auth(req, req->dst, cryptlen); - if (!err && memcmp(pctx->auth_tag, pctx->odata, authsize)) + if (!err && crypto_memneq(pctx->auth_tag, pctx->odata, authsize)) err = -EBADMSG; } aead_request_complete(req, err); @@ -422,7 +422,7 @@ static int crypto_ccm_decrypt(struct aead_request *req) return err; /* verify */ - if (memcmp(authtag, odata, authsize)) + if (crypto_memneq(authtag, odata, authsize)) return -EBADMSG; return err;