summaryrefslogtreecommitdiff
path: root/drivers/crypto/omap-aes.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-11-05 17:01:03 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-12-11 11:36:59 +0300
commit12adf9d63ec3af674f1e3145308a29daffb73887 (patch)
tree2fafe8baa4931a219e018e11eabd3c81146a2a3e /drivers/crypto/omap-aes.c
parent46d57443eca46999051946c27ec95df313f3619a (diff)
downloadlinux-12adf9d63ec3af674f1e3145308a29daffb73887.tar.xz
crypto: omap-aes-gcm - add missing .setauthsize hooks
GCM only permits certain tag lengths, so populate the .setauthsize hooks which ensure that only permitted sizes are accepted by the implementation. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Tero Kristo <t-kristo@ti.com> Tested-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/omap-aes.c')
-rw-r--r--drivers/crypto/omap-aes.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index 33cba7a2d6df..161af3bf667c 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -787,6 +787,7 @@ static struct aead_alg algs_aead_gcm[] = {
.ivsize = GCM_AES_IV_SIZE,
.maxauthsize = AES_BLOCK_SIZE,
.setkey = omap_aes_gcm_setkey,
+ .setauthsize = omap_aes_gcm_setauthsize,
.encrypt = omap_aes_gcm_encrypt,
.decrypt = omap_aes_gcm_decrypt,
},
@@ -807,6 +808,7 @@ static struct aead_alg algs_aead_gcm[] = {
.maxauthsize = AES_BLOCK_SIZE,
.ivsize = GCM_RFC4106_IV_SIZE,
.setkey = omap_aes_4106gcm_setkey,
+ .setauthsize = omap_aes_4106gcm_setauthsize,
.encrypt = omap_aes_4106gcm_encrypt,
.decrypt = omap_aes_4106gcm_decrypt,
},