X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=crypto%2Fechainiv.c;h=1b01fe98e91f8cc19ec6e33c8198d715e64d5415;hb=4fc29c1aa375353ffe7c8fa171bf941b71ce29ef;hp=b96a84560b67790845321250e1f1a799557bb4b8;hpb=711e020cae9cd105d81a783686cb8c8059c08b2c;p=cascardo%2Flinux.git diff --git a/crypto/echainiv.c b/crypto/echainiv.c index b96a84560b67..1b01fe98e91f 100644 --- a/crypto/echainiv.c +++ b/crypto/echainiv.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -112,13 +113,16 @@ static int echainiv_encrypt(struct aead_request *req) info = req->iv; if (req->src != req->dst) { - struct blkcipher_desc desc = { - .tfm = ctx->null, - }; + SKCIPHER_REQUEST_ON_STACK(nreq, ctx->sknull); - err = crypto_blkcipher_encrypt( - &desc, req->dst, req->src, - req->assoclen + req->cryptlen); + skcipher_request_set_tfm(nreq, ctx->sknull); + skcipher_request_set_callback(nreq, req->base.flags, + NULL, NULL); + skcipher_request_set_crypt(nreq, req->src, req->dst, + req->assoclen + req->cryptlen, + NULL); + + err = crypto_skcipher_encrypt(nreq); if (err) return err; }