Skip to content

Commit

Permalink
integrity: ignore keys failing CA restrictions on non-UEFI platform
Browse files Browse the repository at this point in the history
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: Nayna Jain <[email protected]>
Reviewed-and-tested-by: Mimi Zohar <[email protected]>
Acked-by: Jarkko Sakkinen <[email protected]>
Tested-by: Nageswara R Sastry <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
  • Loading branch information
naynajain authored and jarkkojs committed Aug 17, 2023
1 parent a3af718 commit bc02667
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/integrity/platform_certs/machine_keyring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* 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,
data, len, perm);

Expand Down

0 comments on commit bc02667

Please sign in to comment.