certs: select PKCS7_MESSAGE_PARSER if needed
Subsystems (2)
PATCH 1/1 certs: select PKCS7_MESSAGE_PARSER if needed
From: Arnd Bergmann <[email protected]>
When CONFIG_SYSTEM_BLACKLIST_KEYRING and CONFIG_INTEGRITY_PLATFORM_KEYRING are both enabled, the system blacklist tries calling the pkcs7_validate_trust() function, causing a link failure if the driver that defines it is disabled or a loadable module:
ld.lld: error: undefined symbol: pkcs7_validate_trust
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
referenced by
blacklist.c
blacklist.o:(is_key_on_revocation_list) in archivecerts/built-in.a
Add a Kconfig 'select' statement for this specific case that force- enables the pkcs7 code as well.
--- certs/Kconfig | 1 + 1 file changed, 1 insertion(+)
certs/Kconfig +1 -0
@@ -68,6 +68,7 @@ config SECONDARY_TRUSTED_KEYRING config SYSTEM_BLACKLIST_KEYRING bool "Provide system-wide ring of blacklisted keys" depends on KEYS + select PKCS7_MESSAGE_PARSER if INTEGRITY_PLATFORM_KEYRING help Provide a system keyring to which blacklisted keys can be added. Keys in the keyring are considered entirely untrusted. Keys in this
Signature · 1 line
2.29.2
David Howells
maintainercerts/Kconfig config SECONDARY_TRUSTED_KEYRING · line 71
Quoted 1 line · Arnd Bergmann
certs/Kconfig +1
-0+ select PKCS7_MESSAGE_PARSER if INTEGRITY_PLATFORM_KEYRING
I think a better way to do it is to add a separate config option for dealing with revocation certs, which is part of what I suggested here:
https://lore.kernel.org/keyrings/[email protected]/
David
Quoted 9 lines · David Howells
Quoted 1 line · Arnd Bergmann
+ select
PKCS7_MESSAGE_PARSERifINTEGRITY_PLATFORM_KEYRINGI think a better way to do it is to add a separate config option for dealing with revocation certs, which is part of what I suggested here:
https://lore.kernel.org/keyrings/[email protected]/
Ok, sounds good. Can this make it into v5.12 though, or do we need an intermediate
fix to avoid the build failure?
Arnd