summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-11-14 01:12:37 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2022-11-25 10:39:18 +0100
commit790c4c9f532318e3fe8c6f0b498072abc80e1195 (patch)
tree4583d8639fc37682fb027cb47906cc06001510cb
parentcrypto: kdf - skip self-test when tests disabled (diff)
downloadlinux-790c4c9f532318e3fe8c6f0b498072abc80e1195.tar.xz
linux-790c4c9f532318e3fe8c6f0b498072abc80e1195.zip
crypto: kdf - silence noisy self-test
Make the kdf_sp800108 self-test only print a message on success when fips_enabled, so that it's consistent with testmgr.c and doesn't spam the kernel log with a message that isn't really important. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/kdf_sp800108.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/kdf_sp800108.c b/crypto/kdf_sp800108.c
index c6e3ad82d5f7..c3f9938e1ad2 100644
--- a/crypto/kdf_sp800108.c
+++ b/crypto/kdf_sp800108.c
@@ -140,7 +140,7 @@ static int __init crypto_kdf108_init(void)
WARN(1,
"alg: self-tests for CTR-KDF (hmac(sha256)) failed (rc=%d)\n",
ret);
- } else {
+ } else if (fips_enabled) {
pr_info("alg: self-tests for CTR-KDF (hmac(sha256)) passed\n");
}