2 /*** <<< INCLUDES [SIGNED] >>> ***/
4 #include <OBJECT_IDENTIFIER.h>
5 #include <BIT_STRING.h>
8 #include <constr_SEQUENCE.h>
10 /*** <<< TYPE-DECLS [SIGNED] >>> ***/
12 typedef struct SIGNED_15P0 {
15 OBJECT_IDENTIFIER_t signature;
18 /* Context for parsing across buffer boundaries */
19 asn_struct_ctx_t _asn_ctx;
21 OBJECT_IDENTIFIER_t algorithm;
22 BIT_STRING_t signature;
24 /* Context for parsing across buffer boundaries */
25 asn_struct_ctx_t _asn_ctx;
28 /*** <<< FUNC-DECLS [SIGNED] >>> ***/
30 extern asn_TYPE_descriptor_t asn_DEF_SIGNED_15P0;
31 extern asn_SEQUENCE_specifics_t asn_SPC_SIGNED_15P0_specs_1;
32 extern asn_TYPE_member_t asn_MBR_SIGNED_15P0_1[3];
34 /*** <<< CODE [SIGNED] >>> ***/
37 memb_signature_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39 const BIT_STRING_t *st = (const BIT_STRING_t *)sptr;
43 ASN__CTFAIL(app_key, td, sptr,
44 "%s: value not given (%s:%d)",
45 td->name, __FILE__, __LINE__);
51 size = 8 * st->size - (st->bits_unused & 0x07);
57 /* Constraint check succeeded */
60 ASN__CTFAIL(app_key, td, sptr,
61 "%s: constraint failed (%s:%d)",
62 td->name, __FILE__, __LINE__);
68 /*** <<< STAT-DEFS [SIGNED] >>> ***/
70 static asn_TYPE_member_t asn_MBR_toBeSigned_2[] = {
71 { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, version),
72 .tag = (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
74 .type = &asn_DEF_INTEGER,
76 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
77 0, 0, /* No default value */
80 { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, signature),
81 .tag = (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
83 .type = &asn_DEF_OBJECT_IDENTIFIER,
85 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
86 0, 0, /* No default value */
89 { ATF_NOFLAGS, 0, offsetof(struct toBeSigned, issuer),
90 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
92 .type = &asn_DEF_Name,
94 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
95 0, 0, /* No default value */
99 static const ber_tlv_tag_t asn_DEF_toBeSigned_tags_2[] = {
100 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
102 static const asn_TYPE_tag2member_t asn_MAP_toBeSigned_tag2el_2[] = {
103 { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* version */
104 { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* signature */
105 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* issuer */
107 static asn_SEQUENCE_specifics_t asn_SPC_toBeSigned_specs_2 = {
108 sizeof(struct toBeSigned),
109 offsetof(struct toBeSigned, _asn_ctx),
110 .tag2el = asn_MAP_toBeSigned_tag2el_2,
111 .tag2el_count = 3, /* Count of tags in the map */
112 0, 0, 0, /* Optional elements (not needed) */
113 -1, /* First extension addition */
115 static /* Use -fall-defs-global to expose */
116 asn_TYPE_descriptor_t asn_DEF_toBeSigned_2 = {
120 asn_DEF_toBeSigned_tags_2,
121 sizeof(asn_DEF_toBeSigned_tags_2)
122 /sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */
123 asn_DEF_toBeSigned_tags_2, /* Same as above */
124 sizeof(asn_DEF_toBeSigned_tags_2)
125 /sizeof(asn_DEF_toBeSigned_tags_2[0]), /* 1 */
126 { 0, 0, SEQUENCE_constraint },
127 asn_MBR_toBeSigned_2,
128 3, /* Elements count */
129 &asn_SPC_toBeSigned_specs_2 /* Additional specs */
132 asn_TYPE_member_t asn_MBR_SIGNED_15P0_1[] = {
133 { ATF_NOFLAGS, 0, offsetof(struct SIGNED_15P0, toBeSigned),
134 .tag = (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
136 .type = &asn_DEF_toBeSigned_2,
138 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
139 0, 0, /* No default value */
142 { ATF_NOFLAGS, 0, offsetof(struct SIGNED_15P0, algorithm),
143 .tag = (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
145 .type = &asn_DEF_OBJECT_IDENTIFIER,
147 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
148 0, 0, /* No default value */
151 { ATF_NOFLAGS, 0, offsetof(struct SIGNED_15P0, signature),
152 .tag = (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
154 .type = &asn_DEF_BIT_STRING,
156 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_signature_constraint_1 },
157 0, 0, /* No default value */
161 static const ber_tlv_tag_t asn_DEF_SIGNED_15P0_tags_1[] = {
162 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
164 static const asn_TYPE_tag2member_t asn_MAP_SIGNED_15P0_tag2el_1[] = {
165 { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 2, 0, 0 }, /* signature */
166 { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 1, 0, 0 }, /* algorithm */
167 { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* toBeSigned */
169 asn_SEQUENCE_specifics_t asn_SPC_SIGNED_15P0_specs_1 = {
170 sizeof(struct SIGNED_15P0),
171 offsetof(struct SIGNED_15P0, _asn_ctx),
172 .tag2el = asn_MAP_SIGNED_15P0_tag2el_1,
173 .tag2el_count = 3, /* Count of tags in the map */
174 0, 0, 0, /* Optional elements (not needed) */
175 -1, /* First extension addition */
177 asn_TYPE_descriptor_t asn_DEF_SIGNED_15P0 = {
181 asn_DEF_SIGNED_15P0_tags_1,
182 sizeof(asn_DEF_SIGNED_15P0_tags_1)
183 /sizeof(asn_DEF_SIGNED_15P0_tags_1[0]), /* 1 */
184 asn_DEF_SIGNED_15P0_tags_1, /* Same as above */
185 sizeof(asn_DEF_SIGNED_15P0_tags_1)
186 /sizeof(asn_DEF_SIGNED_15P0_tags_1[0]), /* 1 */
187 { 0, 0, SEQUENCE_constraint },
188 asn_MBR_SIGNED_15P0_1,
189 3, /* Elements count */
190 &asn_SPC_SIGNED_15P0_specs_1 /* Additional specs */
194 /*** <<< INCLUDES [Certificate] >>> ***/
198 /*** <<< TYPE-DECLS [Certificate] >>> ***/
200 typedef SIGNED_15P0_t Certificate_t;
202 /*** <<< FUNC-DECLS [Certificate] >>> ***/
204 extern asn_TYPE_descriptor_t asn_DEF_Certificate;
205 asn_struct_free_f Certificate_free;
206 asn_struct_print_f Certificate_print;
207 asn_constr_check_f Certificate_constraint;
208 ber_type_decoder_f Certificate_decode_ber;
209 der_type_encoder_f Certificate_encode_der;
210 xer_type_decoder_f Certificate_decode_xer;
211 xer_type_encoder_f Certificate_encode_xer;
213 /*** <<< CODE [Certificate] >>> ***/
216 * This type is implemented using SIGNED_15P0,
217 * so here we adjust the DEF accordingly.
220 /*** <<< STAT-DEFS [Certificate] >>> ***/
222 static const ber_tlv_tag_t asn_DEF_Certificate_tags_1[] = {
223 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
225 asn_TYPE_descriptor_t asn_DEF_Certificate = {
229 asn_DEF_Certificate_tags_1,
230 sizeof(asn_DEF_Certificate_tags_1)
231 /sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
232 asn_DEF_Certificate_tags_1, /* Same as above */
233 sizeof(asn_DEF_Certificate_tags_1)
234 /sizeof(asn_DEF_Certificate_tags_1[0]), /* 1 */
235 { 0, 0, SEQUENCE_constraint },
236 asn_MBR_SIGNED_15P0_1,
237 3, /* Elements count */
238 &asn_SPC_SIGNED_15P0_specs_1 /* Additional specs */
242 /*** <<< INCLUDES [Name] >>> ***/
244 #include <asn_SEQUENCE_OF.h>
245 #include <constr_SEQUENCE_OF.h>
247 /*** <<< FWD-DECLS [Name] >>> ***/
249 struct RelativeDistinguishedName;
251 /*** <<< TYPE-DECLS [Name] >>> ***/
253 typedef struct Name {
254 A_SEQUENCE_OF(struct RelativeDistinguishedName) list;
256 /* Context for parsing across buffer boundaries */
257 asn_struct_ctx_t _asn_ctx;
260 /*** <<< FUNC-DECLS [Name] >>> ***/
262 extern asn_TYPE_descriptor_t asn_DEF_Name;
263 extern asn_SET_OF_specifics_t asn_SPC_Name_specs_1;
264 extern asn_TYPE_member_t asn_MBR_Name_1[1];
266 /*** <<< POST-INCLUDE [Name] >>> ***/
268 #include "RelativeDistinguishedName.h"
270 /*** <<< STAT-DEFS [Name] >>> ***/
272 asn_TYPE_member_t asn_MBR_Name_1[] = {
274 .tag = (ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
276 .type = &asn_DEF_RelativeDistinguishedName,
278 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = 0 },
279 0, 0, /* No default value */
283 static const ber_tlv_tag_t asn_DEF_Name_tags_1[] = {
284 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
286 asn_SET_OF_specifics_t asn_SPC_Name_specs_1 = {
288 offsetof(struct Name, _asn_ctx),
289 0, /* XER encoding is XMLDelimitedItemList */
291 asn_TYPE_descriptor_t asn_DEF_Name = {
296 sizeof(asn_DEF_Name_tags_1)
297 /sizeof(asn_DEF_Name_tags_1[0]), /* 1 */
298 asn_DEF_Name_tags_1, /* Same as above */
299 sizeof(asn_DEF_Name_tags_1)
300 /sizeof(asn_DEF_Name_tags_1[0]), /* 1 */
301 { 0, 0, SEQUENCE_OF_constraint },
303 1, /* Single element */
304 &asn_SPC_Name_specs_1 /* Additional specs */
308 /*** <<< INCLUDES [RelativeDistinguishedName] >>> ***/
310 #include <IA5String.h>
311 #include <asn_SET_OF.h>
312 #include <constr_SET_OF.h>
314 /*** <<< TYPE-DECLS [RelativeDistinguishedName] >>> ***/
316 typedef struct RelativeDistinguishedName {
317 A_SET_OF(IA5String_t) list;
319 /* Context for parsing across buffer boundaries */
320 asn_struct_ctx_t _asn_ctx;
321 } RelativeDistinguishedName_t;
323 /*** <<< FUNC-DECLS [RelativeDistinguishedName] >>> ***/
325 extern asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName;
326 extern asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1;
327 extern asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[1];
329 /*** <<< CTABLES [RelativeDistinguishedName] >>> ***/
331 static const int permitted_alphabet_table_2[256] = {
332 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
333 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */
334 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 0, /* ,-. */
335 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, /* 0 9 */
336 0, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20, /* ABCDEFGHIJKLMNO */
337 21,22,23,24,25,26,27,28,29,30,31, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */
338 0,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46, /* abcdefghijklmno */
339 47,48,49,50,51,52,53,54,55,56,57, 0, 0, 0, 0, 0, /* pqrstuvwxyz */
342 static int check_permitted_alphabet_2(const void *sptr) {
343 const int *table = permitted_alphabet_table_2;
344 /* The underlying type is IA5String */
345 const IA5String_t *st = (const IA5String_t *)sptr;
346 const uint8_t *ch = st->buf;
347 const uint8_t *end = ch + st->size;
349 for(; ch < end; ch++) {
351 if(!table[cv]) return -1;
357 /*** <<< CODE [RelativeDistinguishedName] >>> ***/
360 memb_IA5String_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
361 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
362 const IA5String_t *st = (const IA5String_t *)sptr;
365 ASN__CTFAIL(app_key, td, sptr,
366 "%s: value not given (%s:%d)",
367 td->name, __FILE__, __LINE__);
372 if(!check_permitted_alphabet_2(st)) {
373 /* Constraint check succeeded */
376 ASN__CTFAIL(app_key, td, sptr,
377 "%s: constraint failed (%s:%d)",
378 td->name, __FILE__, __LINE__);
384 /*** <<< STAT-DEFS [RelativeDistinguishedName] >>> ***/
386 asn_TYPE_member_t asn_MBR_RelativeDistinguishedName_1[] = {
388 .tag = (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
390 .type = &asn_DEF_IA5String,
392 { .oer_constraints = 0, .per_constraints = 0, .general_constraints = memb_IA5String_constraint_1 },
393 0, 0, /* No default value */
397 static const ber_tlv_tag_t asn_DEF_RelativeDistinguishedName_tags_1[] = {
398 (ASN_TAG_CLASS_UNIVERSAL | (17 << 2))
400 asn_SET_OF_specifics_t asn_SPC_RelativeDistinguishedName_specs_1 = {
401 sizeof(struct RelativeDistinguishedName),
402 offsetof(struct RelativeDistinguishedName, _asn_ctx),
403 0, /* XER encoding is XMLDelimitedItemList */
405 asn_TYPE_descriptor_t asn_DEF_RelativeDistinguishedName = {
406 "RelativeDistinguishedName",
407 "RelativeDistinguishedName",
409 asn_DEF_RelativeDistinguishedName_tags_1,
410 sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
411 /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
412 asn_DEF_RelativeDistinguishedName_tags_1, /* Same as above */
413 sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
414 /sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
415 { 0, 0, SET_OF_constraint },
416 asn_MBR_RelativeDistinguishedName_1,
417 1, /* Single element */
418 &asn_SPC_RelativeDistinguishedName_specs_1 /* Additional specs */