mirror of
https://github.com/ziglang/zig.git
synced 2024-11-16 00:57:04 +00:00
09560bc69a
* keep helper functions out of the DLL bindings APIs * unify the logic for linux and windows certificate scanning with regards to error handling
33 lines
878 B
Zig
33 lines
878 B
Zig
const std = @import("../../std.zig");
|
|
const windows = std.os.windows;
|
|
const BOOL = windows.BOOL;
|
|
const DWORD = windows.DWORD;
|
|
const BYTE = windows.BYTE;
|
|
const LPCWSTR = windows.LPCWSTR;
|
|
const WINAPI = windows.WINAPI;
|
|
|
|
pub const CERT_INFO = *opaque {};
|
|
pub const HCERTSTORE = *opaque {};
|
|
pub const CERT_CONTEXT = extern struct {
|
|
dwCertEncodingType: DWORD,
|
|
pbCertEncoded: [*]BYTE,
|
|
cbCertEncoded: DWORD,
|
|
pCertInfo: CERT_INFO,
|
|
hCertStore: HCERTSTORE,
|
|
};
|
|
|
|
pub extern "crypt32" fn CertOpenSystemStoreW(
|
|
_: ?*const anyopaque,
|
|
szSubsystemProtocol: LPCWSTR,
|
|
) callconv(WINAPI) ?HCERTSTORE;
|
|
|
|
pub extern "crypt32" fn CertCloseStore(
|
|
hCertStore: HCERTSTORE,
|
|
dwFlags: DWORD,
|
|
) callconv(WINAPI) BOOL;
|
|
|
|
pub extern "crypt32" fn CertEnumCertificatesInStore(
|
|
hCertStore: HCERTSTORE,
|
|
pPrevCertContext: ?*CERT_CONTEXT,
|
|
) callconv(WINAPI) ?*CERT_CONTEXT;
|