74 cursor->
len ) ) != 0 ) {
199 .
name =
"efi_cacert",
#define STARTUP_NORMAL
Normal startup.
void x509_set_valid(struct x509_certificate *cert, struct x509_certificate *issuer, struct x509_root *root)
Set X.509 certificate as validated.
struct arbelprm_rc_send_wqe rc
#define EEFI(efirc)
Convert an EFI status code to an iPXE status code.
const int allow_trust_override
Flag indicating if root of trust may be overridden at runtime.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
128 bit buffer containing a unique identifier value.
struct list_head links
List of links.
int x509_append_raw(struct x509_chain *chain, const void *data, size_t len)
Append X.509 certificate to X.509 certificate chain.
uint16_t size
Buffer size.
struct x509_root root_certificates
Root certificates.
const void * data
Start of data.
struct init_fn efi_cacert_init_fn __init_fn(INIT_LATE)
EFI CA certificates initialisation function.
void x509_truncate(struct x509_chain *chain, struct x509_link *link)
Truncate X.509 certificate chain.
#define EFI_BUFFER_TOO_SMALL
Enumeration of EFI_STATUS.
size_t len
Length of data.
static void efi_cacert_shutdown(int booting __unused)
Discard any EFI CA certificates.
#define list_empty(list)
Test whether a list is empty.
A startup/shutdown function.
An X.509 certificate chain.
#define ENOMEM
Not enough space.
static struct x509_chain efi_cacerts
List of EFI CA certificates.
#define EFI_TLS_CA_CERTIFICATE_VARIABLE
An initialisation function.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
int efisig_asn1(const void *data, size_t len, size_t offset, struct asn1_cursor **cursor)
Extract ASN.1 object from EFI signature list.
#define __unused
Declare a variable or data structure as unused.
EFI_GET_VARIABLE GetVariable
static int efi_cacert_all(void)
Retrieve all EFI CA certificates.
struct startup_fn efi_cacert_shutdown_fn __startup_fn(STARTUP_NORMAL)
EFI CA certificates shutdown function.
EFI Runtime Services Table.
static struct x509_certificate * x509_last(struct x509_chain *chain)
Get last certificate in X.509 certificate chain.
char * strerror(int errno)
Retrieve string representation of error number.
static void(* free)(struct refcnt *refcnt))
UINT64 UINTN
Unsigned value of native width.
This file defines TlsCaCertificate variable.
uint32_t next
Next descriptor address.
void * malloc(size_t size)
Allocate memory.
const char * x509_name(struct x509_certificate *cert)
Get X.509 certificate display name.
EFI_RUNTIME_SERVICES * RuntimeServices
A pointer to the EFI Runtime Services Table.
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
EFI_GUID efi_tls_ca_certificate_guid
TLS CA certificate variable GUID.
uint8_t data[48]
Additional event data.
#define REF_INIT(free_fn)
Initialise a static reference counter.
EFI_SYSTEM_TABLE * efi_systab
uint16_t offset
Offset to command line.
#define INIT_LATE
Late initialisation.
#define LIST_HEAD_INIT(list)
Initialise a static list head.
static int efi_cacert(const void *data, size_t len, size_t offset)
Retrieve EFI CA certificate.
static void efi_cacert_init(void)
Initialise EFI CA certificates.
void ref_no_free(struct refcnt *refcnt __unused)
Do not free reference-counted object.
#define NULL
NULL pointer (VOID *)
struct refcnt refcnt
Reference count.