Re: [PATCH v2 1/2] certs: Move RSA self-test data to separate file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 20, 2024 at 12:42:42AM -0500, Joachim Vandersmissen wrote:
> Herbert, please let me know if this is what you had in mind. Thanks.

Thanks, it's pretty much what I had in mind.
 
> diff --git a/crypto/asymmetric_keys/Makefile b/crypto/asymmetric_keys/Makefile
> index 1a273d6df3eb..4db6968132e9 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_CRYPTO_RSA) += selftest_rsa.o

This doesn't work if RSA is a module.  So you need to play a bit
more of a game with Kconfig to get it to work.  Perhaps define
an extra Kconfig option for it:

config FIPS_SIGNATURE_SELFTEST_RSA
	def_bool (FIPS_SIGNATURE_SELFTEST=m && CRYPTO_RSA!=n) || CRYPTO_RSA=y

and then

x509_selftest-$(CONFIG_FIPS_SIGNATURE_SELFTEST_RSA) += selftest_rsa.o

Thanks,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux