diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2019-11-05 16:01:03 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-12-11 16:36:59 +0800 |
commit | 12adf9d63ec3af674f1e3145308a29daffb73887 (patch) | |
tree | 2fafe8baa4931a219e018e11eabd3c81146a2a3e /drivers/crypto/omap-aes-gcm.c | |
parent | 46d57443eca46999051946c27ec95df313f3619a (diff) | |
download | linux-12adf9d63ec3af674f1e3145308a29daffb73887.tar.gz linux-12adf9d63ec3af674f1e3145308a29daffb73887.tar.bz2 linux-12adf9d63ec3af674f1e3145308a29daffb73887.zip |
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-gcm.c')
-rw-r--r-- | drivers/crypto/omap-aes-gcm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/crypto/omap-aes-gcm.c b/drivers/crypto/omap-aes-gcm.c index 05d2fe78b105..70398fbd669d 100644 --- a/drivers/crypto/omap-aes-gcm.c +++ b/drivers/crypto/omap-aes-gcm.c @@ -413,3 +413,14 @@ int omap_aes_4106gcm_setkey(struct crypto_aead *tfm, const u8 *key, return 0; } + +int omap_aes_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) +{ + return crypto_gcm_check_authsize(authsize); +} + +int omap_aes_4106gcm_setauthsize(struct crypto_aead *parent, + unsigned int authsize) +{ + return crypto_rfc4106_check_authsize(authsize); +} |