crypto: seqiv - Use skcipher
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 12 Jul 2016 05:17:45 +0000 (13:17 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 18 Jul 2016 09:35:43 +0000 (17:35 +0800)
This patch replaces use of the obsolete blkcipher with skcipher.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/seqiv.c

index 15a749a5cab72ea53d597cfa1983a2a175154cc2..a859b3ae239d473909f96889548e127f21217718 100644 (file)
@@ -165,12 +165,16 @@ static int seqiv_aead_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;
        }