aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/aead.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/aead.c b/crypto/aead.c
index f23c2b0ee009..0402b606fcfd 100644
--- a/crypto/aead.c
+++ b/crypto/aead.c
@@ -77,6 +77,11 @@ static unsigned int crypto_aead_ctxsize(struct crypto_alg *alg, u32 type,
77 return alg->cra_ctxsize; 77 return alg->cra_ctxsize;
78} 78}
79 79
80static int no_givdecrypt(struct aead_givcrypt_request *req)
81{
82 return -ENOSYS;
83}
84
80static int crypto_init_aead_ops(struct crypto_tfm *tfm, u32 type, u32 mask) 85static int crypto_init_aead_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
81{ 86{
82 struct aead_alg *alg = &tfm->__crt_alg->cra_aead; 87 struct aead_alg *alg = &tfm->__crt_alg->cra_aead;
@@ -88,6 +93,8 @@ static int crypto_init_aead_ops(struct crypto_tfm *tfm, u32 type, u32 mask)
88 crt->setkey = setkey; 93 crt->setkey = setkey;
89 crt->encrypt = alg->encrypt; 94 crt->encrypt = alg->encrypt;
90 crt->decrypt = alg->decrypt; 95 crt->decrypt = alg->decrypt;
96 crt->givencrypt = alg->givencrypt;
97 crt->givdecrypt = alg->givdecrypt ?: no_givdecrypt;
91 crt->ivsize = alg->ivsize; 98 crt->ivsize = alg->ivsize;
92 crt->authsize = alg->maxauthsize; 99 crt->authsize = alg->maxauthsize;
93 100