crypto: talitos - fix max key size for sha384 and sha512
authorChristophe Leroy <christophe.leroy@c-s.fr>
Wed, 12 Jun 2019 05:49:50 +0000 (05:49 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 20 Jun 2019 06:18:33 +0000 (14:18 +0800)
Below commit came with a typo in the CONFIG_ symbol, leading
to a permanently reduced max key size regarless of the driver
capabilities.

Reported-by: Horia Geantă <horia.geanta@nxp.com>
Fixes: b8fbdc2bc4e7 ("crypto: talitos - reduce max key size for SEC1")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/talitos.c

index 32a7e747dc5f1fc8ee45ce1e6a265b2dd55d2aa6..c865f5d5eabaa84e649d1e2150ef65b396f177c6 100644 (file)
@@ -823,7 +823,7 @@ static void talitos_unregister_rng(struct device *dev)
  * HMAC_SNOOP_NO_AFEA (HSNA) instead of type IPSEC_ESP
  */
 #define TALITOS_CRA_PRIORITY_AEAD_HSNA (TALITOS_CRA_PRIORITY - 1)
-#ifdef CONFIG_CRYPTO_DEV_TALITOS_SEC2
+#ifdef CONFIG_CRYPTO_DEV_TALITOS2
 #define TALITOS_MAX_KEY_SIZE           (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE)
 #else
 #define TALITOS_MAX_KEY_SIZE           (AES_MAX_KEY_SIZE + SHA256_BLOCK_SIZE)