Message ID | 20220923105932.3294400-1-zengheng4@huawei.com |
---|---|
State | New |
Headers | show |
Series | [-next] crypto: KEYS: fix undefined reference errors in fips_signature_selftest | expand |
diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig index 3df3fe4ed95f..9d74bf5fbb63 100644 --- a/crypto/asymmetric_keys/Kconfig +++ b/crypto/asymmetric_keys/Kconfig @@ -83,6 +83,6 @@ config FIPS_SIGNATURE_SELFTEST for FIPS. depends on KEYS depends on ASYMMETRIC_KEY_TYPE - depends on PKCS7_MESSAGE_PARSER + select PKCS7_MESSAGE_PARSER endif # ASYMMETRIC_KEY_TYPE
When the menuconfig set as below: CONFIG_FIPS_SIGNATURE_SELFTEST = y CONFIG_PKCS7_MESSAGE_PARSER = m it would raise below compile errors: ld: crypto/asymmetric_keys/selftest.o: in function `fips_signature_selftest': .../crypto/asymmetric_keys/selftest.c:205: undefined reference to `pkcs7_parse_message' ld: .../crypto/asymmetric_keys/selftest.c:209: undefined reference to `pkcs7_supply_detached_data' ld: .../crypto/asymmetric_keys/selftest.c:211: undefined reference to `pkcs7_verify' ld: .../crypto/asymmetric_keys/selftest.c:215: undefined reference to `pkcs7_validate_trust' ld: .../crypto/asymmetric_keys/selftest.c:219: undefined reference to `pkcs7_free_message' FIPS_SIGNATURE_SELFTEST needs pkcs7_parser.o compiled into kernel indeed, so select PKCS7_MESSAGE_PARSER when enable FIPS_SIGNATURE_SELFTEST. Signed-off-by: Zeng Heng <zengheng4@huawei.com> --- crypto/asymmetric_keys/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)