Vanetza
Loading...
Searching...
No Matches
CertRequestExtension.c
1/*
2 * Generated by asn1c
3 * From ASN.1 module "Ieee1609Dot2"
4 * found in "Ieee1609Dot2.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security_ -R`
6 */
7
9
10static const long asn_VAL_2_Vanetza_Security_certExtId_OperatingOrganization = 1;
11static const asn_ioc_cell_t asn_IOS_Vanetza_Security_SetCertExtensions_1_rows[] = {
12 { "&id", aioc__value, &asn_DEF_Vanetza_Security_ExtId, &asn_VAL_2_Vanetza_Security_certExtId_OperatingOrganization },
13 { "&App", aioc__type, &asn_DEF_Vanetza_Security_OperatingOrganizationId },
14 { "&Issue", aioc__type, &asn_DEF_NULL },
15 { "&Req", aioc__type, &asn_DEF_NULL }
16};
17static const asn_ioc_set_t asn_IOS_Vanetza_Security_SetCertExtensions_1[] = {
18 { 1, 4, asn_IOS_Vanetza_Security_SetCertExtensions_1_rows }
19};
20static int
21memb_Vanetza_Security_content_constraint_3(const asn_TYPE_descriptor_t *td, const void *sptr,
22 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
23
24 if(!sptr) {
25 ASN__CTFAIL(app_key, td, sptr,
26 "%s: value not given (%s:%d)",
27 td->name, __FILE__, __LINE__);
28 return -1;
29 }
30
31
32 if(1 /* No applicable constraints whatsoever */) {
33 /* Nothing is here. See below */
34 }
35
36 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
37}
38
39static int
40memb_Vanetza_Security_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
41 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
42 long value;
43
44 if(!sptr) {
45 ASN__CTFAIL(app_key, td, sptr,
46 "%s: value not given (%s:%d)",
47 td->name, __FILE__, __LINE__);
48 return -1;
49 }
50
51 value = *(const long *)sptr;
52
53 if((value >= 0L && value <= 255L)) {
54 /* Constraint check succeeded */
55 return 0;
56 } else {
57 ASN__CTFAIL(app_key, td, sptr,
58 "%s: constraint failed (%s:%d)",
59 td->name, __FILE__, __LINE__);
60 return -1;
61 }
62}
63
64#if !defined(ASN_DISABLE_OER_SUPPORT)
65static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_content_constr_4 CC_NOTUSED = {
66 { 0, 0 },
67 -1};
68#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
69#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
70static asn_per_constraints_t asn_PER_memb_Vanetza_Security_content_constr_4 CC_NOTUSED = {
71 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
72 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
73 0, 0 /* No PER value map */
74};
75#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
76#if !defined(ASN_DISABLE_OER_SUPPORT)
77static asn_oer_constraints_t asn_OER_type_Vanetza_Security_permissions_constr_3 CC_NOTUSED = {
78 { 0, 0 },
79 -1};
80#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
81#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
82static asn_per_constraints_t asn_PER_type_Vanetza_Security_permissions_constr_3 CC_NOTUSED = {
83 { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
84 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
85 0, 0 /* No PER value map */
86};
87#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
88#if !defined(ASN_DISABLE_OER_SUPPORT)
89static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_id_constr_2 CC_NOTUSED = {
90 { 1, 1 } /* (0..255) */,
91 -1};
92#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
93#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
94static asn_per_constraints_t asn_PER_memb_Vanetza_Security_id_constr_2 CC_NOTUSED = {
95 { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */,
96 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
97 0, 0 /* No PER value map */
98};
99#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
100static asn_TYPE_member_t asn_MBR_Vanetza_Security_permissions_3[] = {
101 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertRequestExtension__permissions, choice.content),
102 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
103 +1, /* EXPLICIT tag at current level */
104 &asn_DEF_ANY,
105 0,
106 {
107#if !defined(ASN_DISABLE_OER_SUPPORT)
108 &asn_OER_memb_Vanetza_Security_content_constr_4,
109#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
110#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
111 &asn_PER_memb_Vanetza_Security_content_constr_4,
112#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
113#if !defined(ASN_DISABLE_JER_SUPPORT)
114 0,
115#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
116 memb_Vanetza_Security_content_constraint_3
117 },
118 0, 0, /* No default value */
119 "content"
120 },
121 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertRequestExtension__permissions, choice.all),
122 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
123 -1, /* IMPLICIT tag at current level */
124 &asn_DEF_NULL,
125 0,
126 {
127#if !defined(ASN_DISABLE_OER_SUPPORT)
128 0,
129#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
130#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
131 0,
132#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
133#if !defined(ASN_DISABLE_JER_SUPPORT)
134 0,
135#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
136 0
137 },
138 0, 0, /* No default value */
139 "all"
140 },
141};
142static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_permissions_tag2el_3[] = {
143 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* content */
144 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* all */
145};
146static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security_permissions_specs_3 = {
147 sizeof(struct Vanetza_Security_CertRequestExtension__permissions),
148 offsetof(struct Vanetza_Security_CertRequestExtension__permissions, _asn_ctx),
149 offsetof(struct Vanetza_Security_CertRequestExtension__permissions, present),
150 sizeof(((struct Vanetza_Security_CertRequestExtension__permissions *)0)->present),
151 asn_MAP_Vanetza_Security_permissions_tag2el_3,
152 2, /* Count of tags in the map */
153 0, 0,
154 -1 /* Extensions start */
155};
156static /* Use -fall-defs-global to expose */
157asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_permissions_3 = {
158 "permissions",
159 "permissions",
160 &asn_OP_CHOICE,
161 0, /* No effective tags (pointer) */
162 0, /* No effective tags (count) */
163 0, /* No tags (pointer) */
164 0, /* No tags (count) */
165 {
166#if !defined(ASN_DISABLE_OER_SUPPORT)
167 &asn_OER_type_Vanetza_Security_permissions_constr_3,
168#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
169#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
170 &asn_PER_type_Vanetza_Security_permissions_constr_3,
171#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
172#if !defined(ASN_DISABLE_JER_SUPPORT)
173 0,
174#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
175 CHOICE_constraint
176 },
177 asn_MBR_Vanetza_Security_permissions_3,
178 2, /* Elements count */
179 &asn_SPC_Vanetza_Security_permissions_specs_3 /* Additional specs */
180};
181
182asn_TYPE_member_t asn_MBR_Vanetza_Security_CertRequestExtension_1[] = {
183 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertRequestExtension, id),
184 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
185 -1, /* IMPLICIT tag at current level */
186 &asn_DEF_Vanetza_Security_ExtId,
187 0,
188 {
189#if !defined(ASN_DISABLE_OER_SUPPORT)
190 &asn_OER_memb_Vanetza_Security_id_constr_2,
191#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
192#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
193 &asn_PER_memb_Vanetza_Security_id_constr_2,
194#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
195#if !defined(ASN_DISABLE_JER_SUPPORT)
196 0,
197#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
198 memb_Vanetza_Security_id_constraint_1
199 },
200 0, 0, /* No default value */
201 "id"
202 },
203 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertRequestExtension, permissions),
204 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
205 +1, /* EXPLICIT tag at current level */
206 &asn_DEF_Vanetza_Security_permissions_3,
207 0,
208 {
209#if !defined(ASN_DISABLE_OER_SUPPORT)
210 0,
211#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
212#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
213 0,
214#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
215#if !defined(ASN_DISABLE_JER_SUPPORT)
216 0,
217#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
218 0
219 },
220 0, 0, /* No default value */
221 "permissions"
222 },
223};
224static const ber_tlv_tag_t asn_DEF_Vanetza_Security_CertRequestExtension_tags_1[] = {
225 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
226};
227static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_CertRequestExtension_tag2el_1[] = {
228 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */
229 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* permissions */
230};
231asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security_CertRequestExtension_specs_1 = {
232 sizeof(struct Vanetza_Security_CertRequestExtension),
233 offsetof(struct Vanetza_Security_CertRequestExtension, _asn_ctx),
234 asn_MAP_Vanetza_Security_CertRequestExtension_tag2el_1,
235 2, /* Count of tags in the map */
236 0, 0, 0, /* Optional elements (not needed) */
237 -1, /* First extension addition */
238};
239asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_CertRequestExtension = {
240 "CertRequestExtension",
241 "CertRequestExtension",
242 &asn_OP_SEQUENCE,
243 asn_DEF_Vanetza_Security_CertRequestExtension_tags_1,
244 sizeof(asn_DEF_Vanetza_Security_CertRequestExtension_tags_1)
245 /sizeof(asn_DEF_Vanetza_Security_CertRequestExtension_tags_1[0]), /* 1 */
246 asn_DEF_Vanetza_Security_CertRequestExtension_tags_1, /* Same as above */
247 sizeof(asn_DEF_Vanetza_Security_CertRequestExtension_tags_1)
248 /sizeof(asn_DEF_Vanetza_Security_CertRequestExtension_tags_1[0]), /* 1 */
249 {
250#if !defined(ASN_DISABLE_OER_SUPPORT)
251 0,
252#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
253#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
254 0,
255#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
256#if !defined(ASN_DISABLE_JER_SUPPORT)
257 0,
258#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
259 SEQUENCE_constraint
260 },
261 asn_MBR_Vanetza_Security_CertRequestExtension_1,
262 2, /* Elements count */
263 &asn_SPC_Vanetza_Security_CertRequestExtension_specs_1 /* Additional specs */
264};