std1.0.0-beta-7 SafeC docs

std :: crypto::x509

Struct std::X509Parsed

#include <std/crypto/x509.h> source

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

§unsigned long der_lensource
§struct X509Span tbssource

the signed TBSCertificate (with its header)

§struct X509Span serialsource

INTEGER content

§struct X509Span issuersource

the Name, whole TLV (compare bytes)

§struct X509Span subjectsource
§struct X509Span spkisource

SubjectPublicKeyInfo, whole TLV

§struct X509Span keysource

RSA: RSAPublicKey DER; EC: the SEC1 point

§struct X509Span sigsource

signature bits (BIT STRING content after the unused-bits byte)

§struct X509Span sansource

SubjectAltName GeneralNames content (absent: len 0)

§struct X509Span subject_cnsource

first commonName value of the subject

§int versionsource

1..3

§int key_typesource

X509_KEY_*

§int sig_typesource

X509_SIG_*

§int sig_hashsource

DIGEST_* (std/crypto/digest.h)

§int pss_saltsource

RSA-PSS salt length

§unsigned long long not_beforesource

Unix seconds

§unsigned long long not_aftersource
§int has_basic_constraintssource
§int is_casource
§int path_lensource

-1 when unlimited / absent

§int has_key_usagesource
§int key_usagesource

X509_KU_* bits of the first byte (| second byte << 8)

§int has_ekusource
§int eku_serversource

id-kp-serverAuth present

§int eku_clientsource

id-kp-clientAuth present

§int eku_anysource

anyExtendedKeyUsage present

§int has_name_constraintssource
§int unknown_criticalsource

a critical extension this parser doesn't process