Commit 06f6e365 authored by Ovidiu Panait's avatar Ovidiu Panait Committed by Herbert Xu

crypto: octeontx2 - set assoclen in aead_do_fallback()

Currently, in case of aead fallback, no associated data info is set in the
fallback request. To fix this, call aead_request_set_ad() to pass the assoclen.

Fixes: 6f03f0e8 ("crypto: octeontx2 - register with linux crypto framework")
Signed-off-by: default avatarOvidiu Panait <ovidiu.panait@windriver.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b97c2b21
...@@ -1274,6 +1274,7 @@ static int aead_do_fallback(struct aead_request *req, bool is_enc) ...@@ -1274,6 +1274,7 @@ static int aead_do_fallback(struct aead_request *req, bool is_enc)
req->base.complete, req->base.data); req->base.complete, req->base.data);
aead_request_set_crypt(&rctx->fbk_req, req->src, aead_request_set_crypt(&rctx->fbk_req, req->src,
req->dst, req->cryptlen, req->iv); req->dst, req->cryptlen, req->iv);
aead_request_set_ad(&rctx->fbk_req, req->assoclen);
ret = is_enc ? crypto_aead_encrypt(&rctx->fbk_req) : ret = is_enc ? crypto_aead_encrypt(&rctx->fbk_req) :
crypto_aead_decrypt(&rctx->fbk_req); crypto_aead_decrypt(&rctx->fbk_req);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment