]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KEYS: asymmetric: Add missing dependencies of FIPS_SIGNATURE_SELFTEST
authorEric Biggers <ebiggers@google.com>
Mon, 22 Apr 2024 21:10:41 +0000 (14:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:48:45 +0000 (09:48 +0200)
commit 9d2fd8bdc12f403a5c35c971936a0e1d5cb5108e upstream.

Since the signature self-test uses RSA and SHA-256, it must only be
enabled when those algorithms are enabled.  Otherwise it fails and
panics the kernel on boot-up.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202404221528.51d75177-lkp@intel.com
Fixes: 3cde3174eb91 ("certs: Add FIPS selftests")
Cc: stable@vger.kernel.org
Cc: Simo Sorce <simo@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
crypto/asymmetric_keys/Kconfig

index 3f089abd6fc9f5086124405d31779205728c1db2..684767ab23e24da7bb2f13005a96bd4e8af61086 100644 (file)
@@ -86,5 +86,7 @@ config FIPS_SIGNATURE_SELFTEST
        depends on ASYMMETRIC_KEY_TYPE
        depends on PKCS7_MESSAGE_PARSER=X509_CERTIFICATE_PARSER
        depends on X509_CERTIFICATE_PARSER
+       depends on CRYPTO_RSA
+       depends on CRYPTO_SHA256
 
 endif # ASYMMETRIC_KEY_TYPE