Skip to content

Commit 579b2ba

Browse files
blucaMikulas Patocka
authored andcommitted
dm verity: fallback to platform keyring also if key in trusted keyring is rejected
If enabled, we fallback to the platform keyring if the trusted keyring doesn't have the key used to sign the roothash. But if pkcs7_verify() rejects the key for other reasons, such as usage restrictions, we do not fallback. Do so. Follow-up for 6fce1f4 Suggested-by: Serge Hallyn <[email protected]> Signed-off-by: Luca Boccassi <[email protected]> Acked-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent e6a3531 commit 579b2ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-verity-verify-sig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ int verity_verify_root_hash(const void *root_hash, size_t root_hash_len,
127127
#endif
128128
VERIFYING_UNSPECIFIED_SIGNATURE, NULL, NULL);
129129
#ifdef CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG_PLATFORM_KEYRING
130-
if (ret == -ENOKEY)
130+
if (ret == -ENOKEY || ret == -EKEYREJECTED)
131131
ret = verify_pkcs7_signature(root_hash, root_hash_len, sig_data,
132132
sig_len,
133133
VERIFY_USE_PLATFORM_KEYRING,

0 commit comments

Comments
 (0)