|
iPXE
|
Root certificate store. More...
#include <stdlib.h>#include <ipxe/crypto.h>#include <ipxe/sha256.h>#include <ipxe/x509.h>#include <ipxe/settings.h>#include <ipxe/dhcp.h>#include <ipxe/init.h>#include <ipxe/rootcert.h>Go to the source code of this file.
Macros | |
| #define | FINGERPRINT_LEN SHA256_DIGEST_SIZE |
| Length of a root certificate fingerprint. | |
| #define | ALLOW_TRUST_OVERRIDE 1 |
| #define | TRUSTED |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| FILE_SECBOOT (PERMITTED) | |
| static struct setting trust_setting | __setting (SETTING_CRYPTO, trust) |
| Root certificate fingerprint setting. | |
| static void | rootcert_init (void) |
| Initialise root certificate. | |
| struct startup_fn rootcert_startup_fn | __startup_fn (STARTUP_LATE) |
| Root certificate initialiser. | |
Variables | |
| const int | allow_trust_override = ALLOW_TRUST_OVERRIDE |
| Flag indicating if root of trust may be overridden at runtime. | |
| static const uint8_t | fingerprints [] = { TRUSTED } |
| Root certificate fingerprints. | |
| struct x509_root | root_certificates |
| Root certificates. | |
Root certificate store.
Definition in file rootcert.c.
| #define FINGERPRINT_LEN SHA256_DIGEST_SIZE |
Length of a root certificate fingerprint.
Definition at line 43 of file rootcert.c.
Referenced by rootcert_init().
| #define ALLOW_TRUST_OVERRIDE 1 |
Definition at line 50 of file rootcert.c.
Referenced by rootcert_init().
| #define TRUSTED |
Definition at line 56 of file rootcert.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
| FILE_SECBOOT | ( | PERMITTED | ) |
|
static |
Root certificate fingerprint setting.
References __setting, DHCP_EB_TRUST, and SETTING_CRYPTO.
|
static |
Initialise root certificate.
The list of trusted root certificates can be specified at build time using the TRUST= build parameter. If no certificates are specified, then the default iPXE root CA certificate is trusted.
If no certificates were explicitly specified, then we allow the list of trusted root certificate fingerprints to be overridden using the "trust" setting, but only at the point of iPXE initialisation. This prevents untrusted sources of settings (e.g. DHCP) from subverting the chain of trust, while allowing trustworthy sources (e.g. VMware GuestInfo or non-volatile stored options) to specify the trusted root certificate without requiring a rebuild.
Definition at line 102 of file rootcert.c.
References ALLOW_TRUST_OVERRIDE, DBGC, DBGC_HDA, fetch_raw_setting_copy(), FINGERPRINT_LEN, len, NULL, and root_certificates.
Referenced by __startup_fn().
| struct startup_fn rootcert_startup_fn __startup_fn | ( | STARTUP_LATE | ) |
Root certificate initialiser.
References __startup_fn, rootcert_init(), and STARTUP_LATE.
| const int allow_trust_override = ALLOW_TRUST_OVERRIDE |
Flag indicating if root of trust may be overridden at runtime.
Definition at line 65 of file rootcert.c.
Referenced by efi_cacert(), and FILE_SECBOOT().
| struct x509_root root_certificates |
Root certificates.
Definition at line 79 of file rootcert.c.
Referenced by add_tls(), efi_cacert(), FILE_SECBOOT(), ocsp_prepare_test(), rootcert_init(), x509_is_valid(), and x509_validate().