Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: asymmetric_keys - select CRYPTO_HASH where needed

Build testing with some core crypto options disabled revealed
a few modules that are missing CRYPTO_HASH:

crypto/asymmetric_keys/x509_public_key.o: In function `x509_get_sig_params':
x509_public_key.c:(.text+0x4c7): undefined reference to `crypto_alloc_shash'
x509_public_key.c:(.text+0x5e5): undefined reference to `crypto_shash_digest'
crypto/asymmetric_keys/pkcs7_verify.o: In function `pkcs7_digest.isra.0':
pkcs7_verify.c:(.text+0xab): undefined reference to `crypto_alloc_shash'
pkcs7_verify.c:(.text+0x1b2): undefined reference to `crypto_shash_digest'
pkcs7_verify.c:(.text+0x3c1): undefined reference to `crypto_shash_update'
pkcs7_verify.c:(.text+0x411): undefined reference to `crypto_shash_finup'

This normally doesn't show up in randconfig tests because there is
a large number of other options that select CRYPTO_HASH.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Arnd Bergmann and committed by
Herbert Xu
90acc065 47397118

+3
+3
crypto/asymmetric_keys/Kconfig
··· 15 15 select MPILIB 16 16 select CRYPTO_HASH_INFO 17 17 select CRYPTO_AKCIPHER 18 + select CRYPTO_HASH 18 19 help 19 20 This option provides support for asymmetric public key type handling. 20 21 If signature generation and/or verification are to be used, ··· 66 65 config PKCS7_MESSAGE_PARSER 67 66 tristate "PKCS#7 message parser" 68 67 depends on X509_CERTIFICATE_PARSER 68 + select CRYPTO_HASH 69 69 select ASN1 70 70 select OID_REGISTRY 71 71 help ··· 89 87 bool "Support for PE file signature verification" 90 88 depends on PKCS7_MESSAGE_PARSER=y 91 89 depends on SYSTEM_DATA_VERIFICATION 90 + select CRYPTO_HASH 92 91 select ASN1 93 92 select OID_REGISTRY 94 93 help