Commit bc026676 authored by Nayna Jain's avatar Nayna Jain Committed by Jarkko Sakkinen

integrity: ignore keys failing CA restrictions on non-UEFI platform

On non-UEFI platforms, handle restrict_link_by_ca failures differently.

Certificates which do not satisfy CA restrictions on non-UEFI platforms
are ignored.
Signed-off-by: default avatarNayna Jain <nayna@linux.ibm.com>
Reviewed-and-tested-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Acked-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
Tested-by: default avatarNageswara R Sastry <rnsastry@linux.ibm.com>
Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
parent a3af7188
...@@ -36,7 +36,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t ...@@ -36,7 +36,7 @@ void __init add_to_machine_keyring(const char *source, const void *data, size_t
* If the restriction check does not pass and the platform keyring * If the restriction check does not pass and the platform keyring
* is configured, try to add it into that keyring instead. * is configured, try to add it into that keyring instead.
*/ */
if (rc && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING)) if (rc && efi_enabled(EFI_BOOT) && IS_ENABLED(CONFIG_INTEGRITY_PLATFORM_KEYRING))
rc = integrity_load_cert(INTEGRITY_KEYRING_PLATFORM, source, rc = integrity_load_cert(INTEGRITY_KEYRING_PLATFORM, source,
data, len, perm); data, len, perm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment