X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=crypto%2Fccm.c;h=c36d654cf56a0f08ef9ef4e4cd42eaa85047a6cd;hb=22106368c999246c414610dcaacd485e741605b1;hp=7cf7e5a6b7812688b278f643a84be3845089a650;hpb=ef3f2de2b5496f721b12f21a157e19eac816394b;p=karo-tx-linux.git diff --git a/crypto/ccm.c b/crypto/ccm.c index 7cf7e5a6b781..c36d654cf56a 100644 --- a/crypto/ccm.c +++ b/crypto/ccm.c @@ -266,6 +266,8 @@ static int crypto_ccm_auth(struct aead_request *req, struct scatterlist *plain, if (assoclen) { pctx->ilen = format_adata(idata, assoclen); get_data_to_compute(cipher, pctx, req->assoc, req->assoclen); + } else { + pctx->ilen = 0; } /* compute plaintext into mac */