-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
41 lines (34 loc) · 1.17 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
declare type StoreType =
'CERT_SYSTEM_STORE_CURRENT_SERVICE' |
'CERT_SYSTEM_STORE_CURRENT_USER' |
'CERT_SYSTEM_STORE_CURRENT_USER_GROUP_POLICY' |
'CERT_SYSTEM_STORE_LOCAL_MACHINE' |
'CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE' |
'CERT_SYSTEM_STORE_LOCAL_MACHINE_GROUP_POLICY' |
'CERT_SYSTEM_STORE_SERVICES' |
'CERT_SYSTEM_STORE_USERS';
declare interface StoreOptions {
store?: string;
storeTypeList?: Array<StoreType | number>;
};
declare type LookupOptions = StoreOptions & {
requirePrivKey?: boolean;
} & ({
subject: string;
thumbprint?: never;
} | {
subject?: never;
thumbprint: Uint8Array;
});
declare interface PfxResult {
passphrase: string;
pfx: Uint8Array;
};
declare function exportCertificateAndPrivateKey(input: LookupOptions): PfxResult;
declare namespace exportCertificateAndPrivateKey {
function exportCertificateAndPrivateKey(input: LookupOptions): PfxResult;
function exportCertificateAndPrivateKeyAsync(input: LookupOptions): Promise<PfxResult>;
function exportSystemCertificates(input: StoreOptions): string[];
function exportSystemCertificatesAsync(input: StoreOptions): Promise<string[]>;
}
export = exportCertificateAndPrivateKey;