From 3066766751b22258206552bc0e134f6788bf76e7 Mon Sep 17 00:00:00 2001 From: Joachim Vandersmissen Date: Sun, 12 May 2024 23:55:06 -0500 Subject: certs: Move RSA self-test data to separate file In preparation of adding new ECDSA self-tests, the existing data for the RSA self-tests is moved to a separate file. This file is only compiled if the new CONFIG_FIPS_SIGNATURE_SELFTEST_RSA configuration option is set, which ensures that the required dependencies (RSA, SHA-256) are present. Otherwise, the kernel would panic when trying to execute the self-test. The introduction of this new option, rather than adding the dependencies to the existing CONFIG_FIPS_SIGNATURE_SELFTEST option, allows for additional self-tests to be added for different algorithms. The kernel can then be configured to only execute the self-tests for those algorithms that are included. Signed-off-by: Joachim Vandersmissen Reviewed-by: Jarkko Sakkinen Acked-by: Herbert Xu Signed-off-by: Jarkko Sakkinen --- crypto/asymmetric_keys/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'crypto/asymmetric_keys/Makefile') diff --git a/crypto/asymmetric_keys/Makefile b/crypto/asymmetric_keys/Makefile index 1a273d6d..ac1402e2 100644 --- a/crypto/asymmetric_keys/Makefile +++ b/crypto/asymmetric_keys/Makefile @@ -24,6 +24,7 @@ x509_key_parser-y := \ x509_public_key.o obj-$(CONFIG_FIPS_SIGNATURE_SELFTEST) += x509_selftest.o x509_selftest-y += selftest.o +x509_selftest-$(CONFIG_FIPS_SIGNATURE_SELFTEST_RSA) += selftest_rsa.o $(obj)/x509_cert_parser.o: \ $(obj)/x509.asn1.h \ -- cgit v1.2.3