summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2016-07-12 13:17:45 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2016-07-18 17:35:43 +0800
commitef22871f20e6da987e32719a4ba5e3a9b7d81ae8 (patch)
tree97a9fde006f77878fc42da9e08e974659a36ed4f /crypto
parent0e8bff47f6d3e863bf1829e020000c249c59ecd2 (diff)
downloadop-kernel-dev-ef22871f20e6da987e32719a4ba5e3a9b7d81ae8.zip
op-kernel-dev-ef22871f20e6da987e32719a4ba5e3a9b7d81ae8.tar.gz
crypto: seqiv - Use skcipher
This patch replaces use of the obsolete blkcipher with skcipher. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/seqiv.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/crypto/seqiv.c b/crypto/seqiv.c
index 15a749a..a859b3a 100644
--- a/crypto/seqiv.c
+++ b/crypto/seqiv.c
@@ -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;
}
OpenPOWER on IntegriCloud