-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathcapicom_enums.d.ts
225 lines (205 loc) · 8.9 KB
/
capicom_enums.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
declare namespace CAPICOM {
type StoreLocationPluginNames =
'CAPICOM_LOCAL_MACHINE_STORE'
| 'CAPICOM_CURRENT_USER_STORE';
const enum CAPICOM_STORE_LOCATION {
CAPICOM_MEMORY_STORE = 0,
CAPICOM_LOCAL_MACHINE_STORE = 1,
CAPICOM_CURRENT_USER_STORE = 2,
CAPICOM_ACTIVE_DIRECTORY_USER_STORE = 3,
CAPICOM_SMART_CARD_USER_STORE = 4,
}
type StoreNamePluginNames = 'CAPICOM_MY_STORE';
const enum CAPICOM_STORE_NAME {
CAPICOM_MY_STORE = 'My',
CAPICOM_CA_STORE = 'Ca',
CAPICOM_OTHER_STORE = 'AddressBook',
CAPICOM_ROOT_STORE = 'Root',
}
type StoreOpenModePluginNames = 'CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED';
const enum CAPICOM_STORE_OPEN_MODE {
CAPICOM_STORE_OPEN_READ_ONLY = 0,
CAPICOM_STORE_OPEN_READ_WRITE = 1,
CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2,
CAPICOM_STORE_OPEN_EXISTING_ONLY = 128,
CAPICOM_STORE_OPEN_INCLUDE_ARCHIVED = 256,
}
const enum CAPICOM_CERTIFICATE_FIND_TYPE {
CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0,
CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1,
CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2,
CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3,
CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4,
CAPICOM_CERTIFICATE_FIND_EXTENSION = 5,
CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6,
CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7,
CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8,
CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9,
CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10,
CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11,
CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12,
}
const enum CAPICOM_CERTIFICATE_INCLUDE_OPTION {
CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0,
CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2,
CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1,
}
type CertIntoTypePluginNames =
'CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME'
| 'CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME';
const enum CAPICOM_CERT_INFO_TYPE {
CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0,
CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1,
CAPICOM_CERT_INFO_SUBJECT_EMAIL_NAME = 2,
CAPICOM_CERT_INFO_ISSUER_EMAIL_NAME = 3,
CAPICOM_CERT_INFO_SUBJECT_UPN = 4,
CAPICOM_CERT_INFO_ISSUER_UPN = 5,
CAPICOM_CERT_INFO_SUBJECT_DNS_NAME = 6,
CAPICOM_CERT_INFO_ISSUER_DNS_NAME = 7,
}
type KeyUsagePluginNames = 'CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE';
const enum CAPICOM_KEY_USAGE {
CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128,
CAPICOM_NON_REPUDIATION_KEY_USAGE = 64,
CAPICOM_KEY_ENCIPHERMENT_KEY_USAGE = 32,
CAPICOM_DATA_ENCIPHERMENT_KEY_USAGE = 16,
CAPICOM_KEY_AGREEMENT_KEY_USAGE = 8,
CAPICOM_KEY_CERT_SIGN_KEY_USAGE = 4,
CAPICOM_OFFLINE_CRL_SIGN_KEY_USAGE = 2,
CAPICOM_CRL_SIGN_KEY_USAGE = 2,
CAPICOM_ENCIPHER_ONLY_KEY_USAGE = 1,
CAPICOM_DECIPHER_ONLY_KEY_USAGE = 32768,
}
type PropIDPluginNames = 'CAPICOM_PROPID_ENHKEY_USAGE';
const enum CAPICOM_PROPID {
CAPICOM_PROPID_UNKNOWN = 0,
CAPICOM_PROPID_KEY_PROV_HANDLE = 1,
CAPICOM_PROPID_KEY_PROV_INFO = 2,
CAPICOM_PROPID_SHA1_HASH = 3,
CAPICOM_PROPID_HASH_PROP = 3,
CAPICOM_PROPID_MD5_HASH = 4,
CAPICOM_PROPID_KEY_CONTEXT = 5,
CAPICOM_PROPID_KEY_SPEC = 6,
CAPICOM_PROPID_IE30_RESERVED = 7,
CAPICOM_PROPID_PUBKEY_HASH_RESERVED = 8,
CAPICOM_PROPID_ENHKEY_USAGE = 9,
CAPICOM_PROPID_CTL_USAGE = 9,
CAPICOM_PROPID_NEXT_UPDATE_LOCATION = 10,
CAPICOM_PROPID_FRIENDLY_NAME = 11,
CAPICOM_PROPID_PVK_FILE = 12,
CAPICOM_PROPID_DESCRIPTION = 13,
CAPICOM_PROPID_ACCESS_STATE = 14,
CAPICOM_PROPID_SIGNATURE_HASH = 15,
CAPICOM_PROPID_SMART_CARD_DATA = 16,
CAPICOM_PROPID_EFS = 17,
CAPICOM_PROPID_FORTEZZA_DATA = 18,
CAPICOM_PROPID_ARCHIVED = 19,
CAPICOM_PROPID_KEY_IDENTIFIER = 20,
CAPICOM_PROPID_AUTO_ENROLL = 21,
CAPICOM_PROPID_PUBKEY_ALG_PARA = 22,
CAPICOM_PROPID_CROSS_CERT_DIST_POINTS = 23,
CAPICOM_PROPID_ISSUER_PUBLIC_KEY_MD5_HASH = 24,
CAPICOM_PROPID_SUBJECT_PUBLIC_KEY_MD5_HASH = 25,
CAPICOM_PROPID_ENROLLMENT = 26,
CAPICOM_PROPID_DATE_STAMP = 27,
CAPICOM_PROPID_ISSUER_SERIAL_NUMBER_MD5_HASH = 28,
CAPICOM_PROPID_SUBJECT_NAME_MD5_HASH = 29,
CAPICOM_PROPID_EXTENDED_ERROR_INFO = 30,
CAPICOM_PROPID_RENEWAL = 64,
CAPICOM_PROPID_ARCHIVED_KEY_HASH = 65,
CAPICOM_PROPID_FIRST_RESERVED = 66,
CAPICOM_PROPID_LAST_RESERVED = 32767,
CAPICOM_PROPID_FIRST_USER = 32768,
CAPICOM_PROPID_LAST_USER = 65535,
}
type OIDPluginNames =
'CAPICOM_OID_OTHER'
| 'CAPICOM_OID_KEY_USAGE_EXTENSION';
const enum CAPICOM_OID {
CAPICOM_OID_OTHER = 0,
CAPICOM_OID_AUTHORITY_KEY_IDENTIFIER_EXTENSION = 1,
CAPICOM_OID_KEY_ATTRIBUTES_EXTENSION = 2,
CAPICOM_OID_CERT_POLICIES_95_EXTENSION = 3,
CAPICOM_OID_KEY_USAGE_RESTRICTION_EXTENSION = 4,
CAPICOM_OID_LEGACY_POLICY_MAPPINGS_EXTENSION = 5,
CAPICOM_OID_SUBJECT_ALT_NAME_EXTENSION = 6,
CAPICOM_OID_ISSUER_ALT_NAME_EXTENSION = 7,
CAPICOM_OID_BASIC_CONSTRAINTS_EXTENSION = 8,
CAPICOM_OID_SUBJECT_KEY_IDENTIFIER_EXTENSION = 9,
CAPICOM_OID_KEY_USAGE_EXTENSION = 10,
CAPICOM_OID_PRIVATEKEY_USAGE_PERIOD_EXTENSION = 11,
CAPICOM_OID_SUBJECT_ALT_NAME2_EXTENSION = 12,
CAPICOM_OID_ISSUER_ALT_NAME2_EXTENSION = 13,
CAPICOM_OID_BASIC_CONSTRAINTS2_EXTENSION = 14,
CAPICOM_OID_NAME_CONSTRAINTS_EXTENSION = 15,
CAPICOM_OID_CRL_DIST_POINTS_EXTENSION = 16,
CAPICOM_OID_CERT_POLICIES_EXTENSION = 17,
CAPICOM_OID_POLICY_MAPPINGS_EXTENSION = 18,
CAPICOM_OID_AUTHORITY_KEY_IDENTIFIER2_EXTENSION = 19,
CAPICOM_OID_POLICY_CONSTRAINTS_EXTENSION = 20,
CAPICOM_OID_ENHANCED_KEY_USAGE_EXTENSION = 21,
CAPICOM_OID_CERTIFICATE_TEMPLATE_EXTENSION = 22,
CAPICOM_OID_APPLICATION_CERT_POLICIES_EXTENSION = 23,
CAPICOM_OID_APPLICATION_POLICY_MAPPINGS_EXTENSION = 24,
CAPICOM_OID_APPLICATION_POLICY_CONSTRAINTS_EXTENSION = 25,
CAPICOM_OID_AUTHORITY_INFO_ACCESS_EXTENSION = 26,
CAPICOM_OID_SERVER_AUTH_EKU = 100,
CAPICOM_OID_CLIENT_AUTH_EKU = 101,
CAPICOM_OID_CODE_SIGNING_EKU = 102,
CAPICOM_OID_EMAIL_PROTECTION_EKU = 103,
CAPICOM_OID_IPSEC_END_SYSTEM_EKU = 104,
CAPICOM_OID_IPSEC_TUNNEL_EKU = 105,
CAPICOM_OID_IPSEC_USER_EKU = 106,
CAPICOM_OID_TIME_STAMPING_EKU = 107,
CAPICOM_OID_CTL_USAGE_SIGNING_EKU = 108,
CAPICOM_OID_TIME_STAMP_SIGNING_EKU = 109,
CAPICOM_OID_SERVER_GATED_CRYPTO_EKU = 110,
CAPICOM_OID_ENCRYPTING_FILE_SYSTEM_EKU = 111,
CAPICOM_OID_EFS_RECOVERY_EKU = 112,
CAPICOM_OID_WHQL_CRYPTO_EKU = 113,
CAPICOM_OID_NT5_CRYPTO_EKU = 114,
CAPICOM_OID_OEM_WHQL_CRYPTO_EKU = 115,
CAPICOM_OID_EMBEDED_NT_CRYPTO_EKU = 116,
CAPICOM_OID_ROOT_LIST_SIGNER_EKU = 117,
CAPICOM_OID_QUALIFIED_SUBORDINATION_EKU = 118,
CAPICOM_OID_KEY_RECOVERY_EKU = 119,
CAPICOM_OID_DIGITAL_RIGHTS_EKU = 120,
CAPICOM_OID_LICENSES_EKU = 121,
CAPICOM_OID_LICENSE_SERVER_EKU = 122,
CAPICOM_OID_SMART_CARD_LOGON_EKU = 123,
CAPICOM_OID_PKIX_POLICY_QUALIFIER_CPS = 124,
CAPICOM_OID_PKIX_POLICY_QUALIFIER_USERNOTICE = 125,
}
type EKUPluginNames =
'CAPICOM_EKU_OTHER'
| 'CAPICOM_EKU_CLIENT_AUTH'
| 'CAPICOM_EKU_SMARTCARD_LOGON';
const enum CAPICOM_EKU {
CAPICOM_EKU_OTHER = 0,
CAPICOM_EKU_SERVER_AUTH = 1,
CAPICOM_EKU_CLIENT_AUTH = 2,
CAPICOM_EKU_CODE_SIGNING = 3,
CAPICOM_EKU_EMAIL_PROTECTION = 4,
CAPICOM_EKU_SMARTCARD_LOGON = 5,
CAPICOM_EKU_ENCRYPTING_FILE_SYSTEM = 6,
}
const enum CAPICOM_ATTRIBUTE {
CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0,
CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1,
CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2,
}
const enum CAPICOM_HASH_ALGORITHM {
CAPICOM_HASH_ALGORITHM_SHA1 = 0,
CAPICOM_HASH_ALGORITHM_MD2 = 1,
CAPICOM_HASH_ALGORITHM_MD4 = 2,
CAPICOM_HASH_ALGORITHM_MD5 = 3,
CAPICOM_HASH_ALGORITHM_SHA_256 = 4,
CAPICOM_HASH_ALGORITHM_SHA_384 = 5,
CAPICOM_HASH_ALGORITHM_SHA_512 = 6,
}
const enum CAPICOM_ENCODING_TYPE {
CAPICOM_ENCODE_ANY = -1,
CAPICOM_ENCODE_BASE64 = 0,
CAPICOM_ENCODE_BINARY = 1,
}
}