master
 1const std = @import("../../std.zig");
 2const windows = std.os.windows;
 3const BOOL = windows.BOOL;
 4const DWORD = windows.DWORD;
 5const BYTE = windows.BYTE;
 6const LPCWSTR = windows.LPCWSTR;
 7
 8pub const CERT_INFO = *opaque {};
 9pub const HCERTSTORE = *opaque {};
10pub const CERT_CONTEXT = extern struct {
11    dwCertEncodingType: DWORD,
12    pbCertEncoded: [*]BYTE,
13    cbCertEncoded: DWORD,
14    pCertInfo: CERT_INFO,
15    hCertStore: HCERTSTORE,
16};
17
18pub extern "crypt32" fn CertOpenSystemStoreW(
19    _: ?*const anyopaque,
20    szSubsystemProtocol: LPCWSTR,
21) callconv(.winapi) ?HCERTSTORE;
22
23pub extern "crypt32" fn CertCloseStore(
24    hCertStore: HCERTSTORE,
25    dwFlags: DWORD,
26) callconv(.winapi) BOOL;
27
28pub extern "crypt32" fn CertEnumCertificatesInStore(
29    hCertStore: HCERTSTORE,
30    pPrevCertContext: ?*CERT_CONTEXT,
31) callconv(.winapi) ?*CERT_CONTEXT;