summaryrefslogtreecommitdiffstats
path: root/debian/patches/features/all/db-mok-keyring/0007-modsign-Use-secondary-trust-keyring-for-module-signi.patch
blob: b831869e4afc044a4db5b7174a8964f5ee60a9cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: Ke Wu <mikewu@google.com>
Date: Tue, 6 Nov 2018 15:21:30 -0800
Subject: modsign: use all trusted keys to verify module signature
Origin: https://git.kernel.org/linus/e84cd7ee630e44a2cc8ae49e85920a271b214cb3

Make mod_verify_sig to use all trusted keys. This allows keys in
secondary_trusted_keys to be used to verify PKCS#7 signature on a
kernel module.

Signed-off-by: Ke Wu <mikewu@google.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
---
 kernel/module_signing.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux/kernel/module_signing.c
===================================================================
--- linux.orig/kernel/module_signing.c
+++ linux/kernel/module_signing.c
@@ -83,6 +83,7 @@ int mod_verify_sig(const void *mod, stru
 	}
 
 	return verify_pkcs7_signature(mod, modlen, mod + modlen, sig_len,
-				      NULL, VERIFYING_MODULE_SIGNATURE,
+				      VERIFY_USE_SECONDARY_KEYRING,
+				      VERIFYING_MODULE_SIGNATURE,
 				      NULL, NULL);
 }