1 | /* Generated from pkinit.asn1 */ |
2 | /* Do not edit */ |
3 | |
4 | #ifndef __pkinit_asn1_h__ |
5 | #define __pkinit_asn1_h__ |
6 | |
7 | #include <stddef.h> |
8 | #include <time.h> |
9 | |
10 | #ifndef __asn1_common_definitions__ |
11 | #define __asn1_common_definitions__ |
12 | |
13 | #ifndef __HEIM_BASE_DATA__ |
14 | #define __HEIM_BASE_DATA__ 1 |
15 | struct heim_base_data { |
16 | size_t length; |
17 | void *data; |
18 | }; |
19 | typedef struct heim_base_data heim_octet_string; |
20 | #endif |
21 | |
22 | typedef struct heim_integer { |
23 | size_t length; |
24 | void *data; |
25 | int negative; |
26 | } heim_integer; |
27 | |
28 | typedef char *heim_general_string; |
29 | |
30 | typedef char *heim_utf8_string; |
31 | |
32 | typedef struct heim_base_data heim_printable_string; |
33 | |
34 | typedef struct heim_base_data heim_ia5_string; |
35 | |
36 | typedef struct heim_bmp_string { |
37 | size_t length; |
38 | uint16_t *data; |
39 | } heim_bmp_string; |
40 | |
41 | typedef struct heim_universal_string { |
42 | size_t length; |
43 | uint32_t *data; |
44 | } heim_universal_string; |
45 | |
46 | typedef char *heim_visible_string; |
47 | |
48 | typedef struct heim_oid { |
49 | size_t length; |
50 | unsigned *components; |
51 | } heim_oid; |
52 | |
53 | typedef struct heim_bit_string { |
54 | size_t length; |
55 | void *data; |
56 | } heim_bit_string; |
57 | |
58 | typedef struct heim_base_data heim_any; |
59 | typedef struct heim_base_data heim_any_set; |
60 | |
61 | #define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \ |
62 | do { \ |
63 | (BL) = length_##T((S)); \ |
64 | (B) = malloc((BL)); \ |
65 | if((B) == NULL) { \ |
66 | (R) = ENOMEM; \ |
67 | } else { \ |
68 | (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \ |
69 | (S), (L)); \ |
70 | if((R) != 0) { \ |
71 | free((B)); \ |
72 | (B) = NULL; \ |
73 | } \ |
74 | } \ |
75 | } while (0) |
76 | |
77 | #ifdef _WIN32 |
78 | #ifndef ASN1_LIB |
79 | #define ASN1EXP __declspec(dllimport) |
80 | #else |
81 | #define ASN1EXP |
82 | #endif |
83 | #define ASN1CALL __stdcall |
84 | #else |
85 | #define ASN1EXP |
86 | #define ASN1CALL |
87 | #endif |
88 | struct units; |
89 | |
90 | #endif |
91 | |
92 | #include <krb5/krb5_asn1.h> |
93 | #include <krb5/cms_asn1.h> |
94 | #include <krb5/rfc2459_asn1.h> |
95 | #include <krb5/heim_asn1.h> |
96 | /* OBJECT IDENTIFIER id-pkinit ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) } */ |
97 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit; |
98 | #define ASN1_OID_ID_PKINIT (&asn1_oid_id_pkinit) |
99 | |
100 | /* OBJECT IDENTIFIER id-pkauthdata ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(1) } */ |
101 | extern ASN1EXP const heim_oid asn1_oid_id_pkauthdata; |
102 | #define ASN1_OID_ID_PKAUTHDATA (&asn1_oid_id_pkauthdata) |
103 | |
104 | /* OBJECT IDENTIFIER id-pkdhkeydata ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(2) } */ |
105 | extern ASN1EXP const heim_oid asn1_oid_id_pkdhkeydata; |
106 | #define ASN1_OID_ID_PKDHKEYDATA (&asn1_oid_id_pkdhkeydata) |
107 | |
108 | /* OBJECT IDENTIFIER id-pkrkeydata ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(3) } */ |
109 | extern ASN1EXP const heim_oid asn1_oid_id_pkrkeydata; |
110 | #define ASN1_OID_ID_PKRKEYDATA (&asn1_oid_id_pkrkeydata) |
111 | |
112 | /* OBJECT IDENTIFIER id-pkekuoid ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(4) } */ |
113 | extern ASN1EXP const heim_oid asn1_oid_id_pkekuoid; |
114 | #define ASN1_OID_ID_PKEKUOID (&asn1_oid_id_pkekuoid) |
115 | |
116 | /* OBJECT IDENTIFIER id-pkkdcekuoid ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(5) } */ |
117 | extern ASN1EXP const heim_oid asn1_oid_id_pkkdcekuoid; |
118 | #define ASN1_OID_ID_PKKDCEKUOID (&asn1_oid_id_pkkdcekuoid) |
119 | |
120 | /* OBJECT IDENTIFIER id-apple-system-id ::= { label-less(1) label-less(2) label-less(840) label-less(113635) label-less(100) label-less(4) label-less(4) } */ |
121 | extern ASN1EXP const heim_oid asn1_oid_id_apple_system_id; |
122 | #define ASN1_OID_ID_APPLE_SYSTEM_ID (&asn1_oid_id_apple_system_id) |
123 | |
124 | /* OBJECT IDENTIFIER id-pkinit-kdf ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(6) } */ |
125 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_kdf; |
126 | #define ASN1_OID_ID_PKINIT_KDF (&asn1_oid_id_pkinit_kdf) |
127 | |
128 | /* OBJECT IDENTIFIER id-pkinit-kdf-ah-sha1 ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(6) label-less(1) } */ |
129 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_kdf_ah_sha1; |
130 | #define ASN1_OID_ID_PKINIT_KDF_AH_SHA1 (&asn1_oid_id_pkinit_kdf_ah_sha1) |
131 | |
132 | /* OBJECT IDENTIFIER id-pkinit-kdf-ah-sha256 ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(6) label-less(2) } */ |
133 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_kdf_ah_sha256; |
134 | #define ASN1_OID_ID_PKINIT_KDF_AH_SHA256 (&asn1_oid_id_pkinit_kdf_ah_sha256) |
135 | |
136 | /* OBJECT IDENTIFIER id-pkinit-kdf-ah-sha512 ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) pkinit(3) label-less(6) label-less(3) } */ |
137 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_kdf_ah_sha512; |
138 | #define ASN1_OID_ID_PKINIT_KDF_AH_SHA512 (&asn1_oid_id_pkinit_kdf_ah_sha512) |
139 | |
140 | /* OBJECT IDENTIFIER id-pkinit-san ::= { iso(1) org(3) dod(6) internet(1) security(5) kerberosv5(2) x509-sanan(2) } */ |
141 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_san; |
142 | #define ASN1_OID_ID_PKINIT_SAN (&asn1_oid_id_pkinit_san) |
143 | |
144 | /* OBJECT IDENTIFIER id-pkinit-ms-eku ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) microsoft(311) label-less(20) label-less(2) label-less(2) } */ |
145 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_ms_eku; |
146 | #define ASN1_OID_ID_PKINIT_MS_EKU (&asn1_oid_id_pkinit_ms_eku) |
147 | |
148 | /* OBJECT IDENTIFIER id-pkinit-ms-san ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprise(1) microsoft(311) label-less(20) label-less(2) label-less(3) } */ |
149 | extern ASN1EXP const heim_oid asn1_oid_id_pkinit_ms_san; |
150 | #define ASN1_OID_ID_PKINIT_MS_SAN (&asn1_oid_id_pkinit_ms_san) |
151 | |
152 | /* |
153 | MS-UPN-SAN ::= UTF8String |
154 | */ |
155 | |
156 | typedef heim_utf8_string MS_UPN_SAN; |
157 | |
158 | ASN1EXP int ASN1CALL decode_MS_UPN_SAN(const unsigned char *, size_t, MS_UPN_SAN *, size_t *); |
159 | ASN1EXP int ASN1CALL encode_MS_UPN_SAN(unsigned char *, size_t, const MS_UPN_SAN *, size_t *); |
160 | ASN1EXP size_t ASN1CALL length_MS_UPN_SAN(const MS_UPN_SAN *); |
161 | ASN1EXP int ASN1CALL copy_MS_UPN_SAN (const MS_UPN_SAN *, MS_UPN_SAN *); |
162 | ASN1EXP void ASN1CALL free_MS_UPN_SAN (MS_UPN_SAN *); |
163 | |
164 | |
165 | enum { pa_pk_as_req = 16 }; |
166 | |
167 | enum { pa_pk_as_rep = 17 }; |
168 | |
169 | enum { td_trusted_certifiers = 104 }; |
170 | |
171 | enum { td_invalid_certificates = 105 }; |
172 | |
173 | enum { td_dh_parameters = 109 }; |
174 | |
175 | /* |
176 | DHNonce ::= OCTET STRING |
177 | */ |
178 | |
179 | typedef heim_octet_string DHNonce; |
180 | |
181 | ASN1EXP int ASN1CALL decode_DHNonce(const unsigned char *, size_t, DHNonce *, size_t *); |
182 | ASN1EXP int ASN1CALL encode_DHNonce(unsigned char *, size_t, const DHNonce *, size_t *); |
183 | ASN1EXP size_t ASN1CALL length_DHNonce(const DHNonce *); |
184 | ASN1EXP int ASN1CALL copy_DHNonce (const DHNonce *, DHNonce *); |
185 | ASN1EXP void ASN1CALL free_DHNonce (DHNonce *); |
186 | |
187 | |
188 | /* |
189 | KDFAlgorithmId ::= SEQUENCE { |
190 | kdf-id [0] OBJECT IDENTIFIER, |
191 | ..., |
192 | } |
193 | */ |
194 | |
195 | typedef struct KDFAlgorithmId { |
196 | heim_oid kdf_id; |
197 | } KDFAlgorithmId; |
198 | |
199 | ASN1EXP int ASN1CALL decode_KDFAlgorithmId(const unsigned char *, size_t, KDFAlgorithmId *, size_t *); |
200 | ASN1EXP int ASN1CALL encode_KDFAlgorithmId(unsigned char *, size_t, const KDFAlgorithmId *, size_t *); |
201 | ASN1EXP size_t ASN1CALL length_KDFAlgorithmId(const KDFAlgorithmId *); |
202 | ASN1EXP int ASN1CALL copy_KDFAlgorithmId (const KDFAlgorithmId *, KDFAlgorithmId *); |
203 | ASN1EXP void ASN1CALL free_KDFAlgorithmId (KDFAlgorithmId *); |
204 | |
205 | |
206 | /* |
207 | TrustedCA ::= SEQUENCE { |
208 | caName [0] IMPLICIT OCTET STRING, |
209 | certificateSerialNumber [1] INTEGER OPTIONAL, |
210 | subjectKeyIdentifier [2] OCTET STRING OPTIONAL, |
211 | ..., |
212 | } |
213 | */ |
214 | |
215 | typedef struct TrustedCA { |
216 | heim_octet_string caName; |
217 | heim_integer *certificateSerialNumber; |
218 | heim_octet_string *subjectKeyIdentifier; |
219 | } TrustedCA; |
220 | |
221 | ASN1EXP int ASN1CALL decode_TrustedCA(const unsigned char *, size_t, TrustedCA *, size_t *); |
222 | ASN1EXP int ASN1CALL encode_TrustedCA(unsigned char *, size_t, const TrustedCA *, size_t *); |
223 | ASN1EXP size_t ASN1CALL length_TrustedCA(const TrustedCA *); |
224 | ASN1EXP int ASN1CALL copy_TrustedCA (const TrustedCA *, TrustedCA *); |
225 | ASN1EXP void ASN1CALL free_TrustedCA (TrustedCA *); |
226 | |
227 | |
228 | /* |
229 | ExternalPrincipalIdentifier ::= SEQUENCE { |
230 | subjectName [0] IMPLICIT OCTET STRING OPTIONAL, |
231 | issuerAndSerialNumber [1] IMPLICIT OCTET STRING OPTIONAL, |
232 | subjectKeyIdentifier [2] IMPLICIT OCTET STRING OPTIONAL, |
233 | ..., |
234 | } |
235 | */ |
236 | |
237 | typedef struct ExternalPrincipalIdentifier { |
238 | heim_octet_string *subjectName; |
239 | heim_octet_string *issuerAndSerialNumber; |
240 | heim_octet_string *subjectKeyIdentifier; |
241 | } ExternalPrincipalIdentifier; |
242 | |
243 | ASN1EXP int ASN1CALL decode_ExternalPrincipalIdentifier(const unsigned char *, size_t, ExternalPrincipalIdentifier *, size_t *); |
244 | ASN1EXP int ASN1CALL encode_ExternalPrincipalIdentifier(unsigned char *, size_t, const ExternalPrincipalIdentifier *, size_t *); |
245 | ASN1EXP size_t ASN1CALL length_ExternalPrincipalIdentifier(const ExternalPrincipalIdentifier *); |
246 | ASN1EXP int ASN1CALL copy_ExternalPrincipalIdentifier (const ExternalPrincipalIdentifier *, ExternalPrincipalIdentifier *); |
247 | ASN1EXP void ASN1CALL free_ExternalPrincipalIdentifier (ExternalPrincipalIdentifier *); |
248 | |
249 | |
250 | /* |
251 | ExternalPrincipalIdentifiers ::= SEQUENCE OF ExternalPrincipalIdentifier |
252 | */ |
253 | |
254 | typedef struct ExternalPrincipalIdentifiers { |
255 | unsigned int len; |
256 | ExternalPrincipalIdentifier *val; |
257 | } ExternalPrincipalIdentifiers; |
258 | |
259 | ASN1EXP int ASN1CALL decode_ExternalPrincipalIdentifiers(const unsigned char *, size_t, ExternalPrincipalIdentifiers *, size_t *); |
260 | ASN1EXP int ASN1CALL encode_ExternalPrincipalIdentifiers(unsigned char *, size_t, const ExternalPrincipalIdentifiers *, size_t *); |
261 | ASN1EXP size_t ASN1CALL length_ExternalPrincipalIdentifiers(const ExternalPrincipalIdentifiers *); |
262 | ASN1EXP int ASN1CALL copy_ExternalPrincipalIdentifiers (const ExternalPrincipalIdentifiers *, ExternalPrincipalIdentifiers *); |
263 | ASN1EXP void ASN1CALL free_ExternalPrincipalIdentifiers (ExternalPrincipalIdentifiers *); |
264 | |
265 | |
266 | /* |
267 | PA-PK-AS-REQ ::= SEQUENCE { |
268 | signedAuthPack [0] IMPLICIT OCTET STRING, |
269 | trustedCertifiers [1] ExternalPrincipalIdentifiers OPTIONAL, |
270 | kdcPkId [2] IMPLICIT OCTET STRING OPTIONAL, |
271 | ..., |
272 | } |
273 | */ |
274 | |
275 | typedef struct PA_PK_AS_REQ { |
276 | heim_octet_string signedAuthPack; |
277 | ExternalPrincipalIdentifiers *trustedCertifiers; |
278 | heim_octet_string *kdcPkId; |
279 | } PA_PK_AS_REQ; |
280 | |
281 | ASN1EXP int ASN1CALL decode_PA_PK_AS_REQ(const unsigned char *, size_t, PA_PK_AS_REQ *, size_t *); |
282 | ASN1EXP int ASN1CALL encode_PA_PK_AS_REQ(unsigned char *, size_t, const PA_PK_AS_REQ *, size_t *); |
283 | ASN1EXP size_t ASN1CALL length_PA_PK_AS_REQ(const PA_PK_AS_REQ *); |
284 | ASN1EXP int ASN1CALL copy_PA_PK_AS_REQ (const PA_PK_AS_REQ *, PA_PK_AS_REQ *); |
285 | ASN1EXP void ASN1CALL free_PA_PK_AS_REQ (PA_PK_AS_REQ *); |
286 | |
287 | |
288 | /* |
289 | PKAuthenticator ::= SEQUENCE { |
290 | cusec [0] INTEGER, |
291 | ctime [1] KerberosTime, |
292 | nonce [2] INTEGER (0..4294967295), |
293 | paChecksum [3] OCTET STRING OPTIONAL, |
294 | ..., |
295 | } |
296 | */ |
297 | |
298 | typedef struct PKAuthenticator { |
299 | heim_integer cusec; |
300 | KerberosTime ctime; |
301 | unsigned int nonce; |
302 | heim_octet_string *paChecksum; |
303 | } PKAuthenticator; |
304 | |
305 | ASN1EXP int ASN1CALL decode_PKAuthenticator(const unsigned char *, size_t, PKAuthenticator *, size_t *); |
306 | ASN1EXP int ASN1CALL encode_PKAuthenticator(unsigned char *, size_t, const PKAuthenticator *, size_t *); |
307 | ASN1EXP size_t ASN1CALL length_PKAuthenticator(const PKAuthenticator *); |
308 | ASN1EXP int ASN1CALL copy_PKAuthenticator (const PKAuthenticator *, PKAuthenticator *); |
309 | ASN1EXP void ASN1CALL free_PKAuthenticator (PKAuthenticator *); |
310 | |
311 | |
312 | /* |
313 | AuthPack ::= SEQUENCE { |
314 | pkAuthenticator [0] PKAuthenticator, |
315 | clientPublicValue [1] SubjectPublicKeyInfo OPTIONAL, |
316 | supportedCMSTypes [2] SEQUENCE OF AlgorithmIdentifier OPTIONAL, |
317 | clientDHNonce [3] DHNonce OPTIONAL, |
318 | ..., |
319 | supportedKDFs [4] SEQUENCE OF KDFAlgorithmId OPTIONAL, |
320 | ..., |
321 | } |
322 | */ |
323 | |
324 | typedef struct AuthPack { |
325 | PKAuthenticator pkAuthenticator; |
326 | SubjectPublicKeyInfo *clientPublicValue; |
327 | struct AuthPack_supportedCMSTypes { |
328 | unsigned int len; |
329 | AlgorithmIdentifier *val; |
330 | } *supportedCMSTypes; |
331 | DHNonce *clientDHNonce; |
332 | struct AuthPack_supportedKDFs { |
333 | unsigned int len; |
334 | KDFAlgorithmId *val; |
335 | } *supportedKDFs; |
336 | } AuthPack; |
337 | |
338 | ASN1EXP int ASN1CALL decode_AuthPack(const unsigned char *, size_t, AuthPack *, size_t *); |
339 | ASN1EXP int ASN1CALL encode_AuthPack(unsigned char *, size_t, const AuthPack *, size_t *); |
340 | ASN1EXP size_t ASN1CALL length_AuthPack(const AuthPack *); |
341 | ASN1EXP int ASN1CALL copy_AuthPack (const AuthPack *, AuthPack *); |
342 | ASN1EXP void ASN1CALL free_AuthPack (AuthPack *); |
343 | |
344 | |
345 | /* |
346 | TD-TRUSTED-CERTIFIERS ::= ExternalPrincipalIdentifiers |
347 | */ |
348 | |
349 | typedef ExternalPrincipalIdentifiers TD_TRUSTED_CERTIFIERS; |
350 | |
351 | ASN1EXP int ASN1CALL decode_TD_TRUSTED_CERTIFIERS(const unsigned char *, size_t, TD_TRUSTED_CERTIFIERS *, size_t *); |
352 | ASN1EXP int ASN1CALL encode_TD_TRUSTED_CERTIFIERS(unsigned char *, size_t, const TD_TRUSTED_CERTIFIERS *, size_t *); |
353 | ASN1EXP size_t ASN1CALL length_TD_TRUSTED_CERTIFIERS(const TD_TRUSTED_CERTIFIERS *); |
354 | ASN1EXP int ASN1CALL copy_TD_TRUSTED_CERTIFIERS (const TD_TRUSTED_CERTIFIERS *, TD_TRUSTED_CERTIFIERS *); |
355 | ASN1EXP void ASN1CALL free_TD_TRUSTED_CERTIFIERS (TD_TRUSTED_CERTIFIERS *); |
356 | |
357 | |
358 | /* |
359 | TD-INVALID-CERTIFICATES ::= ExternalPrincipalIdentifiers |
360 | */ |
361 | |
362 | typedef ExternalPrincipalIdentifiers TD_INVALID_CERTIFICATES; |
363 | |
364 | ASN1EXP int ASN1CALL decode_TD_INVALID_CERTIFICATES(const unsigned char *, size_t, TD_INVALID_CERTIFICATES *, size_t *); |
365 | ASN1EXP int ASN1CALL encode_TD_INVALID_CERTIFICATES(unsigned char *, size_t, const TD_INVALID_CERTIFICATES *, size_t *); |
366 | ASN1EXP size_t ASN1CALL length_TD_INVALID_CERTIFICATES(const TD_INVALID_CERTIFICATES *); |
367 | ASN1EXP int ASN1CALL copy_TD_INVALID_CERTIFICATES (const TD_INVALID_CERTIFICATES *, TD_INVALID_CERTIFICATES *); |
368 | ASN1EXP void ASN1CALL free_TD_INVALID_CERTIFICATES (TD_INVALID_CERTIFICATES *); |
369 | |
370 | |
371 | /* |
372 | KRB5PrincipalName ::= SEQUENCE { |
373 | realm [0] Realm, |
374 | principalName [1] PrincipalName, |
375 | } |
376 | */ |
377 | |
378 | typedef struct KRB5PrincipalName { |
379 | Realm realm; |
380 | PrincipalName principalName; |
381 | } KRB5PrincipalName; |
382 | |
383 | ASN1EXP int ASN1CALL decode_KRB5PrincipalName(const unsigned char *, size_t, KRB5PrincipalName *, size_t *); |
384 | ASN1EXP int ASN1CALL encode_KRB5PrincipalName(unsigned char *, size_t, const KRB5PrincipalName *, size_t *); |
385 | ASN1EXP size_t ASN1CALL length_KRB5PrincipalName(const KRB5PrincipalName *); |
386 | ASN1EXP int ASN1CALL copy_KRB5PrincipalName (const KRB5PrincipalName *, KRB5PrincipalName *); |
387 | ASN1EXP void ASN1CALL free_KRB5PrincipalName (KRB5PrincipalName *); |
388 | |
389 | |
390 | /* |
391 | AD-INITIAL-VERIFIED-CAS ::= SEQUENCE OF ExternalPrincipalIdentifier |
392 | */ |
393 | |
394 | typedef struct AD_INITIAL_VERIFIED_CAS { |
395 | unsigned int len; |
396 | ExternalPrincipalIdentifier *val; |
397 | } AD_INITIAL_VERIFIED_CAS; |
398 | |
399 | ASN1EXP int ASN1CALL decode_AD_INITIAL_VERIFIED_CAS(const unsigned char *, size_t, AD_INITIAL_VERIFIED_CAS *, size_t *); |
400 | ASN1EXP int ASN1CALL encode_AD_INITIAL_VERIFIED_CAS(unsigned char *, size_t, const AD_INITIAL_VERIFIED_CAS *, size_t *); |
401 | ASN1EXP size_t ASN1CALL length_AD_INITIAL_VERIFIED_CAS(const AD_INITIAL_VERIFIED_CAS *); |
402 | ASN1EXP int ASN1CALL copy_AD_INITIAL_VERIFIED_CAS (const AD_INITIAL_VERIFIED_CAS *, AD_INITIAL_VERIFIED_CAS *); |
403 | ASN1EXP void ASN1CALL free_AD_INITIAL_VERIFIED_CAS (AD_INITIAL_VERIFIED_CAS *); |
404 | |
405 | |
406 | /* |
407 | DHRepInfo ::= SEQUENCE { |
408 | dhSignedData [0] IMPLICIT OCTET STRING, |
409 | serverDHNonce [1] DHNonce OPTIONAL, |
410 | ..., |
411 | kdf [2] KDFAlgorithmId OPTIONAL, |
412 | ..., |
413 | } |
414 | */ |
415 | |
416 | typedef struct DHRepInfo { |
417 | heim_octet_string dhSignedData; |
418 | DHNonce *serverDHNonce; |
419 | KDFAlgorithmId *kdf; |
420 | } DHRepInfo; |
421 | |
422 | ASN1EXP int ASN1CALL decode_DHRepInfo(const unsigned char *, size_t, DHRepInfo *, size_t *); |
423 | ASN1EXP int ASN1CALL encode_DHRepInfo(unsigned char *, size_t, const DHRepInfo *, size_t *); |
424 | ASN1EXP size_t ASN1CALL length_DHRepInfo(const DHRepInfo *); |
425 | ASN1EXP int ASN1CALL copy_DHRepInfo (const DHRepInfo *, DHRepInfo *); |
426 | ASN1EXP void ASN1CALL free_DHRepInfo (DHRepInfo *); |
427 | |
428 | |
429 | /* |
430 | PA-PK-AS-REP ::= CHOICE { |
431 | dhInfo [0] DHRepInfo, |
432 | encKeyPack [1] IMPLICIT OCTET STRING, |
433 | ..., |
434 | } |
435 | */ |
436 | |
437 | typedef struct PA_PK_AS_REP { |
438 | enum PA_PK_AS_REP_enum { |
439 | choice_PA_PK_AS_REP_asn1_ellipsis = 0, |
440 | choice_PA_PK_AS_REP_dhInfo, |
441 | choice_PA_PK_AS_REP_encKeyPack |
442 | /* ... */ |
443 | } element; |
444 | union { |
445 | DHRepInfo dhInfo; |
446 | heim_octet_string encKeyPack; |
447 | heim_octet_string asn1_ellipsis; |
448 | } u; |
449 | } PA_PK_AS_REP; |
450 | |
451 | ASN1EXP int ASN1CALL decode_PA_PK_AS_REP(const unsigned char *, size_t, PA_PK_AS_REP *, size_t *); |
452 | ASN1EXP int ASN1CALL encode_PA_PK_AS_REP(unsigned char *, size_t, const PA_PK_AS_REP *, size_t *); |
453 | ASN1EXP size_t ASN1CALL length_PA_PK_AS_REP(const PA_PK_AS_REP *); |
454 | ASN1EXP int ASN1CALL copy_PA_PK_AS_REP (const PA_PK_AS_REP *, PA_PK_AS_REP *); |
455 | ASN1EXP void ASN1CALL free_PA_PK_AS_REP (PA_PK_AS_REP *); |
456 | |
457 | |
458 | /* |
459 | KDCDHKeyInfo ::= SEQUENCE { |
460 | subjectPublicKey [0] BIT STRING { |
461 | }, |
462 | nonce [1] INTEGER (0..4294967295), |
463 | dhKeyExpiration [2] KerberosTime OPTIONAL, |
464 | ..., |
465 | } |
466 | */ |
467 | |
468 | typedef struct KDCDHKeyInfo { |
469 | heim_bit_string subjectPublicKey; |
470 | unsigned int nonce; |
471 | KerberosTime *dhKeyExpiration; |
472 | } KDCDHKeyInfo; |
473 | |
474 | ASN1EXP int ASN1CALL decode_KDCDHKeyInfo(const unsigned char *, size_t, KDCDHKeyInfo *, size_t *); |
475 | ASN1EXP int ASN1CALL encode_KDCDHKeyInfo(unsigned char *, size_t, const KDCDHKeyInfo *, size_t *); |
476 | ASN1EXP size_t ASN1CALL length_KDCDHKeyInfo(const KDCDHKeyInfo *); |
477 | ASN1EXP int ASN1CALL copy_KDCDHKeyInfo (const KDCDHKeyInfo *, KDCDHKeyInfo *); |
478 | ASN1EXP void ASN1CALL free_KDCDHKeyInfo (KDCDHKeyInfo *); |
479 | |
480 | |
481 | /* |
482 | ReplyKeyPack ::= SEQUENCE { |
483 | replyKey [0] EncryptionKey, |
484 | asChecksum [1] Checksum, |
485 | ..., |
486 | } |
487 | */ |
488 | |
489 | typedef struct ReplyKeyPack { |
490 | EncryptionKey replyKey; |
491 | Checksum asChecksum; |
492 | } ReplyKeyPack; |
493 | |
494 | ASN1EXP int ASN1CALL decode_ReplyKeyPack(const unsigned char *, size_t, ReplyKeyPack *, size_t *); |
495 | ASN1EXP int ASN1CALL encode_ReplyKeyPack(unsigned char *, size_t, const ReplyKeyPack *, size_t *); |
496 | ASN1EXP size_t ASN1CALL length_ReplyKeyPack(const ReplyKeyPack *); |
497 | ASN1EXP int ASN1CALL copy_ReplyKeyPack (const ReplyKeyPack *, ReplyKeyPack *); |
498 | ASN1EXP void ASN1CALL free_ReplyKeyPack (ReplyKeyPack *); |
499 | |
500 | |
501 | /* |
502 | TD-DH-PARAMETERS ::= SEQUENCE OF AlgorithmIdentifier |
503 | */ |
504 | |
505 | typedef struct TD_DH_PARAMETERS { |
506 | unsigned int len; |
507 | AlgorithmIdentifier *val; |
508 | } TD_DH_PARAMETERS; |
509 | |
510 | ASN1EXP int ASN1CALL decode_TD_DH_PARAMETERS(const unsigned char *, size_t, TD_DH_PARAMETERS *, size_t *); |
511 | ASN1EXP int ASN1CALL encode_TD_DH_PARAMETERS(unsigned char *, size_t, const TD_DH_PARAMETERS *, size_t *); |
512 | ASN1EXP size_t ASN1CALL length_TD_DH_PARAMETERS(const TD_DH_PARAMETERS *); |
513 | ASN1EXP int ASN1CALL copy_TD_DH_PARAMETERS (const TD_DH_PARAMETERS *, TD_DH_PARAMETERS *); |
514 | ASN1EXP void ASN1CALL free_TD_DH_PARAMETERS (TD_DH_PARAMETERS *); |
515 | |
516 | |
517 | /* |
518 | PKAuthenticator-Win2k ::= SEQUENCE { |
519 | kdcName [0] PrincipalName, |
520 | kdcRealm [1] Realm, |
521 | cusec [2] INTEGER (0..4294967295), |
522 | ctime [3] KerberosTime, |
523 | nonce [4] INTEGER (-2147483648..2147483647), |
524 | } |
525 | */ |
526 | |
527 | typedef struct PKAuthenticator_Win2k { |
528 | PrincipalName kdcName; |
529 | Realm kdcRealm; |
530 | unsigned int cusec; |
531 | KerberosTime ctime; |
532 | int nonce; |
533 | } PKAuthenticator_Win2k; |
534 | |
535 | ASN1EXP int ASN1CALL decode_PKAuthenticator_Win2k(const unsigned char *, size_t, PKAuthenticator_Win2k *, size_t *); |
536 | ASN1EXP int ASN1CALL encode_PKAuthenticator_Win2k(unsigned char *, size_t, const PKAuthenticator_Win2k *, size_t *); |
537 | ASN1EXP size_t ASN1CALL length_PKAuthenticator_Win2k(const PKAuthenticator_Win2k *); |
538 | ASN1EXP int ASN1CALL copy_PKAuthenticator_Win2k (const PKAuthenticator_Win2k *, PKAuthenticator_Win2k *); |
539 | ASN1EXP void ASN1CALL free_PKAuthenticator_Win2k (PKAuthenticator_Win2k *); |
540 | |
541 | |
542 | /* |
543 | AuthPack-Win2k ::= SEQUENCE { |
544 | pkAuthenticator [0] PKAuthenticator-Win2k, |
545 | clientPublicValue [1] SubjectPublicKeyInfo OPTIONAL, |
546 | } |
547 | */ |
548 | |
549 | typedef struct AuthPack_Win2k { |
550 | PKAuthenticator_Win2k pkAuthenticator; |
551 | SubjectPublicKeyInfo *clientPublicValue; |
552 | } AuthPack_Win2k; |
553 | |
554 | ASN1EXP int ASN1CALL decode_AuthPack_Win2k(const unsigned char *, size_t, AuthPack_Win2k *, size_t *); |
555 | ASN1EXP int ASN1CALL encode_AuthPack_Win2k(unsigned char *, size_t, const AuthPack_Win2k *, size_t *); |
556 | ASN1EXP size_t ASN1CALL length_AuthPack_Win2k(const AuthPack_Win2k *); |
557 | ASN1EXP int ASN1CALL copy_AuthPack_Win2k (const AuthPack_Win2k *, AuthPack_Win2k *); |
558 | ASN1EXP void ASN1CALL free_AuthPack_Win2k (AuthPack_Win2k *); |
559 | |
560 | |
561 | /* |
562 | TrustedCA-Win2k ::= CHOICE { |
563 | caName [1] heim_any, |
564 | issuerAndSerial [2] IssuerAndSerialNumber, |
565 | } |
566 | */ |
567 | |
568 | typedef struct TrustedCA_Win2k { |
569 | enum TrustedCA_Win2k_enum { |
570 | choice_TrustedCA_Win2k_caName = 1, |
571 | choice_TrustedCA_Win2k_issuerAndSerial |
572 | } element; |
573 | union { |
574 | heim_any caName; |
575 | IssuerAndSerialNumber issuerAndSerial; |
576 | } u; |
577 | } TrustedCA_Win2k; |
578 | |
579 | ASN1EXP int ASN1CALL decode_TrustedCA_Win2k(const unsigned char *, size_t, TrustedCA_Win2k *, size_t *); |
580 | ASN1EXP int ASN1CALL encode_TrustedCA_Win2k(unsigned char *, size_t, const TrustedCA_Win2k *, size_t *); |
581 | ASN1EXP size_t ASN1CALL length_TrustedCA_Win2k(const TrustedCA_Win2k *); |
582 | ASN1EXP int ASN1CALL copy_TrustedCA_Win2k (const TrustedCA_Win2k *, TrustedCA_Win2k *); |
583 | ASN1EXP void ASN1CALL free_TrustedCA_Win2k (TrustedCA_Win2k *); |
584 | |
585 | |
586 | /* |
587 | PA-PK-AS-REQ-Win2k ::= SEQUENCE { |
588 | signed-auth-pack [0] IMPLICIT OCTET STRING, |
589 | trusted-certifiers [2] SEQUENCE OF TrustedCA-Win2k OPTIONAL, |
590 | kdc-cert [3] IMPLICIT OCTET STRING OPTIONAL, |
591 | encryption-cert [4] IMPLICIT OCTET STRING OPTIONAL, |
592 | } |
593 | */ |
594 | |
595 | typedef struct PA_PK_AS_REQ_Win2k { |
596 | heim_octet_string signed_auth_pack; |
597 | struct PA_PK_AS_REQ_Win2k_trusted_certifiers { |
598 | unsigned int len; |
599 | TrustedCA_Win2k *val; |
600 | } *trusted_certifiers; |
601 | heim_octet_string *kdc_cert; |
602 | heim_octet_string *encryption_cert; |
603 | } PA_PK_AS_REQ_Win2k; |
604 | |
605 | ASN1EXP int ASN1CALL decode_PA_PK_AS_REQ_Win2k(const unsigned char *, size_t, PA_PK_AS_REQ_Win2k *, size_t *); |
606 | ASN1EXP int ASN1CALL encode_PA_PK_AS_REQ_Win2k(unsigned char *, size_t, const PA_PK_AS_REQ_Win2k *, size_t *); |
607 | ASN1EXP size_t ASN1CALL length_PA_PK_AS_REQ_Win2k(const PA_PK_AS_REQ_Win2k *); |
608 | ASN1EXP int ASN1CALL copy_PA_PK_AS_REQ_Win2k (const PA_PK_AS_REQ_Win2k *, PA_PK_AS_REQ_Win2k *); |
609 | ASN1EXP void ASN1CALL free_PA_PK_AS_REQ_Win2k (PA_PK_AS_REQ_Win2k *); |
610 | |
611 | |
612 | /* |
613 | PA-PK-AS-REP-Win2k ::= CHOICE { |
614 | dhSignedData [0] IMPLICIT OCTET STRING, |
615 | encKeyPack [1] IMPLICIT OCTET STRING, |
616 | } |
617 | */ |
618 | |
619 | typedef struct PA_PK_AS_REP_Win2k { |
620 | enum PA_PK_AS_REP_Win2k_enum { |
621 | choice_PA_PK_AS_REP_Win2k_dhSignedData = 1, |
622 | choice_PA_PK_AS_REP_Win2k_encKeyPack |
623 | } element; |
624 | union { |
625 | heim_octet_string dhSignedData; |
626 | heim_octet_string encKeyPack; |
627 | } u; |
628 | } PA_PK_AS_REP_Win2k; |
629 | |
630 | ASN1EXP int ASN1CALL decode_PA_PK_AS_REP_Win2k(const unsigned char *, size_t, PA_PK_AS_REP_Win2k *, size_t *); |
631 | ASN1EXP int ASN1CALL encode_PA_PK_AS_REP_Win2k(unsigned char *, size_t, const PA_PK_AS_REP_Win2k *, size_t *); |
632 | ASN1EXP size_t ASN1CALL length_PA_PK_AS_REP_Win2k(const PA_PK_AS_REP_Win2k *); |
633 | ASN1EXP int ASN1CALL copy_PA_PK_AS_REP_Win2k (const PA_PK_AS_REP_Win2k *, PA_PK_AS_REP_Win2k *); |
634 | ASN1EXP void ASN1CALL free_PA_PK_AS_REP_Win2k (PA_PK_AS_REP_Win2k *); |
635 | |
636 | |
637 | /* |
638 | KDCDHKeyInfo-Win2k ::= SEQUENCE { |
639 | nonce [0] INTEGER (-2147483648..2147483647), |
640 | subjectPublicKey [2] BIT STRING { |
641 | }, |
642 | } |
643 | */ |
644 | |
645 | typedef struct KDCDHKeyInfo_Win2k { |
646 | int nonce; |
647 | heim_bit_string subjectPublicKey; |
648 | } KDCDHKeyInfo_Win2k; |
649 | |
650 | ASN1EXP int ASN1CALL decode_KDCDHKeyInfo_Win2k(const unsigned char *, size_t, KDCDHKeyInfo_Win2k *, size_t *); |
651 | ASN1EXP int ASN1CALL encode_KDCDHKeyInfo_Win2k(unsigned char *, size_t, const KDCDHKeyInfo_Win2k *, size_t *); |
652 | ASN1EXP size_t ASN1CALL length_KDCDHKeyInfo_Win2k(const KDCDHKeyInfo_Win2k *); |
653 | ASN1EXP int ASN1CALL copy_KDCDHKeyInfo_Win2k (const KDCDHKeyInfo_Win2k *, KDCDHKeyInfo_Win2k *); |
654 | ASN1EXP void ASN1CALL free_KDCDHKeyInfo_Win2k (KDCDHKeyInfo_Win2k *); |
655 | |
656 | |
657 | /* |
658 | ReplyKeyPack-Win2k ::= SEQUENCE { |
659 | replyKey [0] EncryptionKey, |
660 | nonce [1] INTEGER (-2147483648..2147483647), |
661 | ..., |
662 | } |
663 | */ |
664 | |
665 | typedef struct ReplyKeyPack_Win2k { |
666 | EncryptionKey replyKey; |
667 | int nonce; |
668 | } ReplyKeyPack_Win2k; |
669 | |
670 | ASN1EXP int ASN1CALL decode_ReplyKeyPack_Win2k(const unsigned char *, size_t, ReplyKeyPack_Win2k *, size_t *); |
671 | ASN1EXP int ASN1CALL encode_ReplyKeyPack_Win2k(unsigned char *, size_t, const ReplyKeyPack_Win2k *, size_t *); |
672 | ASN1EXP size_t ASN1CALL length_ReplyKeyPack_Win2k(const ReplyKeyPack_Win2k *); |
673 | ASN1EXP int ASN1CALL copy_ReplyKeyPack_Win2k (const ReplyKeyPack_Win2k *, ReplyKeyPack_Win2k *); |
674 | ASN1EXP void ASN1CALL free_ReplyKeyPack_Win2k (ReplyKeyPack_Win2k *); |
675 | |
676 | |
677 | /* |
678 | PA-PK-AS-REP-BTMM ::= SEQUENCE { |
679 | dhSignedData [0] heim_any OPTIONAL, |
680 | encKeyPack [1] heim_any OPTIONAL, |
681 | } |
682 | */ |
683 | |
684 | typedef struct PA_PK_AS_REP_BTMM { |
685 | heim_any *dhSignedData; |
686 | heim_any *encKeyPack; |
687 | } PA_PK_AS_REP_BTMM; |
688 | |
689 | ASN1EXP int ASN1CALL decode_PA_PK_AS_REP_BTMM(const unsigned char *, size_t, PA_PK_AS_REP_BTMM *, size_t *); |
690 | ASN1EXP int ASN1CALL encode_PA_PK_AS_REP_BTMM(unsigned char *, size_t, const PA_PK_AS_REP_BTMM *, size_t *); |
691 | ASN1EXP size_t ASN1CALL length_PA_PK_AS_REP_BTMM(const PA_PK_AS_REP_BTMM *); |
692 | ASN1EXP int ASN1CALL copy_PA_PK_AS_REP_BTMM (const PA_PK_AS_REP_BTMM *, PA_PK_AS_REP_BTMM *); |
693 | ASN1EXP void ASN1CALL free_PA_PK_AS_REP_BTMM (PA_PK_AS_REP_BTMM *); |
694 | |
695 | |
696 | /* |
697 | PkinitSP80056AOtherInfo ::= SEQUENCE { |
698 | algorithmID AlgorithmIdentifier, |
699 | partyUInfo [0] OCTET STRING, |
700 | partyVInfo [1] OCTET STRING, |
701 | suppPubInfo [2] OCTET STRING OPTIONAL, |
702 | suppPrivInfo [3] OCTET STRING OPTIONAL, |
703 | } |
704 | */ |
705 | |
706 | typedef struct PkinitSP80056AOtherInfo { |
707 | AlgorithmIdentifier algorithmID; |
708 | heim_octet_string partyUInfo; |
709 | heim_octet_string partyVInfo; |
710 | heim_octet_string *suppPubInfo; |
711 | heim_octet_string *suppPrivInfo; |
712 | } PkinitSP80056AOtherInfo; |
713 | |
714 | ASN1EXP int ASN1CALL decode_PkinitSP80056AOtherInfo(const unsigned char *, size_t, PkinitSP80056AOtherInfo *, size_t *); |
715 | ASN1EXP int ASN1CALL encode_PkinitSP80056AOtherInfo(unsigned char *, size_t, const PkinitSP80056AOtherInfo *, size_t *); |
716 | ASN1EXP size_t ASN1CALL length_PkinitSP80056AOtherInfo(const PkinitSP80056AOtherInfo *); |
717 | ASN1EXP int ASN1CALL copy_PkinitSP80056AOtherInfo (const PkinitSP80056AOtherInfo *, PkinitSP80056AOtherInfo *); |
718 | ASN1EXP void ASN1CALL free_PkinitSP80056AOtherInfo (PkinitSP80056AOtherInfo *); |
719 | |
720 | |
721 | /* |
722 | PkinitSuppPubInfo ::= SEQUENCE { |
723 | enctype [0] INTEGER (-2147483648..2147483647), |
724 | as-REQ [1] OCTET STRING, |
725 | pk-as-rep [2] OCTET STRING, |
726 | ticket [3] Ticket, |
727 | ..., |
728 | } |
729 | */ |
730 | |
731 | typedef struct PkinitSuppPubInfo { |
732 | int enctype; |
733 | heim_octet_string as_REQ; |
734 | heim_octet_string pk_as_rep; |
735 | Ticket ticket; |
736 | } PkinitSuppPubInfo; |
737 | |
738 | ASN1EXP int ASN1CALL decode_PkinitSuppPubInfo(const unsigned char *, size_t, PkinitSuppPubInfo *, size_t *); |
739 | ASN1EXP int ASN1CALL encode_PkinitSuppPubInfo(unsigned char *, size_t, const PkinitSuppPubInfo *, size_t *); |
740 | ASN1EXP size_t ASN1CALL length_PkinitSuppPubInfo(const PkinitSuppPubInfo *); |
741 | ASN1EXP int ASN1CALL copy_PkinitSuppPubInfo (const PkinitSuppPubInfo *, PkinitSuppPubInfo *); |
742 | ASN1EXP void ASN1CALL free_PkinitSuppPubInfo (PkinitSuppPubInfo *); |
743 | |
744 | |
745 | #endif /* __pkinit_asn1_h__ */ |
746 | |