std :: crypto::x509
Struct std::X509Cert
struct X509Cert {
struct X509Name subject;
struct X509Name issuer;
struct X509Validity validity;
struct X509San san;
unsigned char pubkey[X509_KEY_LEN];
unsigned long pubkey_len;
unsigned char serial[20];
unsigned long serial_len;
int is_ca;
int key_usage;
}Parsed certificate (all fields, no dynamic allocation).
Fields
1 if BasicConstraints CA=TRUE
raw KeyUsage bits
Methods
Is the certificate currently valid for the given Unix timestamp?
Does hostname match a DNS Subject Alternative Name (or, only when the
certificate has none, the subject CN)? Case-insensitive; '*.' wildcards
match one leftmost label.
Is this a CA certificate?
Parse a DER-encoded certificate from der (len bytes) into this
struct in place (zeroed first). Returns 0 on success, negative on
error.
Does this certificate's issuer name match issuer_cert's subject?
A structural check only: X509Cert keeps no signature. Verify
signatures with X509Parsed and x509_verify_signed_by() below (std/tls
builds and verifies whole chains with them).