Vanetza
 
Loading...
Searching...
No Matches
EccP384CurvePoint.c
1/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "IEEE1609dot2BaseTypes"
4 * found in "asn1/IEEE1609dot2BaseTypes.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -R`
6 */
7
8#include "EccP384CurvePoint.h"
9
10static int
11memb_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 == 48UL)) {
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_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 == 48UL)) {
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_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 == 48UL)) {
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_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 == 48UL)) {
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_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 == 48UL)) {
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_x_constr_7 CC_NOTUSED = {
142 { 0, 0 },
143 48 /* (SIZE(48..48)) */};
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_x_constr_7 CC_NOTUSED = {
147 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
148 { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */,
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_y_constr_8 CC_NOTUSED = {
154 { 0, 0 },
155 48 /* (SIZE(48..48)) */};
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_y_constr_8 CC_NOTUSED = {
159 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
160 { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */,
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_x_only_constr_2 CC_NOTUSED = {
166 { 0, 0 },
167 48 /* (SIZE(48..48)) */};
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_x_only_constr_2 CC_NOTUSED = {
171 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
172 { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */,
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_compressed_y_0_constr_4 CC_NOTUSED = {
178 { 0, 0 },
179 48 /* (SIZE(48..48)) */};
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_compressed_y_0_constr_4 CC_NOTUSED = {
183 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
184 { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */,
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_compressed_y_1_constr_5 CC_NOTUSED = {
190 { 0, 0 },
191 48 /* (SIZE(48..48)) */};
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_compressed_y_1_constr_5 CC_NOTUSED = {
195 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
196 { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */,
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)
201static asn_oer_constraints_t asn_OER_type_EccP384CurvePoint_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_EccP384CurvePoint_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_uncompressedP384_6[] = {
213 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint__uncompressedP384, 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_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_x_constr_7,
224#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
225 memb_x_constraint_6
226 },
227 0, 0, /* No default value */
228 "x"
229 },
230 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint__uncompressedP384, y),
231 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
232 -1, /* IMPLICIT tag at current level */
233 &asn_DEF_OCTET_STRING,
234 0,
235 {
236#if !defined(ASN_DISABLE_OER_SUPPORT)
237 &asn_OER_memb_y_constr_8,
238#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
239#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
240 &asn_PER_memb_y_constr_8,
241#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
242 memb_y_constraint_6
243 },
244 0, 0, /* No default value */
245 "y"
246 },
247};
248static const ber_tlv_tag_t asn_DEF_uncompressedP384_tags_6[] = {
249 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
250 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
251};
252static const asn_TYPE_tag2member_t asn_MAP_uncompressedP384_tag2el_6[] = {
253 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x */
254 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* y */
255};
256static asn_SEQUENCE_specifics_t asn_SPC_uncompressedP384_specs_6 = {
257 sizeof(struct EccP384CurvePoint__uncompressedP384),
258 offsetof(struct EccP384CurvePoint__uncompressedP384, _asn_ctx),
259 asn_MAP_uncompressedP384_tag2el_6,
260 2, /* Count of tags in the map */
261 0, 0, 0, /* Optional elements (not needed) */
262 -1, /* First extension addition */
263};
264static /* Use -fall-defs-global to expose */
265asn_TYPE_descriptor_t asn_DEF_uncompressedP384_6 = {
266 "uncompressedP384",
267 "uncompressedP384",
268 &asn_OP_SEQUENCE,
269 asn_DEF_uncompressedP384_tags_6,
270 sizeof(asn_DEF_uncompressedP384_tags_6)
271 /sizeof(asn_DEF_uncompressedP384_tags_6[0]) - 1, /* 1 */
272 asn_DEF_uncompressedP384_tags_6, /* Same as above */
273 sizeof(asn_DEF_uncompressedP384_tags_6)
274 /sizeof(asn_DEF_uncompressedP384_tags_6[0]), /* 2 */
275 {
276#if !defined(ASN_DISABLE_OER_SUPPORT)
277 0,
278#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
279#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
280 0,
281#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
282 SEQUENCE_constraint
283 },
284 asn_MBR_uncompressedP384_6,
285 2, /* Elements count */
286 &asn_SPC_uncompressedP384_specs_6 /* Additional specs */
287};
288
289asn_TYPE_member_t asn_MBR_EccP384CurvePoint_1[] = {
290 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint, choice.x_only),
291 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
292 -1, /* IMPLICIT tag at current level */
293 &asn_DEF_OCTET_STRING,
294 0,
295 {
296#if !defined(ASN_DISABLE_OER_SUPPORT)
297 &asn_OER_memb_x_only_constr_2,
298#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
299#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
300 &asn_PER_memb_x_only_constr_2,
301#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
302 memb_x_only_constraint_1
303 },
304 0, 0, /* No default value */
305 "x-only"
306 },
307 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint, choice.fill),
308 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
309 -1, /* IMPLICIT tag at current level */
310 &asn_DEF_NULL,
311 0,
312 {
313#if !defined(ASN_DISABLE_OER_SUPPORT)
314 0,
315#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
316#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
317 0,
318#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
319 0
320 },
321 0, 0, /* No default value */
322 "fill"
323 },
324 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint, choice.compressed_y_0),
325 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
326 -1, /* IMPLICIT tag at current level */
327 &asn_DEF_OCTET_STRING,
328 0,
329 {
330#if !defined(ASN_DISABLE_OER_SUPPORT)
331 &asn_OER_memb_compressed_y_0_constr_4,
332#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
333#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
334 &asn_PER_memb_compressed_y_0_constr_4,
335#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
336 memb_compressed_y_0_constraint_1
337 },
338 0, 0, /* No default value */
339 "compressed-y-0"
340 },
341 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint, choice.compressed_y_1),
342 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
343 -1, /* IMPLICIT tag at current level */
344 &asn_DEF_OCTET_STRING,
345 0,
346 {
347#if !defined(ASN_DISABLE_OER_SUPPORT)
348 &asn_OER_memb_compressed_y_1_constr_5,
349#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
350#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
351 &asn_PER_memb_compressed_y_1_constr_5,
352#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
353 memb_compressed_y_1_constraint_1
354 },
355 0, 0, /* No default value */
356 "compressed-y-1"
357 },
358 { ATF_NOFLAGS, 0, offsetof(struct EccP384CurvePoint, choice.uncompressedP384),
359 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
360 0,
361 &asn_DEF_uncompressedP384_6,
362 0,
363 {
364#if !defined(ASN_DISABLE_OER_SUPPORT)
365 0,
366#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
367#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
368 0,
369#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
370 0
371 },
372 0, 0, /* No default value */
373 "uncompressedP384"
374 },
375};
376static const asn_TYPE_tag2member_t asn_MAP_EccP384CurvePoint_tag2el_1[] = {
377 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x-only */
378 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* fill */
379 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* compressed-y-0 */
380 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* compressed-y-1 */
381 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* uncompressedP384 */
382};
383asn_CHOICE_specifics_t asn_SPC_EccP384CurvePoint_specs_1 = {
384 sizeof(struct EccP384CurvePoint),
385 offsetof(struct EccP384CurvePoint, _asn_ctx),
386 offsetof(struct EccP384CurvePoint, present),
387 sizeof(((struct EccP384CurvePoint *)0)->present),
388 asn_MAP_EccP384CurvePoint_tag2el_1,
389 5, /* Count of tags in the map */
390 0, 0,
391 -1 /* Extensions start */
392};
393asn_TYPE_descriptor_t asn_DEF_EccP384CurvePoint = {
394 "EccP384CurvePoint",
395 "EccP384CurvePoint",
396 &asn_OP_CHOICE,
397 0, /* No effective tags (pointer) */
398 0, /* No effective tags (count) */
399 0, /* No tags (pointer) */
400 0, /* No tags (count) */
401 {
402#if !defined(ASN_DISABLE_OER_SUPPORT)
403 &asn_OER_type_EccP384CurvePoint_constr_1,
404#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
405#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
406 &asn_PER_type_EccP384CurvePoint_constr_1,
407#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
408 CHOICE_constraint
409 },
410 asn_MBR_EccP384CurvePoint_1,
411 5, /* Elements count */
412 &asn_SPC_EccP384CurvePoint_specs_1 /* Additional specs */
413};
414