summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-12-12 19:27:25 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-01-11 08:16:50 +1100
commita9e51574653d732c3ee2bfa7e03e8b3a1af357b2 (patch)
treedf7f00d899fbc000693f8a64dd0035e88993b9c3 /crypto
parent6a38b01dde11492379b2bc938e58e143914616da (diff)
downloadlinux-crypto-a9e51574653d732c3ee2bfa7e03e8b3a1af357b2.tar.gz
linux-crypto-a9e51574653d732c3ee2bfa7e03e8b3a1af357b2.zip
[CRYPTO] aead: Allow algorithms with no givcrypt support
Some algorithms always require manual IV construction. For instance, the generic CCM algorithm requires the first byte of the IV to be manually constructed. Such algorithms are always used by other algorithms equipped with their own IV generators and do not need IV generation per se. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/aead.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/aead.c b/crypto/aead.c
index 0402b606..15335ed9 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -77,7 +77,7 @@ static unsigned int crypto_aead_ctxsize(struct crypto_alg *alg, u32 type,
return alg->cra_ctxsize;
}
-static int no_givdecrypt(struct aead_givcrypt_request *req)
+static int no_givcrypt(struct aead_givcrypt_request *req)
{
return -ENOSYS;
}
@@ -93,8 +93,8 @@ static int crypto_init_aead_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
crt->setkey = setkey;
crt->encrypt = alg->encrypt;
crt->decrypt = alg->decrypt;
- crt->givencrypt = alg->givencrypt;
- crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt;
+ crt->givencrypt = alg->givencrypt ?: no_givcrypt;
+ crt->givdecrypt = alg->givdecrypt ?: no_givcrypt;
crt->ivsize = alg->ivsize;
crt->authsize = alg->maxauthsize;