-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcapicom.d.ts
49 lines (44 loc) · 1.54 KB
/
capicom.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
42
43
44
45
46
47
48
49
declare namespace CAPICOM {
interface ICertificate {
readonly Version: number;
readonly Thumbprint: string;
readonly SubjectName: string;
readonly SerialNumber: string;
readonly IssuerName: string;
readonly ValidFromDate: VarDate;
readonly ValidToDate: VarDate;
HasPrivateKey(): boolean;
//GetInfo(infoType: CAPICOM_CERT_INFO_TYPE): string;
IsValid(): ICertificateStatus;
Display(): void;
}
interface ICertificateStatus {
// TODO
}
interface ICertificates {
readonly Count: number;
Item(index: number): ICertificate;
Find(findType: CAPICOM_CERTIFICATE_FIND_TYPE, varCriteria?: any, bFindValidOnly?: boolean): ICertificates;
Select(title?: string, displayString?: string, bMultiSelect?: boolean): ICertificates;
}
interface Store {
Open(location?: CAPICOM_STORE_LOCATION, name?: CAPICOM_STORE_NAME, openMode?: CAPICOM_STORE_OPEN_MODE): void;
Close(): void;
Delete(): boolean;
Import(encodedStore: string): void;
readonly Certificates: ICertificates;
readonly Location: CAPICOM_STORE_LOCATION;
readonly Name: string;
}
interface Signers {
readonly Count: number;
Item(index: number): Signer;
}
interface Signer {
Load(fileName: string, password?: string): void;
//readonly AuthenticatedAttributes
Certificate: ICertificate;
//Chain
Options: CAPICOM_CERTIFICATE_INCLUDE_OPTION;
}
}