diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-09-14 16:28:26 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2023-09-20 13:15:29 +0800 |
commit | 3dfe8786b11a4a3f9ced2eb89c6c5d73eba84700 (patch) | |
tree | 7334392af764edc5e8612b5d68e06b7530c3d7e6 /crypto | |
parent | 8aee5d4ebd113319f6882b2cd0475d270fdc0d41 (diff) | |
download | linux-stable-3dfe8786b11a4a3f9ced2eb89c6c5d73eba84700.tar.gz linux-stable-3dfe8786b11a4a3f9ced2eb89c6c5d73eba84700.tar.bz2 linux-stable-3dfe8786b11a4a3f9ced2eb89c6c5d73eba84700.zip |
crypto: testmgr - Add support for lskcipher algorithms
Test lskcipher algorithms using the same logic as cipher algorithms.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/testmgr.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 216878c8bc3d..aed4a6bf47ad 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -5945,6 +5945,25 @@ test_done: return rc; notest: + if ((type & CRYPTO_ALG_TYPE_MASK) == CRYPTO_ALG_TYPE_LSKCIPHER) { + char nalg[CRYPTO_MAX_ALG_NAME]; + + if (snprintf(nalg, sizeof(nalg), "ecb(%s)", alg) >= + sizeof(nalg)) + goto notest2; + + i = alg_find_test(nalg); + if (i < 0) + goto notest2; + + if (fips_enabled && !alg_test_descs[i].fips_allowed) + goto non_fips_alg; + + rc = alg_test_skcipher(alg_test_descs + i, driver, type, mask); + goto test_done; + } + +notest2: printk(KERN_INFO "alg: No test for %s (%s)\n", alg, driver); if (type & CRYPTO_ALG_FIPS_INTERNAL) |