aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto/certstore.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2024-08-13 12:25:25 +0100
committerMichael Brown <mcb30@ipxe.org>2024-08-13 12:26:31 +0100
commit96fb7a0a9395cec423a58069e1b49535e8ceceef (patch)
treeb38ef6bbeb7f8eb938829864f4bd72c2c2b8078a /src/crypto/certstore.c
parentd85590b6584499569c19f7ee4a1e0c10d5132f70 (diff)
downloadipxe-96fb7a0a9395cec423a58069e1b49535e8ceceef.tar.gz
[crypto] Allow passing a NULL certificate store to x509_find() et al
Allow passing a NULL value for the certificate list to all functions used for identifying an X.509 certificate from an existing set of certificates, and rename function parameters to indicate that this certificate list represents an unordered certificate store (rather than an ordered certificate chain). Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto/certstore.c')
-rw-r--r--src/crypto/certstore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/certstore.c b/src/crypto/certstore.c
index f8ddbd3d7..31797c4cd 100644
--- a/src/crypto/certstore.c
+++ b/src/crypto/certstore.c
@@ -72,16 +72,16 @@ static struct x509_certificate certstore_certs[ sizeof ( certstore_raw ) /
/**
* Mark stored certificate as most recently used
*
- * @v certs X.509 certificate list
+ * @v store Certificate store
* @v cert X.509 certificate
*/
-static void certstore_found ( struct x509_chain *certs,
+static void certstore_found ( struct x509_chain *store,
struct x509_certificate *cert ) {
/* Mark as most recently used */
list_del ( &cert->store.list );
- list_add ( &cert->store.list, &certs->links );
- DBGC2 ( certs, "CERTSTORE found certificate %s\n",
+ list_add ( &cert->store.list, &store->links );
+ DBGC2 ( store, "CERTSTORE found certificate %s\n",
x509_name ( cert ) );
}