summaryrefslogtreecommitdiffstats
path: root/certs/system_keyring.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2022-05-19 00:48:09 +0200
committerDavid Howells <dhowells@redhat.com>2022-06-21 17:05:06 +0200
commit60050ffe3d770dd1df5b641aa48f49d07a54bd84 (patch)
tree649187b0c81d53ea6420147e041cd614521ac9c9 /certs/system_keyring.c
parentLinux 5.19-rc2 (diff)
downloadlinux-60050ffe3d770dd1df5b641aa48f49d07a54bd84.tar.xz
linux-60050ffe3d770dd1df5b641aa48f49d07a54bd84.zip
certs: Move load_certificate_list() to be with the asymmetric keys code
Move load_certificate_list(), which loads a series of binary X.509 certificates from a blob and inserts them as keys into a keyring, to be with the asymmetric keys code that it drives. This makes it easier to add FIPS selftest code in which we need to load up a private keyring for the tests to use. Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com> Reviewed-by: Herbert Xu <herbert@gondor.apana.org.au> cc: keyrings@vger.kernel.org cc: linux-crypto@vger.kernel.org Link: https://lore.kernel.org/r/165515742145.1554877.13488098107542537203.stgit@warthog.procyon.org.uk/
Diffstat (limited to 'certs/system_keyring.c')
-rw-r--r--certs/system_keyring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/certs/system_keyring.c b/certs/system_keyring.c
index 05b66ce9d1c9..5042cc54fa5e 100644
--- a/certs/system_keyring.c
+++ b/certs/system_keyring.c
@@ -16,7 +16,6 @@
#include <keys/asymmetric-type.h>
#include <keys/system_keyring.h>
#include <crypto/pkcs7.h>
-#include "common.h"
static struct key *builtin_trusted_keys;
#ifdef CONFIG_SECONDARY_TRUSTED_KEYRING
@@ -183,7 +182,8 @@ __init int load_module_cert(struct key *keyring)
pr_notice("Loading compiled-in module X.509 certificates\n");
- return load_certificate_list(system_certificate_list, module_cert_size, keyring);
+ return x509_load_certificate_list(system_certificate_list,
+ module_cert_size, keyring);
}
/*
@@ -204,7 +204,7 @@ static __init int load_system_certificate_list(void)
size = system_certificate_list_size - module_cert_size;
#endif
- return load_certificate_list(p, size, builtin_trusted_keys);
+ return x509_load_certificate_list(p, size, builtin_trusted_keys);
}
late_initcall(load_system_certificate_list);