projects/linux·commit 746b9ef5

x509: select CONFIG_CRYPTO_LIB_SHA256

746b9ef5 · Arnd Bergmann <[email protected]> · 2026-02-17 08:26:49 +00:00

The x509 public key code gained a dependency on the sha256 hash
implementation, causing a rare link time failure in randconfig
builds:

  arm-linux-gnueabi-ld: crypto/asymmetric_keys/x509_public_key.o: in function `x509_get_sig_params':
  x509_public_key.c:(.text.x509_get_sig_params+0x12): undefined reference to `sha256'
  arm-linux-gnueabi-ld: (sha256): Unknown destination type (ARM/Thumb) in crypto/asymmetric_keys/x509_public_key.o
  x509_public_key.c:(.text.x509_get_sig_params+0x12): dangerous relocation: unsupported relocation

Select the necessary library code from Kconfig.

Fixes: 2c62068ac86b ("x509: Separately calculate sha256 for blacklist")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: David Howells <[email protected]>
Reviewed-by: Eric Biggers <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
746b9ef5d5ccbded13bdc1f9575fb587fe13794e
Parents
fd1d6b9d

Changes

1 files changed · +1 −0

FileStatusAddDelContent
crypto/asymmetric_keys/Kconfigmodified+1−0View file

crypto/asymmetric_keys/Kconfig

View file
diff --git a/crypto/asymmetric_keys/Kconfig b/crypto/asymmetric_keys/Kconfig
index 1dae223..e50bd9b 100644
--- a/crypto/asymmetric_keys/Kconfig
+++ b/crypto/asymmetric_keys/Kconfig
@@ -27,6 +27,7 @@ config X509_CERTIFICATE_PARSER
tristate "X.509 certificate parser"
depends on ASYMMETRIC_PUBLIC_KEY_SUBTYPE
select ASN1
+ select CRYPTO_LIB_SHA256
select OID_REGISTRY
help
This option provides support for parsing X.509 format blobs for key