Line data Source code
1 : /* Generated from /builds/eaglegai/samba/third_party/heimdal/lib/asn1/pkcs10.asn1 */
2 : /* Do not edit */
3 :
4 : #if defined(_WIN32) && !defined(ASN1_LIB)
5 : # error "ASN1_LIB must be defined"
6 : #endif
7 : #include <stdio.h>
8 : #include <stdlib.h>
9 : #include <time.h>
10 : #include <string.h>
11 : #include <errno.h>
12 : #include <limits.h>
13 : #include <krb5-types.h>
14 : #include "pkcs10_asn1.h"
15 : #include "pkcs10_asn1-priv.h"
16 : #include <asn1_err.h>
17 : #include <der.h>
18 : #include <asn1-template.h>
19 :
20 : #include <parse_units.h>
21 :
22 : static const struct asn1_type_func asn1_extern_Name = {
23 : (asn1_type_encode)encode_Name,
24 : (asn1_type_decode)decode_Name,
25 : (asn1_type_length)length_Name,
26 : (asn1_type_copy)copy_Name,
27 : (asn1_type_release)free_Name,
28 : (asn1_type_print)print_Name,
29 : sizeof(Name)
30 : };
31 : static const struct asn1_type_func asn1_extern_SubjectPublicKeyInfo = {
32 : (asn1_type_encode)encode_SubjectPublicKeyInfo,
33 : (asn1_type_decode)decode_SubjectPublicKeyInfo,
34 : (asn1_type_length)length_SubjectPublicKeyInfo,
35 : (asn1_type_copy)copy_SubjectPublicKeyInfo,
36 : (asn1_type_release)free_SubjectPublicKeyInfo,
37 : (asn1_type_print)print_SubjectPublicKeyInfo,
38 : sizeof(SubjectPublicKeyInfo)
39 : };
40 : static const struct asn1_type_func asn1_extern_AlgorithmIdentifier = {
41 : (asn1_type_encode)encode_AlgorithmIdentifier,
42 : (asn1_type_decode)decode_AlgorithmIdentifier,
43 : (asn1_type_length)length_AlgorithmIdentifier,
44 : (asn1_type_copy)copy_AlgorithmIdentifier,
45 : (asn1_type_release)free_AlgorithmIdentifier,
46 : (asn1_type_print)print_AlgorithmIdentifier,
47 : sizeof(AlgorithmIdentifier)
48 : };
49 : static const struct asn1_type_func asn1_extern_Attribute = {
50 : (asn1_type_encode)encode_Attribute,
51 : (asn1_type_decode)decode_Attribute,
52 : (asn1_type_length)length_Attribute,
53 : (asn1_type_copy)copy_Attribute,
54 : (asn1_type_release)free_Attribute,
55 : (asn1_type_print)print_Attribute,
56 : sizeof(Attribute)
57 : };
58 : static const struct asn1_type_func asn1_extern_Extensions = {
59 : (asn1_type_encode)encode_Extensions,
60 : (asn1_type_decode)decode_Extensions,
61 : (asn1_type_length)length_Extensions,
62 : (asn1_type_copy)copy_Extensions,
63 : (asn1_type_release)free_Extensions,
64 : (asn1_type_print)print_Extensions,
65 : sizeof(Extensions)
66 : };
67 : static const struct asn1_type_func asn1_extern_HEIM_ANY = {
68 : (asn1_type_encode)encode_HEIM_ANY,
69 : (asn1_type_decode)decode_HEIM_ANY,
70 : (asn1_type_length)length_HEIM_ANY,
71 : (asn1_type_copy)copy_HEIM_ANY,
72 : (asn1_type_release)free_HEIM_ANY,
73 : (asn1_type_print)print_HEIM_ANY,
74 : sizeof(HEIM_ANY)
75 : };
76 : extern const struct asn1_template asn1_PKCS10_Version[];
77 : extern const struct asn1_template asn1_PKCS10_Version[];
78 : extern const struct asn1_template asn1_CertificationRequestInfo[];
79 : extern const struct asn1_template asn1_CertificationRequest[];
80 : extern const struct asn1_template asn1_IOSCertificationRequestInfo[];
81 : extern const struct asn1_template asn1_IOSCertificationRequest[];
82 : static unsigned oid_id_pkcs9_extReq_copy_variable_num[7] = { 1, 2, 840, 113549, 1, 9, 14};
83 : const heim_oid asn1_oid_id_pkcs9_extReq_copy = { 7, oid_id_pkcs9_extReq_copy_variable_num };
84 :
85 : extern const struct asn1_template asn1_CRIExtensions[];
86 : extern const struct asn1_template asn1_CRIExtensions[];
87 : extern const struct asn1_template asn1_CRIAttributes[];
88 : extern const struct asn1_template asn1_CRIAttributeSet[];
89 : /* template_members: PKCS10_Version exp exp */
90 : const struct asn1_template asn1_PKCS10_Version_enum_names[] = {
91 : /* 0 */ { 0, 0, ((void *)(uintptr_t)1) },
92 : /* 1 */ { A1_OP_NAME, 0, "pkcs10-v1" }
93 : };
94 : /* generate_template_type: PKCS10_Version_tag__0 */
95 : const struct asn1_template asn1_PKCS10_Version_tag__0[] = {
96 : /* 0 */ { 0, sizeof(int), ((void *)(uintptr_t)1) },
97 : /* 1 */ { A1_PARSE_T(A1T_IMEMBER), 0, asn1_PKCS10_Version_enum_names }
98 : };
99 : /* generate_template_type: PKCS10_Version */
100 : const struct asn1_template asn1_PKCS10_Version[] = {
101 : /* 0 */ { 0, sizeof(PKCS10_Version), ((void *)(uintptr_t)1) },
102 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer), 0, asn1_PKCS10_Version_tag__0 }
103 : };
104 :
105 : int ASN1CALL
106 0 : decode_PKCS10_Version(const unsigned char *p, size_t len, PKCS10_Version *data, size_t *size)
107 : {
108 0 : memset(data, 0, sizeof(*data));
109 0 : return _asn1_decode_top(asn1_PKCS10_Version, 0|0, p, len, data, size);
110 : }
111 :
112 :
113 : int ASN1CALL
114 0 : encode_PKCS10_Version(unsigned char *p, size_t len, const PKCS10_Version *data, size_t *size)
115 : {
116 0 : return _asn1_encode(asn1_PKCS10_Version, p, len, data, size);
117 : }
118 :
119 :
120 : size_t ASN1CALL
121 0 : length_PKCS10_Version(const PKCS10_Version *data)
122 : {
123 0 : return _asn1_length(asn1_PKCS10_Version, data);
124 : }
125 :
126 :
127 : void ASN1CALL
128 0 : free_PKCS10_Version(PKCS10_Version *data)
129 : {
130 0 : _asn1_free_top(asn1_PKCS10_Version, data);
131 0 : }
132 :
133 :
134 : int ASN1CALL
135 0 : copy_PKCS10_Version(const PKCS10_Version *from, PKCS10_Version *to)
136 : {
137 0 : return _asn1_copy_top(asn1_PKCS10_Version, from, to);
138 : }
139 :
140 :
141 : char * ASN1CALL
142 0 : print_PKCS10_Version(const PKCS10_Version *data, int flags)
143 : {
144 0 : return _asn1_print_top(asn1_PKCS10_Version, flags, data);
145 : }
146 :
147 : /* template_members: CertificationRequestInfo exp exp */
148 : /* tsequence: members isstruct: 1 */
149 : /* template_members: CertificationRequestInfo exp imp */
150 : /* template_members: CertificationRequestInfo exp exp */
151 : /* generate_template_type: CertificationRequestInfo_attributes_0 */
152 : const struct asn1_template asn1_CertificationRequestInfo_attributes_0[] = {
153 : /* 0 */ { 0, sizeof(Attribute), ((void *)(uintptr_t)1) },
154 : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_Attribute}
155 : };
156 : /* generate_template_type: CertificationRequestInfo_tag_attributes_3 */
157 : const struct asn1_template asn1_CertificationRequestInfo_tag_attributes_3[] = {
158 : /* 0 */ { 0, sizeof(struct CertificationRequestInfo_attributes), ((void *)(uintptr_t)1) },
159 : /* 1 */ { A1_OP_SETOF, 0, asn1_CertificationRequestInfo_attributes_0 }
160 : };
161 : /* generate_template_type: CertificationRequestInfo_tag_attributes_2 */
162 : const struct asn1_template asn1_CertificationRequestInfo_tag_attributes_2[] = {
163 : /* 0 */ { 0, sizeof(struct CertificationRequestInfo_attributes), ((void *)(uintptr_t)1) },
164 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_CertificationRequestInfo_tag_attributes_3 }
165 : };
166 : /* generate_template_type: CertificationRequestInfo_tag__1 */
167 : const struct asn1_template asn1_CertificationRequestInfo_tag__1[] = {
168 : /* 0 */ { 0, sizeof(struct CertificationRequestInfo), ((void *)(uintptr_t)9) },
169 : /* 1 */ { A1_OP_TYPE , offsetof(struct CertificationRequestInfo, version), asn1_PKCS10_Version },
170 : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct CertificationRequestInfo, subject), &asn1_extern_Name},
171 : /* 3 */ { A1_OP_TYPE_EXTERN , offsetof(struct CertificationRequestInfo, subjectPKInfo), &asn1_extern_SubjectPublicKeyInfo},
172 : /* 4 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct CertificationRequestInfo, attributes), asn1_CertificationRequestInfo_tag_attributes_2 },
173 : /* 5 */ { A1_OP_NAME, 0, "CertificationRequestInfo" },
174 : /* 6 */ { A1_OP_NAME, 0, "version" },
175 : /* 7 */ { A1_OP_NAME, 0, "subject" },
176 : /* 8 */ { A1_OP_NAME, 0, "subjectPKInfo" },
177 : /* 9 */ { A1_OP_NAME, 0, "attributes" }
178 : };
179 : /* generate_template_type: CertificationRequestInfo */
180 : const struct asn1_template asn1_CertificationRequestInfo[] = {
181 : /* 0 */ { 0|A1_HF_PRESERVE, sizeof(CertificationRequestInfo), ((void *)(uintptr_t)1) },
182 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_CertificationRequestInfo_tag__1 }
183 : };
184 :
185 : int ASN1CALL
186 0 : decode_CertificationRequestInfo(const unsigned char *p, size_t len, CertificationRequestInfo *data, size_t *size)
187 : {
188 0 : memset(data, 0, sizeof(*data));
189 0 : return _asn1_decode_top(asn1_CertificationRequestInfo, 0|0, p, len, data, size);
190 : }
191 :
192 :
193 : int ASN1CALL
194 0 : encode_CertificationRequestInfo(unsigned char *p, size_t len, const CertificationRequestInfo *data, size_t *size)
195 : {
196 0 : return _asn1_encode(asn1_CertificationRequestInfo, p, len, data, size);
197 : }
198 :
199 :
200 : size_t ASN1CALL
201 0 : length_CertificationRequestInfo(const CertificationRequestInfo *data)
202 : {
203 0 : return _asn1_length(asn1_CertificationRequestInfo, data);
204 : }
205 :
206 :
207 : void ASN1CALL
208 0 : free_CertificationRequestInfo(CertificationRequestInfo *data)
209 : {
210 0 : _asn1_free_top(asn1_CertificationRequestInfo, data);
211 0 : }
212 :
213 :
214 : int ASN1CALL
215 0 : copy_CertificationRequestInfo(const CertificationRequestInfo *from, CertificationRequestInfo *to)
216 : {
217 0 : return _asn1_copy_top(asn1_CertificationRequestInfo, from, to);
218 : }
219 :
220 :
221 : char * ASN1CALL
222 0 : print_CertificationRequestInfo(const CertificationRequestInfo *data, int flags)
223 : {
224 0 : return _asn1_print_top(asn1_CertificationRequestInfo, flags, data);
225 : }
226 :
227 : /* template_members: CertificationRequest exp exp */
228 : /* tsequence: members isstruct: 1 */
229 : /* template_members: CertificationRequest exp exp */
230 : /* generate_template_type: CertificationRequest_tag_signature_5 */
231 : const struct asn1_template asn1_CertificationRequest_tag_signature_5[] = {
232 : /* 0 */ { 0, sizeof(CertificationRequest), ((void *)(uintptr_t)1) },
233 : /* 1 */ { A1_PARSE_T(A1T_HEIM_BIT_STRING), 0, NULL }
234 : };
235 : /* generate_template_type: CertificationRequest_tag__4 */
236 : const struct asn1_template asn1_CertificationRequest_tag__4[] = {
237 : /* 0 */ { 0, sizeof(struct CertificationRequest), ((void *)(uintptr_t)7) },
238 : /* 1 */ { A1_OP_TYPE , offsetof(struct CertificationRequest, certificationRequestInfo), asn1_CertificationRequestInfo },
239 : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct CertificationRequest, signatureAlgorithm), &asn1_extern_AlgorithmIdentifier},
240 : /* 3 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_BitString), offsetof(struct CertificationRequest, signature), asn1_CertificationRequest_tag_signature_5 },
241 : /* 4 */ { A1_OP_NAME, 0, "CertificationRequest" },
242 : /* 5 */ { A1_OP_NAME, 0, "certificationRequestInfo" },
243 : /* 6 */ { A1_OP_NAME, 0, "signatureAlgorithm" },
244 : /* 7 */ { A1_OP_NAME, 0, "signature" }
245 : };
246 : /* generate_template_type: CertificationRequest */
247 : const struct asn1_template asn1_CertificationRequest[] = {
248 : /* 0 */ { 0, sizeof(CertificationRequest), ((void *)(uintptr_t)1) },
249 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_CertificationRequest_tag__4 }
250 : };
251 :
252 : int ASN1CALL
253 0 : decode_CertificationRequest(const unsigned char *p, size_t len, CertificationRequest *data, size_t *size)
254 : {
255 0 : memset(data, 0, sizeof(*data));
256 0 : return _asn1_decode_top(asn1_CertificationRequest, 0|0, p, len, data, size);
257 : }
258 :
259 :
260 : int ASN1CALL
261 0 : encode_CertificationRequest(unsigned char *p, size_t len, const CertificationRequest *data, size_t *size)
262 : {
263 0 : return _asn1_encode(asn1_CertificationRequest, p, len, data, size);
264 : }
265 :
266 :
267 : size_t ASN1CALL
268 0 : length_CertificationRequest(const CertificationRequest *data)
269 : {
270 0 : return _asn1_length(asn1_CertificationRequest, data);
271 : }
272 :
273 :
274 : void ASN1CALL
275 0 : free_CertificationRequest(CertificationRequest *data)
276 : {
277 0 : _asn1_free_top(asn1_CertificationRequest, data);
278 0 : }
279 :
280 :
281 : int ASN1CALL
282 0 : copy_CertificationRequest(const CertificationRequest *from, CertificationRequest *to)
283 : {
284 0 : return _asn1_copy_top(asn1_CertificationRequest, from, to);
285 : }
286 :
287 :
288 : char * ASN1CALL
289 0 : print_CertificationRequest(const CertificationRequest *data, int flags)
290 : {
291 0 : return _asn1_print_top(asn1_CertificationRequest, flags, data);
292 : }
293 :
294 : /* template_members: CRIAttributeSet exp exp */
295 : /* tsequence: members isstruct: 1 */
296 : /* template_members: CRIAttributeSet exp exp */
297 : /* generate_template_type: CRIAttributeSet_tag_type_7 */
298 : const struct asn1_template asn1_CRIAttributeSet_tag_type_7[] = {
299 : /* 0 */ { 0, sizeof(heim_oid), ((void *)(uintptr_t)1) },
300 : /* 1 */ { A1_PARSE_T(A1T_OID), 0, NULL }
301 : };
302 : /* template_members: CRIAttributeSet exp exp */
303 : /* generate_template_type: CRIAttributeSet_values_1 */
304 : const struct asn1_template asn1_CRIAttributeSet_values_1[] = {
305 : /* 0 */ { 0, sizeof(HEIM_ANY), ((void *)(uintptr_t)1) },
306 : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_HEIM_ANY}
307 : };
308 : /* generate_template_type: CRIAttributeSet_tag_values_8 */
309 : const struct asn1_template asn1_CRIAttributeSet_tag_values_8[] = {
310 : /* 0 */ { 0, sizeof(struct CRIAttributeSet_values), ((void *)(uintptr_t)1) },
311 : /* 1 */ { A1_OP_SETOF, 0, asn1_CRIAttributeSet_values_1 }
312 : };
313 : const struct asn1_template asn1_CRIAttributes[] = {
314 : /* 0 */ { 0, 0, ((void *)(uintptr_t)1) },
315 : /* 1 */ { A1_OP_NAME, 0, "CRIAttributes" },
316 : /* 2 */ { A1_OP_NAME, 0, "at-extReq" },
317 : /* 3 */ { A1_OP_OPENTYPE_ID, 0, (const void *)&asn1_oid_id_pkcs9_extReq_copy },
318 : /* 4 */ { A1_OP_OPENTYPE, sizeof(CRIExtensions), (const void *)&asn1_CRIExtensions }
319 : };
320 : /* generate_template_type: CRIAttributeSet_tag__6 */
321 : const struct asn1_template asn1_CRIAttributeSet_tag__6[] = {
322 : /* 0 */ { 0, sizeof(struct CRIAttributeSet), ((void *)(uintptr_t)6) },
323 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OID), offsetof(struct CRIAttributeSet, type), asn1_CRIAttributeSet_tag_type_7 },
324 : /* 2 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), offsetof(struct CRIAttributeSet, values), asn1_CRIAttributeSet_tag_values_8 },
325 : /* 3 */ { A1_OP_OPENTYPE_OBJSET | A1_OS_IS_SORTED |A1_OS_OT_IS_ARRAY | (1 << 10) | 0, offsetof(CRIAttributeSet, _ioschoice_values), asn1_CRIAttributes },
326 : /* 4 */ { A1_OP_NAME, 0, "CRIAttributeSet" },
327 : /* 5 */ { A1_OP_NAME, 0, "type" },
328 : /* 6 */ { A1_OP_NAME, 0, "values" }
329 : };
330 : /* generate_template_type: CRIAttributeSet */
331 : const struct asn1_template asn1_CRIAttributeSet[] = {
332 : /* 0 */ { 0, sizeof(CRIAttributeSet), ((void *)(uintptr_t)1) },
333 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_CRIAttributeSet_tag__6 }
334 : };
335 :
336 : int ASN1CALL
337 0 : decode_CRIAttributeSet(const unsigned char *p, size_t len, CRIAttributeSet *data, size_t *size)
338 : {
339 0 : memset(data, 0, sizeof(*data));
340 0 : return _asn1_decode_top(asn1_CRIAttributeSet, 0|0, p, len, data, size);
341 : }
342 :
343 :
344 : int ASN1CALL
345 0 : encode_CRIAttributeSet(unsigned char *p, size_t len, const CRIAttributeSet *data, size_t *size)
346 : {
347 0 : return _asn1_encode(asn1_CRIAttributeSet, p, len, data, size);
348 : }
349 :
350 :
351 : size_t ASN1CALL
352 0 : length_CRIAttributeSet(const CRIAttributeSet *data)
353 : {
354 0 : return _asn1_length(asn1_CRIAttributeSet, data);
355 : }
356 :
357 :
358 : void ASN1CALL
359 0 : free_CRIAttributeSet(CRIAttributeSet *data)
360 : {
361 0 : _asn1_free_top(asn1_CRIAttributeSet, data);
362 0 : }
363 :
364 :
365 : int ASN1CALL
366 0 : copy_CRIAttributeSet(const CRIAttributeSet *from, CRIAttributeSet *to)
367 : {
368 0 : return _asn1_copy_top(asn1_CRIAttributeSet, from, to);
369 : }
370 :
371 :
372 : char * ASN1CALL
373 0 : print_CRIAttributeSet(const CRIAttributeSet *data, int flags)
374 : {
375 0 : return _asn1_print_top(asn1_CRIAttributeSet, flags, data);
376 : }
377 :
378 : /* template_members: IOSCertificationRequestInfo exp exp */
379 : /* tsequence: members isstruct: 1 */
380 : /* template_members: IOSCertificationRequestInfo exp imp */
381 : /* template_members: IOSCertificationRequestInfo exp exp */
382 : /* generate_template_type: IOSCertificationRequestInfo_attributes_2 */
383 : const struct asn1_template asn1_IOSCertificationRequestInfo_attributes_2[] = {
384 : /* 0 */ { 0, sizeof(CRIAttributeSet), ((void *)(uintptr_t)1) },
385 : /* 1 */ { A1_OP_TYPE , 0, asn1_CRIAttributeSet }
386 : };
387 : /* generate_template_type: IOSCertificationRequestInfo_tag_attributes_11 */
388 : const struct asn1_template asn1_IOSCertificationRequestInfo_tag_attributes_11[] = {
389 : /* 0 */ { 0, sizeof(struct IOSCertificationRequestInfo_attributes), ((void *)(uintptr_t)1) },
390 : /* 1 */ { A1_OP_SETOF, 0, asn1_IOSCertificationRequestInfo_attributes_2 }
391 : };
392 : /* generate_template_type: IOSCertificationRequestInfo_tag_attributes_10 */
393 : const struct asn1_template asn1_IOSCertificationRequestInfo_tag_attributes_10[] = {
394 : /* 0 */ { 0, sizeof(struct IOSCertificationRequestInfo_attributes), ((void *)(uintptr_t)1) },
395 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_IOSCertificationRequestInfo_tag_attributes_11 }
396 : };
397 : /* generate_template_type: IOSCertificationRequestInfo_tag__9 */
398 : const struct asn1_template asn1_IOSCertificationRequestInfo_tag__9[] = {
399 : /* 0 */ { 0, sizeof(struct IOSCertificationRequestInfo), ((void *)(uintptr_t)9) },
400 : /* 1 */ { A1_OP_TYPE , offsetof(struct IOSCertificationRequestInfo, version), asn1_PKCS10_Version },
401 : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct IOSCertificationRequestInfo, subject), &asn1_extern_Name},
402 : /* 3 */ { A1_OP_TYPE_EXTERN , offsetof(struct IOSCertificationRequestInfo, subjectPKInfo), &asn1_extern_SubjectPublicKeyInfo},
403 : /* 4 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct IOSCertificationRequestInfo, attributes), asn1_IOSCertificationRequestInfo_tag_attributes_10 },
404 : /* 5 */ { A1_OP_NAME, 0, "IOSCertificationRequestInfo" },
405 : /* 6 */ { A1_OP_NAME, 0, "version" },
406 : /* 7 */ { A1_OP_NAME, 0, "subject" },
407 : /* 8 */ { A1_OP_NAME, 0, "subjectPKInfo" },
408 : /* 9 */ { A1_OP_NAME, 0, "attributes" }
409 : };
410 : /* generate_template_type: IOSCertificationRequestInfo */
411 : const struct asn1_template asn1_IOSCertificationRequestInfo[] = {
412 : /* 0 */ { 0, sizeof(IOSCertificationRequestInfo), ((void *)(uintptr_t)1) },
413 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_IOSCertificationRequestInfo_tag__9 }
414 : };
415 :
416 : int ASN1CALL
417 0 : decode_IOSCertificationRequestInfo(const unsigned char *p, size_t len, IOSCertificationRequestInfo *data, size_t *size)
418 : {
419 0 : memset(data, 0, sizeof(*data));
420 0 : return _asn1_decode_top(asn1_IOSCertificationRequestInfo, 0|0, p, len, data, size);
421 : }
422 :
423 :
424 : int ASN1CALL
425 0 : encode_IOSCertificationRequestInfo(unsigned char *p, size_t len, const IOSCertificationRequestInfo *data, size_t *size)
426 : {
427 0 : return _asn1_encode(asn1_IOSCertificationRequestInfo, p, len, data, size);
428 : }
429 :
430 :
431 : size_t ASN1CALL
432 0 : length_IOSCertificationRequestInfo(const IOSCertificationRequestInfo *data)
433 : {
434 0 : return _asn1_length(asn1_IOSCertificationRequestInfo, data);
435 : }
436 :
437 :
438 : void ASN1CALL
439 0 : free_IOSCertificationRequestInfo(IOSCertificationRequestInfo *data)
440 : {
441 0 : _asn1_free_top(asn1_IOSCertificationRequestInfo, data);
442 0 : }
443 :
444 :
445 : int ASN1CALL
446 0 : copy_IOSCertificationRequestInfo(const IOSCertificationRequestInfo *from, IOSCertificationRequestInfo *to)
447 : {
448 0 : return _asn1_copy_top(asn1_IOSCertificationRequestInfo, from, to);
449 : }
450 :
451 :
452 : char * ASN1CALL
453 0 : print_IOSCertificationRequestInfo(const IOSCertificationRequestInfo *data, int flags)
454 : {
455 0 : return _asn1_print_top(asn1_IOSCertificationRequestInfo, flags, data);
456 : }
457 :
458 : /* template_members: IOSCertificationRequest exp exp */
459 : /* tsequence: members isstruct: 1 */
460 : /* template_members: IOSCertificationRequest exp exp */
461 : /* generate_template_type: IOSCertificationRequest_tag_signature_13 */
462 : const struct asn1_template asn1_IOSCertificationRequest_tag_signature_13[] = {
463 : /* 0 */ { 0, sizeof(IOSCertificationRequest), ((void *)(uintptr_t)1) },
464 : /* 1 */ { A1_PARSE_T(A1T_HEIM_BIT_STRING), 0, NULL }
465 : };
466 : /* generate_template_type: IOSCertificationRequest_tag__12 */
467 : const struct asn1_template asn1_IOSCertificationRequest_tag__12[] = {
468 : /* 0 */ { 0, sizeof(struct IOSCertificationRequest), ((void *)(uintptr_t)7) },
469 : /* 1 */ { A1_OP_TYPE , offsetof(struct IOSCertificationRequest, certificationRequestInfo), asn1_IOSCertificationRequestInfo },
470 : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct IOSCertificationRequest, signatureAlgorithm), &asn1_extern_AlgorithmIdentifier},
471 : /* 3 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_BitString), offsetof(struct IOSCertificationRequest, signature), asn1_IOSCertificationRequest_tag_signature_13 },
472 : /* 4 */ { A1_OP_NAME, 0, "IOSCertificationRequest" },
473 : /* 5 */ { A1_OP_NAME, 0, "certificationRequestInfo" },
474 : /* 6 */ { A1_OP_NAME, 0, "signatureAlgorithm" },
475 : /* 7 */ { A1_OP_NAME, 0, "signature" }
476 : };
477 : /* generate_template_type: IOSCertificationRequest */
478 : const struct asn1_template asn1_IOSCertificationRequest[] = {
479 : /* 0 */ { 0, sizeof(IOSCertificationRequest), ((void *)(uintptr_t)1) },
480 : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_IOSCertificationRequest_tag__12 }
481 : };
482 :
483 : int ASN1CALL
484 0 : decode_IOSCertificationRequest(const unsigned char *p, size_t len, IOSCertificationRequest *data, size_t *size)
485 : {
486 0 : memset(data, 0, sizeof(*data));
487 0 : return _asn1_decode_top(asn1_IOSCertificationRequest, 0|0, p, len, data, size);
488 : }
489 :
490 :
491 : int ASN1CALL
492 0 : encode_IOSCertificationRequest(unsigned char *p, size_t len, const IOSCertificationRequest *data, size_t *size)
493 : {
494 0 : return _asn1_encode(asn1_IOSCertificationRequest, p, len, data, size);
495 : }
496 :
497 :
498 : size_t ASN1CALL
499 0 : length_IOSCertificationRequest(const IOSCertificationRequest *data)
500 : {
501 0 : return _asn1_length(asn1_IOSCertificationRequest, data);
502 : }
503 :
504 :
505 : void ASN1CALL
506 0 : free_IOSCertificationRequest(IOSCertificationRequest *data)
507 : {
508 0 : _asn1_free_top(asn1_IOSCertificationRequest, data);
509 0 : }
510 :
511 :
512 : int ASN1CALL
513 0 : copy_IOSCertificationRequest(const IOSCertificationRequest *from, IOSCertificationRequest *to)
514 : {
515 0 : return _asn1_copy_top(asn1_IOSCertificationRequest, from, to);
516 : }
517 :
518 :
519 : char * ASN1CALL
520 0 : print_IOSCertificationRequest(const IOSCertificationRequest *data, int flags)
521 : {
522 0 : return _asn1_print_top(asn1_IOSCertificationRequest, flags, data);
523 : }
524 :
525 : /* generate_template_type: CRIExtensions */
526 : const struct asn1_template asn1_CRIExtensions[] = {
527 : /* 0 */ { 0, sizeof(CRIExtensions), ((void *)(uintptr_t)1) },
528 : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_Extensions}
529 : };
530 :
531 : int ASN1CALL
532 0 : decode_CRIExtensions(const unsigned char *p, size_t len, CRIExtensions *data, size_t *size)
533 : {
534 0 : memset(data, 0, sizeof(*data));
535 0 : return _asn1_decode_top(asn1_CRIExtensions, 0|0, p, len, data, size);
536 : }
537 :
538 :
539 : int ASN1CALL
540 0 : encode_CRIExtensions(unsigned char *p, size_t len, const CRIExtensions *data, size_t *size)
541 : {
542 0 : return _asn1_encode(asn1_CRIExtensions, p, len, data, size);
543 : }
544 :
545 :
546 : size_t ASN1CALL
547 0 : length_CRIExtensions(const CRIExtensions *data)
548 : {
549 0 : return _asn1_length(asn1_CRIExtensions, data);
550 : }
551 :
552 :
553 : void ASN1CALL
554 0 : free_CRIExtensions(CRIExtensions *data)
555 : {
556 0 : _asn1_free_top(asn1_CRIExtensions, data);
557 0 : }
558 :
559 :
560 : int ASN1CALL
561 0 : copy_CRIExtensions(const CRIExtensions *from, CRIExtensions *to)
562 : {
563 0 : return _asn1_copy_top(asn1_CRIExtensions, from, to);
564 : }
565 :
566 :
567 : char * ASN1CALL
568 0 : print_CRIExtensions(const CRIExtensions *data, int flags)
569 : {
570 0 : return _asn1_print_top(asn1_CRIExtensions, flags, data);
571 : }
572 :
|