std :: crypto::x509
Struct std::X509Parsed
struct X509Parsed {
unsigned long der_len;
struct X509Span tbs;
struct X509Span serial;
struct X509Span issuer;
struct X509Span subject;
struct X509Span spki;
struct X509Span key;
struct X509Span sig;
struct X509Span san;
struct X509Span subject_cn;
int version;
int key_type;
int sig_type;
int sig_hash;
int pss_salt;
unsigned long long not_before;
unsigned long long not_after;
int has_basic_constraints;
int is_ca;
int path_len;
int has_key_usage;
int key_usage;
int has_eku;
int eku_server;
int eku_client;
int eku_any;
int has_name_constraints;
int unknown_critical;
}Fields
the signed TBSCertificate (with its header)
INTEGER content
the Name, whole TLV (compare bytes)
SubjectPublicKeyInfo, whole TLV
RSA: RSAPublicKey DER; EC: the SEC1 point
signature bits (BIT STRING content after the unused-bits byte)
SubjectAltName GeneralNames content (absent: len 0)
first commonName value of the subject
1..3
X509_KEY_*
X509_SIG_*
DIGEST_* (std/crypto/digest.h)
RSA-PSS salt length
Unix seconds
-1 when unlimited / absent
X509_KU_* bits of the first byte (| second byte << 8)
id-kp-serverAuth present
id-kp-clientAuth present
anyExtendedKeyUsage present
a critical extension this parser doesn't process