diff options
author | David Howells <dhowells@redhat.com> | 2022-05-19 00:48:09 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-06-21 17:05:06 +0200 |
commit | 60050ffe3d770dd1df5b641aa48f49d07a54bd84 (patch) | |
tree | 649187b0c81d53ea6420147e041cd614521ac9c9 /include/keys | |
parent | Linux 5.19-rc2 (diff) | |
download | linux-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 'include/keys')
-rw-r--r-- | include/keys/asymmetric-type.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/keys/asymmetric-type.h b/include/keys/asymmetric-type.h index 6c5d4963e15b..69a13e1e5b2e 100644 --- a/include/keys/asymmetric-type.h +++ b/include/keys/asymmetric-type.h @@ -84,6 +84,9 @@ extern struct key *find_asymmetric_key(struct key *keyring, const struct asymmetric_key_id *id_2, bool partial); +int x509_load_certificate_list(const u8 cert_list[], const unsigned long list_size, + const struct key *keyring); + /* * The payload is at the discretion of the subtype. */ |