crypto: cmac - return -EINVAL if block size is unsupported
PATCH 1/1 crypto: cmac - return -EINVAL if block size is unsupported
cmac_create() previously returned 0 if a cipher with a block size other than 8 or 16 bytes was specified. It should return -EINVAL instead. Granted, this doesn't actually change any behavior because cryptomgr currently ignores any return value other than -EAGAIN from template ->create() functions.
Signed-off-by Eric Biggers <[email protected]>
--- crypto/cmac.c | 1 + 1 file changed, 1 insertion(+)
crypto/cmac.c +1 -0
@@ -243,6 +243,7 @@ static int cmac_create(struct crypto_template *tmpl, struct rtattr **tb)case 8 :break ;default : + err = -EINVAL ; goto out_put_alg; }
Signature · 1 line
2.8.0.rc3.226.g39d4020
Herbert Xu
maintainerQuoted 7 lines · Eric Biggers
cmac_create()previously returned 0 if a cipher with a block size other than 8 or 16 bytes was specified. It should return-EINVALinstead. Granted, this doesn't actually change any behavior because cryptomgr currently ignores any return value other than-EAGAINfrom template ->create() functions.Signed-off-by Eric Biggers <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt