|
iPXE
|
Certificate store. More...
#include <string.h>#include <stdlib.h>#include <ipxe/init.h>#include <ipxe/dhcp.h>#include <ipxe/settings.h>#include <ipxe/malloc.h>#include <ipxe/crypto.h>#include <ipxe/asn1.h>#include <ipxe/x509.h>#include <ipxe/certstore.h>Go to the source code of this file.
Macros | |
| #define | CERT(_index, _path) |
| Raw certificate data for all permanent stored certificates. More... | |
| #define | CERT(_index, _path) |
| Raw certificate data for all permanent stored certificates. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static void | certstore_found (struct x509_chain *store, struct x509_certificate *cert) |
| Mark stored certificate as most recently used. More... | |
| void | certstore_add (struct x509_certificate *cert) |
| Add certificate to store. More... | |
| void | certstore_del (struct x509_certificate *cert) |
| Remove certificate from store. More... | |
| static unsigned int | certstore_discard (void) |
| Discard a stored certificate. More... | |
| struct cache_discarder certstore_discarder | __cache_discarder (CACHE_NORMAL) |
| Certificate store cache discarder. More... | |
| static void | certstore_init (void) |
| Construct permanent certificate store. More... | |
| struct init_fn certstore_init_fn | __init_fn (INIT_LATE) |
| Certificate store initialisation function. More... | |
| static struct setting cert_setting | __setting (SETTING_CRYPTO, cert) |
| Additional certificate setting. More... | |
| static int | certstore_apply_settings (void) |
| Apply certificate store configuration settings. More... | |
| REQUIRING_SYMBOL (certstore) | |
| REQUIRE_OBJECT (config_certs) | |
Variables | |
| static struct asn1_cursor | certstore_raw [] |
| static struct x509_certificate | certstore_certs [sizeof(certstore_raw)/sizeof(certstore_raw[0])] |
| X.509 certificate structures for all permanent stored certificates. More... | |
| struct x509_chain | certstore |
| Certificate store. More... | |
| struct settings_applicator certstore_applicator | __settings_applicator |
| Certificate store settings applicator. More... | |
Certificate store.
Definition in file certstore.c.
| #define CERT | ( | _index, | |
| _path | |||
| ) |
Raw certificate data for all permanent stored certificates.
Raw certificate cursors for all permanent stored certificates.
Definition at line 60 of file certstore.c.
| #define CERT | ( | _index, | |
| _path | |||
| ) |
Raw certificate data for all permanent stored certificates.
Raw certificate cursors for all permanent stored certificates.
Definition at line 60 of file certstore.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Mark stored certificate as most recently used.
| store | Certificate store |
| cert | X.509 certificate |
Definition at line 78 of file certstore.c.
References DBGC2, x509_link::list, list_add, list_del, x509_certificate::store, and x509_name().
| void certstore_add | ( | struct x509_certificate * | cert | ) |
Add certificate to store.
| cert | X.509 certificate |
Definition at line 100 of file certstore.c.
References x509_link::cert, certstore, DBGC, x509_chain::links, x509_link::list, list_add, x509_certificate::store, x509_get(), and x509_name().
Referenced by certstore_init(), and x509_certificate().
| void certstore_del | ( | struct x509_certificate * | cert | ) |
Remove certificate from store.
| cert | X.509 certificate |
Definition at line 115 of file certstore.c.
References certstore, DBGC, x509_certificate::flags, x509_link::list, list_del, x509_certificate::store, X509_FL_PERMANENT, x509_name(), and x509_put().
Referenced by certfree_payload(), and certstore_discard().
|
static |
Discard a stored certificate.
| discarded | Number of cached items discarded |
Definition at line 133 of file certstore.c.
References certstore, certstore_del(), refcnt::count, x509_certificate::flags, x509_chain::links, x509_link::list, list_for_each_entry_reverse, x509_certificate::refcnt, x509_certificate::store, X509_FL_EXPLICIT, and X509_FL_PERMANENT.
| struct cache_discarder certstore_discarder __cache_discarder | ( | CACHE_NORMAL | ) |
Certificate store cache discarder.
|
static |
Construct permanent certificate store.
Definition at line 168 of file certstore.c.
References certstore, certstore_add(), certstore_certs, certstore_raw, DBGC, x509_certificate::flags, NULL, raw, rc, ref_init, ref_no_free(), x509_certificate::refcnt, strerror(), x509_find(), X509_FL_PERMANENT, x509_name(), and x509_parse().
|
static |
Additional certificate setting.
|
static |
Apply certificate store configuration settings.
| rc | Return status code |
Definition at line 230 of file certstore.c.
References certstore, DBGC, fetch_raw_setting_copy(), free, len, NULL, rc, strerror(), x509_name(), and x509_put().
| REQUIRING_SYMBOL | ( | certstore | ) |
| REQUIRE_OBJECT | ( | config_certs | ) |
|
static |
Definition at line 64 of file certstore.c.
Referenced by certstore_init().
|
static |
X.509 certificate structures for all permanent stored certificates.
Definition at line 69 of file certstore.c.
Referenced by certstore_init().
| struct x509_chain certstore |
Certificate store.
Definition at line 89 of file certstore.c.
Referenced by certstore_add(), certstore_apply_settings(), certstore_del(), certstore_discard(), certstore_init(), tls_new_certificate_request(), x509_find(), x509_find_issuer_serial(), x509_find_key(), and x509_find_subject().
| struct settings_applicator certstore_applicator __settings_applicator |
Certificate store settings applicator.
Definition at line 267 of file certstore.c.
1.8.15