Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

CERT_CHAIN

crypt32.CERT_CHAIN
pub const CERT_CHAIN = packed struct(DWORD)

File

lib/std/os/windows/crypt32.zig:166

Code

pub const CERT_CHAIN = packed struct(DWORD) {
    CACHE_END_CERT: bool = false,
    THREAD_STORE_SYNC: bool = false,
    CACHE_ONLY_URL_RETRIEVAL: bool = false,
    USE_LOCAL_MACHINE_STORE: bool = false,
    ENABLE_CACHE_AUTO_UPDATE: bool = false,
    ENABLE_SHARE_STORE: bool = false,
    Reserved6: u20 = 0,
    REVOCATION_CHECK_OCSP_CERT: bool = false,
    REVOCATION_ACCUMULATIVE_TIMEOUT: bool = false,
    REVOCATION_CHECK_END_CERT: bool = false,
    REVOCATION_CHECK_CHAIN: bool = false,
    REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT: bool = false,
    REVOCATION_CHECK_CACHE_ONLY: bool = false,

    pub const CONTEXT = opaque {};

    pub const USAGE_MATCH = extern struct {
        dwType: TYPE,
        Usage: CERT_ENHKEY_USAGE,

        pub const TYPE = enum(DWORD) { AND = 0x00000000, OR = 0x00000001, _ };
    };

    pub const PARA = extern struct {
        cbSize: DWORD = @sizeOf(PARA),
        RequestedUsage: USAGE_MATCH,
    };

    pub const POLICY = enum(usize) {
        BASE = 1,
        AUTHENTICODE = 2,
        AUTHENTICODE_TS = 3,
        SSL = 4,
        BASIC_CONSTRAINTS = 5,
        NT_AUTH = 6,
        MICROSOFT_ROOT = 7,
        EV = 8,
        SSL_F12 = 9,
        SSL_HPKP_HEADER = 10,
        THIRD_PARTY_ROOT = 11,
        SSL_KEY_PIN = 12,
        CT = 13,
        /// LPCSTR
        _,

        pub fn fromString(str: LPCSTR) POLICY {
            return @fromBackingInt(@intCast(@intFromPtr(str)));
        }

        pub const PARA = extern struct {
            cbSize: DWORD = @sizeOf(POLICY.PARA),
            dwFlags: FLAG,
            pvExtraPolicyPara: ?*anyopaque,
        };

        pub const STATUS = extern struct {
            cbSize: DWORD = @sizeOf(STATUS),
            dwError: windows.Win32Error,
            lChainIndex: LONG,
            lElementIndex: LONG,
            pvExtraPolicyStatus: ?*anyopaque,
        };

        pub const FLAG = packed struct(DWORD) {
            IGNORE_NOT_TIME_VALID: bool = false,
            IGNORE_CTL_NOT_TIME_VALID: bool = false,
            IGNORE_NOT_TIME_NESTED: bool = false,
            IGNORE_INVALID_BASIC_CONSTRAINTS: bool = false,
            ALLOW_UNKNOWN_CA: bool = false,
            IGNORE_WRONG_USAGE: bool = false,
            IGNORE_INVALID_NAME: bool = false,
            IGNORE_INVALID_POLICY: bool = false,
            IGNORE_END_REV_UNKNOWN: bool = false,
            IGNORE_CTL_SIGNER_REV_UNKNOWN: bool = false,
            IGNORE_CA_REV_UNKNOWN: bool = false,
            IGNORE_ROOT_REV_UNKNOWN: bool = false,
            IGNORE_PEER_TRUST: bool = false,
            IGNORE_NOT_SUPPORTED_CRITICAL_EXT: bool = false,
            TRUST_TESTROOT: bool = false,
            ALLOW_TESTROOT: bool = false,
            Reserved16: u11 = 0,
            IGNORE_WEAK_SIGNATURE: bool = false,
            Reserved28: u4 = 0,
        };
    };
}