Vanetza
 
Loading...
Searching...
No Matches
EciesP256EncryptedKey.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 "EciesP256EncryptedKey.h"
9
10static int
11memb_c_constraint_1(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 == 16UL)) {
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_t_constraint_1(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 == 16UL)) {
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
62#if !defined(ASN_DISABLE_OER_SUPPORT)
63static asn_oer_constraints_t asn_OER_memb_c_constr_3 CC_NOTUSED = {
64 { 0, 0 },
65 16 /* (SIZE(16..16)) */};
66#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
67#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
68static asn_per_constraints_t asn_PER_memb_c_constr_3 CC_NOTUSED = {
69 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
70 { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */,
71 0, 0 /* No PER value map */
72};
73#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
74#if !defined(ASN_DISABLE_OER_SUPPORT)
75static asn_oer_constraints_t asn_OER_memb_t_constr_4 CC_NOTUSED = {
76 { 0, 0 },
77 16 /* (SIZE(16..16)) */};
78#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
79#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
80static asn_per_constraints_t asn_PER_memb_t_constr_4 CC_NOTUSED = {
81 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
82 { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */,
83 0, 0 /* No PER value map */
84};
85#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
86asn_TYPE_member_t asn_MBR_EciesP256EncryptedKey_1[] = {
87 { ATF_NOFLAGS, 0, offsetof(struct EciesP256EncryptedKey, v),
88 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
89 +1, /* EXPLICIT tag at current level */
90 &asn_DEF_EccP256CurvePoint,
91 0,
92 {
93#if !defined(ASN_DISABLE_OER_SUPPORT)
94 0,
95#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
96#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
97 0,
98#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
99 0
100 },
101 0, 0, /* No default value */
102 "v"
103 },
104 { ATF_NOFLAGS, 0, offsetof(struct EciesP256EncryptedKey, c),
105 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
106 -1, /* IMPLICIT tag at current level */
107 &asn_DEF_OCTET_STRING,
108 0,
109 {
110#if !defined(ASN_DISABLE_OER_SUPPORT)
111 &asn_OER_memb_c_constr_3,
112#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
113#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
114 &asn_PER_memb_c_constr_3,
115#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
116 memb_c_constraint_1
117 },
118 0, 0, /* No default value */
119 "c"
120 },
121 { ATF_NOFLAGS, 0, offsetof(struct EciesP256EncryptedKey, t),
122 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
123 -1, /* IMPLICIT tag at current level */
124 &asn_DEF_OCTET_STRING,
125 0,
126 {
127#if !defined(ASN_DISABLE_OER_SUPPORT)
128 &asn_OER_memb_t_constr_4,
129#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
130#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
131 &asn_PER_memb_t_constr_4,
132#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
133 memb_t_constraint_1
134 },
135 0, 0, /* No default value */
136 "t"
137 },
138};
139static const ber_tlv_tag_t asn_DEF_EciesP256EncryptedKey_tags_1[] = {
140 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
141};
142static const asn_TYPE_tag2member_t asn_MAP_EciesP256EncryptedKey_tag2el_1[] = {
143 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* v */
144 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* c */
145 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* t */
146};
147asn_SEQUENCE_specifics_t asn_SPC_EciesP256EncryptedKey_specs_1 = {
148 sizeof(struct EciesP256EncryptedKey),
149 offsetof(struct EciesP256EncryptedKey, _asn_ctx),
150 asn_MAP_EciesP256EncryptedKey_tag2el_1,
151 3, /* Count of tags in the map */
152 0, 0, 0, /* Optional elements (not needed) */
153 -1, /* First extension addition */
154};
155asn_TYPE_descriptor_t asn_DEF_EciesP256EncryptedKey = {
156 "EciesP256EncryptedKey",
157 "EciesP256EncryptedKey",
158 &asn_OP_SEQUENCE,
159 asn_DEF_EciesP256EncryptedKey_tags_1,
160 sizeof(asn_DEF_EciesP256EncryptedKey_tags_1)
161 /sizeof(asn_DEF_EciesP256EncryptedKey_tags_1[0]), /* 1 */
162 asn_DEF_EciesP256EncryptedKey_tags_1, /* Same as above */
163 sizeof(asn_DEF_EciesP256EncryptedKey_tags_1)
164 /sizeof(asn_DEF_EciesP256EncryptedKey_tags_1[0]), /* 1 */
165 {
166#if !defined(ASN_DISABLE_OER_SUPPORT)
167 0,
168#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
169#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
170 0,
171#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
172 SEQUENCE_constraint
173 },
174 asn_MBR_EciesP256EncryptedKey_1,
175 3, /* Elements count */
176 &asn_SPC_EciesP256EncryptedKey_specs_1 /* Additional specs */
177};
178