aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/x509.h
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/include/ipxe/x509.h
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/include/ipxe/x509.h')
-rw-r--r--src/include/ipxe/x509.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/include/ipxe/x509.h b/src/include/ipxe/x509.h
index 612743a77..e71cee8a3 100644
--- a/src/include/ipxe/x509.h
+++ b/src/include/ipxe/x509.h
@@ -204,10 +204,10 @@ struct x509_chain {
struct list_head links;
/** Mark certificate as found
*
- * @v certs X.509 certificate list
+ * @v store Certificate store
* @v cert X.509 certificate
*/
- void ( * found ) ( struct x509_chain *certs,
+ void ( * found ) ( struct x509_chain *store,
struct x509_certificate *cert );
};
@@ -432,19 +432,19 @@ extern int x509_append ( struct x509_chain *chain,
extern int x509_append_raw ( struct x509_chain *chain, const void *data,
size_t len );
extern void x509_truncate ( struct x509_chain *chain, struct x509_link *link );
-extern struct x509_certificate * x509_find ( struct x509_chain *certs,
+extern struct x509_certificate * x509_find ( struct x509_chain *store,
const struct asn1_cursor *raw );
extern struct x509_certificate *
-x509_find_subject ( struct x509_chain *certs,
+x509_find_subject ( struct x509_chain *store,
const struct asn1_cursor *subject );
extern struct x509_certificate *
-x509_find_issuer_serial ( struct x509_chain *certs,
+x509_find_issuer_serial ( struct x509_chain *store,
const struct asn1_cursor *issuer,
const struct asn1_cursor *serial );
-extern struct x509_certificate * x509_find_key ( struct x509_chain *certs,
+extern struct x509_certificate * x509_find_key ( struct x509_chain *store,
struct private_key *key );
extern int x509_auto_append ( struct x509_chain *chain,
- struct x509_chain *certs );
+ struct x509_chain *store );
extern int x509_validate_chain ( struct x509_chain *chain, time_t time,
struct x509_chain *store,
struct x509_root *root );