diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-07-14 14:55:32 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-07-14 14:55:32 +0800 |
commit | 773bb50625cd23c7711bcd1410fffe8a0cab121b (patch) | |
tree | 5153fb0cfa8c29666ef3f997b95378dbf55983fc /drivers/crypto/nx/nx-aes-ccm.c | |
parent | 1425d2d17f7309c65e2bd124e0ce8ace743b17f2 (diff) | |
parent | 030f4e968741d65aea9cd5f7814d1164967801ef (diff) | |
download | lwn-773bb50625cd23c7711bcd1410fffe8a0cab121b.tar.gz lwn-773bb50625cd23c7711bcd1410fffe8a0cab121b.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge the crypto tree to pull in the nx reentrancy patch.
Diffstat (limited to 'drivers/crypto/nx/nx-aes-ccm.c')
-rw-r--r-- | drivers/crypto/nx/nx-aes-ccm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/crypto/nx/nx-aes-ccm.c b/drivers/crypto/nx/nx-aes-ccm.c index 67f80813a06f..e4311ce0cd78 100644 --- a/drivers/crypto/nx/nx-aes-ccm.c +++ b/drivers/crypto/nx/nx-aes-ccm.c @@ -494,8 +494,9 @@ out: static int ccm4309_aes_nx_encrypt(struct aead_request *req) { struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm); + struct nx_gcm_rctx *rctx = aead_request_ctx(req); struct blkcipher_desc desc; - u8 *iv = nx_ctx->priv.ccm.iv; + u8 *iv = rctx->iv; iv[0] = 3; memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); @@ -525,8 +526,9 @@ static int ccm_aes_nx_encrypt(struct aead_request *req) static int ccm4309_aes_nx_decrypt(struct aead_request *req) { struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(req->base.tfm); + struct nx_gcm_rctx *rctx = aead_request_ctx(req); struct blkcipher_desc desc; - u8 *iv = nx_ctx->priv.ccm.iv; + u8 *iv = rctx->iv; iv[0] = 3; memcpy(iv + 1, nx_ctx->priv.ccm.nonce, 3); |