Vanetza
Loading...
Searching...
No Matches
EccP256CurvePoint.c
1/*
2 * Generated by asn1c
3 * From ASN.1 module "Ieee1609Dot2BaseTypes"
4 * found in "Ieee1609Dot2BaseTypes.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security_ -R`
6 */
7
9
10static int
11memb_Vanetza_Security_x_constraint_6(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
14 size_t size;
15
16 if(!sptr) {
17 ASN__CTFAIL(app_key, td, sptr,
18 "%s: value not given (%s:%d)",
19 td->name, __FILE__, __LINE__);
20 return -1;
21 }
22
23 size = st->size;
24
25 if((size == 32UL)) {
26 /* Constraint check succeeded */
27 return 0;
28 } else {
29 ASN__CTFAIL(app_key, td, sptr,
30 "%s: constraint failed (%s:%d)",
31 td->name, __FILE__, __LINE__);
32 return -1;
33 }
34}
35
36static int
37memb_Vanetza_Security_y_constraint_6(const asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
40 size_t size;
41
42 if(!sptr) {
43 ASN__CTFAIL(app_key, td, sptr,
44 "%s: value not given (%s:%d)",
45 td->name, __FILE__, __LINE__);
46 return -1;
47 }
48
49 size = st->size;
50
51 if((size == 32UL)) {
52 /* Constraint check succeeded */
53 return 0;
54 } else {
55 ASN__CTFAIL(app_key, td, sptr,
56 "%s: constraint failed (%s:%d)",
57 td->name, __FILE__, __LINE__);
58 return -1;
59 }
60}
61
62static int
63memb_Vanetza_Security_x_only_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
64 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
65 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
66 size_t size;
67
68 if(!sptr) {
69 ASN__CTFAIL(app_key, td, sptr,
70 "%s: value not given (%s:%d)",
71 td->name, __FILE__, __LINE__);
72 return -1;
73 }
74
75 size = st->size;
76
77 if((size == 32UL)) {
78 /* Constraint check succeeded */
79 return 0;
80 } else {
81 ASN__CTFAIL(app_key, td, sptr,
82 "%s: constraint failed (%s:%d)",
83 td->name, __FILE__, __LINE__);
84 return -1;
85 }
86}
87
88static int
89memb_Vanetza_Security_compressed_y_0_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
90 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
91 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
92 size_t size;
93
94 if(!sptr) {
95 ASN__CTFAIL(app_key, td, sptr,
96 "%s: value not given (%s:%d)",
97 td->name, __FILE__, __LINE__);
98 return -1;
99 }
100
101 size = st->size;
102
103 if((size == 32UL)) {
104 /* Constraint check succeeded */
105 return 0;
106 } else {
107 ASN__CTFAIL(app_key, td, sptr,
108 "%s: constraint failed (%s:%d)",
109 td->name, __FILE__, __LINE__);
110 return -1;
111 }
112}
113
114static int
115memb_Vanetza_Security_compressed_y_1_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
116 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
117 const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
118 size_t size;
119
120 if(!sptr) {
121 ASN__CTFAIL(app_key, td, sptr,
122 "%s: value not given (%s:%d)",
123 td->name, __FILE__, __LINE__);
124 return -1;
125 }
126
127 size = st->size;
128
129 if((size == 32UL)) {
130 /* Constraint check succeeded */
131 return 0;
132 } else {
133 ASN__CTFAIL(app_key, td, sptr,
134 "%s: constraint failed (%s:%d)",
135 td->name, __FILE__, __LINE__);
136 return -1;
137 }
138}
139
140#if !defined(ASN_DISABLE_OER_SUPPORT)
141static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_x_constr_7 CC_NOTUSED = {
142 { 0, 0 },
143 32 /* (SIZE(32..32)) */};
144#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
145#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
146static asn_per_constraints_t asn_PER_memb_Vanetza_Security_x_constr_7 CC_NOTUSED = {
147 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
148 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
149 0, 0 /* No PER value map */
150};
151#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
152#if !defined(ASN_DISABLE_OER_SUPPORT)
153static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_y_constr_8 CC_NOTUSED = {
154 { 0, 0 },
155 32 /* (SIZE(32..32)) */};
156#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
157#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
158static asn_per_constraints_t asn_PER_memb_Vanetza_Security_y_constr_8 CC_NOTUSED = {
159 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
160 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
161 0, 0 /* No PER value map */
162};
163#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
164#if !defined(ASN_DISABLE_OER_SUPPORT)
165static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_x_only_constr_2 CC_NOTUSED = {
166 { 0, 0 },
167 32 /* (SIZE(32..32)) */};
168#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
169#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
170static asn_per_constraints_t asn_PER_memb_Vanetza_Security_x_only_constr_2 CC_NOTUSED = {
171 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
172 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
173 0, 0 /* No PER value map */
174};
175#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
176#if !defined(ASN_DISABLE_OER_SUPPORT)
177static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_compressed_y_0_constr_4 CC_NOTUSED = {
178 { 0, 0 },
179 32 /* (SIZE(32..32)) */};
180#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
181#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
182static asn_per_constraints_t asn_PER_memb_Vanetza_Security_compressed_y_0_constr_4 CC_NOTUSED = {
183 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
184 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
185 0, 0 /* No PER value map */
186};
187#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
188#if !defined(ASN_DISABLE_OER_SUPPORT)
189static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_compressed_y_1_constr_5 CC_NOTUSED = {
190 { 0, 0 },
191 32 /* (SIZE(32..32)) */};
192#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
193#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
194static asn_per_constraints_t asn_PER_memb_Vanetza_Security_compressed_y_1_constr_5 CC_NOTUSED = {
195 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
196 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
197 0, 0 /* No PER value map */
198};
199#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
200#if !defined(ASN_DISABLE_OER_SUPPORT)
201asn_oer_constraints_t asn_OER_type_Vanetza_Security_EccP256CurvePoint_constr_1 CC_NOTUSED = {
202 { 0, 0 },
203 -1};
204#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
205#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
206asn_per_constraints_t asn_PER_type_Vanetza_Security_EccP256CurvePoint_constr_1 CC_NOTUSED = {
207 { APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */,
208 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
209 0, 0 /* No PER value map */
210};
211#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
212static asn_TYPE_member_t asn_MBR_Vanetza_Security_uncompressedP256_6[] = {
213 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint__uncompressedP256, x),
214 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
215 -1, /* IMPLICIT tag at current level */
216 &asn_DEF_OCTET_STRING,
217 0,
218 {
219#if !defined(ASN_DISABLE_OER_SUPPORT)
220 &asn_OER_memb_Vanetza_Security_x_constr_7,
221#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
222#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
223 &asn_PER_memb_Vanetza_Security_x_constr_7,
224#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
225#if !defined(ASN_DISABLE_JER_SUPPORT)
226 0,
227#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
228 memb_Vanetza_Security_x_constraint_6
229 },
230 0, 0, /* No default value */
231 "x"
232 },
233 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint__uncompressedP256, y),
234 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
235 -1, /* IMPLICIT tag at current level */
236 &asn_DEF_OCTET_STRING,
237 0,
238 {
239#if !defined(ASN_DISABLE_OER_SUPPORT)
240 &asn_OER_memb_Vanetza_Security_y_constr_8,
241#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
242#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
243 &asn_PER_memb_Vanetza_Security_y_constr_8,
244#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
245#if !defined(ASN_DISABLE_JER_SUPPORT)
246 0,
247#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
248 memb_Vanetza_Security_y_constraint_6
249 },
250 0, 0, /* No default value */
251 "y"
252 },
253};
254static const ber_tlv_tag_t asn_DEF_Vanetza_Security_uncompressedP256_tags_6[] = {
255 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
256 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
257};
258static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_uncompressedP256_tag2el_6[] = {
259 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x */
260 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* y */
261};
262static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security_uncompressedP256_specs_6 = {
263 sizeof(struct Vanetza_Security_EccP256CurvePoint__uncompressedP256),
264 offsetof(struct Vanetza_Security_EccP256CurvePoint__uncompressedP256, _asn_ctx),
265 asn_MAP_Vanetza_Security_uncompressedP256_tag2el_6,
266 2, /* Count of tags in the map */
267 0, 0, 0, /* Optional elements (not needed) */
268 -1, /* First extension addition */
269};
270static /* Use -fall-defs-global to expose */
271asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_uncompressedP256_6 = {
272 "uncompressedP256",
273 "uncompressedP256",
274 &asn_OP_SEQUENCE,
275 asn_DEF_Vanetza_Security_uncompressedP256_tags_6,
276 sizeof(asn_DEF_Vanetza_Security_uncompressedP256_tags_6)
277 /sizeof(asn_DEF_Vanetza_Security_uncompressedP256_tags_6[0]) - 1, /* 1 */
278 asn_DEF_Vanetza_Security_uncompressedP256_tags_6, /* Same as above */
279 sizeof(asn_DEF_Vanetza_Security_uncompressedP256_tags_6)
280 /sizeof(asn_DEF_Vanetza_Security_uncompressedP256_tags_6[0]), /* 2 */
281 {
282#if !defined(ASN_DISABLE_OER_SUPPORT)
283 0,
284#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
285#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
286 0,
287#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
288#if !defined(ASN_DISABLE_JER_SUPPORT)
289 0,
290#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
291 SEQUENCE_constraint
292 },
293 asn_MBR_Vanetza_Security_uncompressedP256_6,
294 2, /* Elements count */
295 &asn_SPC_Vanetza_Security_uncompressedP256_specs_6 /* Additional specs */
296};
297
298asn_TYPE_member_t asn_MBR_Vanetza_Security_EccP256CurvePoint_1[] = {
299 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint, choice.x_only),
300 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
301 -1, /* IMPLICIT tag at current level */
302 &asn_DEF_OCTET_STRING,
303 0,
304 {
305#if !defined(ASN_DISABLE_OER_SUPPORT)
306 &asn_OER_memb_Vanetza_Security_x_only_constr_2,
307#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
308#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
309 &asn_PER_memb_Vanetza_Security_x_only_constr_2,
310#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
311#if !defined(ASN_DISABLE_JER_SUPPORT)
312 0,
313#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
314 memb_Vanetza_Security_x_only_constraint_1
315 },
316 0, 0, /* No default value */
317 "x-only"
318 },
319 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint, choice.fill),
320 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
321 -1, /* IMPLICIT tag at current level */
322 &asn_DEF_NULL,
323 0,
324 {
325#if !defined(ASN_DISABLE_OER_SUPPORT)
326 0,
327#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
328#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
329 0,
330#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
331#if !defined(ASN_DISABLE_JER_SUPPORT)
332 0,
333#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
334 0
335 },
336 0, 0, /* No default value */
337 "fill"
338 },
339 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint, choice.compressed_y_0),
340 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
341 -1, /* IMPLICIT tag at current level */
342 &asn_DEF_OCTET_STRING,
343 0,
344 {
345#if !defined(ASN_DISABLE_OER_SUPPORT)
346 &asn_OER_memb_Vanetza_Security_compressed_y_0_constr_4,
347#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
348#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
349 &asn_PER_memb_Vanetza_Security_compressed_y_0_constr_4,
350#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
351#if !defined(ASN_DISABLE_JER_SUPPORT)
352 0,
353#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
354 memb_Vanetza_Security_compressed_y_0_constraint_1
355 },
356 0, 0, /* No default value */
357 "compressed-y-0"
358 },
359 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint, choice.compressed_y_1),
360 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
361 -1, /* IMPLICIT tag at current level */
362 &asn_DEF_OCTET_STRING,
363 0,
364 {
365#if !defined(ASN_DISABLE_OER_SUPPORT)
366 &asn_OER_memb_Vanetza_Security_compressed_y_1_constr_5,
367#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
368#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
369 &asn_PER_memb_Vanetza_Security_compressed_y_1_constr_5,
370#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
371#if !defined(ASN_DISABLE_JER_SUPPORT)
372 0,
373#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
374 memb_Vanetza_Security_compressed_y_1_constraint_1
375 },
376 0, 0, /* No default value */
377 "compressed-y-1"
378 },
379 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EccP256CurvePoint, choice.uncompressedP256),
380 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
381 0,
382 &asn_DEF_Vanetza_Security_uncompressedP256_6,
383 0,
384 {
385#if !defined(ASN_DISABLE_OER_SUPPORT)
386 0,
387#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
388#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
389 0,
390#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
391#if !defined(ASN_DISABLE_JER_SUPPORT)
392 0,
393#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
394 0
395 },
396 0, 0, /* No default value */
397 "uncompressedP256"
398 },
399};
400static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_EccP256CurvePoint_tag2el_1[] = {
401 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x-only */
402 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* fill */
403 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* compressed-y-0 */
404 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* compressed-y-1 */
405 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* uncompressedP256 */
406};
407asn_CHOICE_specifics_t asn_SPC_Vanetza_Security_EccP256CurvePoint_specs_1 = {
408 sizeof(struct Vanetza_Security_EccP256CurvePoint),
409 offsetof(struct Vanetza_Security_EccP256CurvePoint, _asn_ctx),
410 offsetof(struct Vanetza_Security_EccP256CurvePoint, present),
411 sizeof(((struct Vanetza_Security_EccP256CurvePoint *)0)->present),
412 asn_MAP_Vanetza_Security_EccP256CurvePoint_tag2el_1,
413 5, /* Count of tags in the map */
414 0, 0,
415 -1 /* Extensions start */
416};
417asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_EccP256CurvePoint = {
418 "EccP256CurvePoint",
419 "EccP256CurvePoint",
420 &asn_OP_CHOICE,
421 0, /* No effective tags (pointer) */
422 0, /* No effective tags (count) */
423 0, /* No tags (pointer) */
424 0, /* No tags (count) */
425 {
426#if !defined(ASN_DISABLE_OER_SUPPORT)
427 &asn_OER_type_Vanetza_Security_EccP256CurvePoint_constr_1,
428#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
429#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
430 &asn_PER_type_Vanetza_Security_EccP256CurvePoint_constr_1,
431#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
432#if !defined(ASN_DISABLE_JER_SUPPORT)
433 0,
434#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
435 CHOICE_constraint
436 },
437 asn_MBR_Vanetza_Security_EccP256CurvePoint_1,
438 5, /* Elements count */
439 &asn_SPC_Vanetza_Security_EccP256CurvePoint_specs_1 /* Additional specs */
440};