Vanetza
Loading...
Searching...
No Matches
CertificateId.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 int
11memb_Vanetza_Security_binaryId_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 >= 1UL && size <= 64UL)) {
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
36#if !defined(ASN_DISABLE_OER_SUPPORT)
37static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_binaryId_constr_4 CC_NOTUSED = {
38 { 0, 0 },
39 -1 /* (SIZE(1..64)) */};
40#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
41#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
42static asn_per_constraints_t asn_PER_memb_Vanetza_Security_binaryId_constr_4 CC_NOTUSED = {
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 { APC_CONSTRAINED, 6, 6, 1, 64 } /* (SIZE(1..64)) */,
45 0, 0 /* No PER value map */
46};
47#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
48#if !defined(ASN_DISABLE_OER_SUPPORT)
49asn_oer_constraints_t asn_OER_type_Vanetza_Security_CertificateId_constr_1 CC_NOTUSED = {
50 { 0, 0 },
51 -1};
52#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
53#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
54asn_per_constraints_t asn_PER_type_Vanetza_Security_CertificateId_constr_1 CC_NOTUSED = {
55 { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */,
56 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
57 0, 0 /* No PER value map */
58};
59#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
60asn_TYPE_member_t asn_MBR_Vanetza_Security_CertificateId_1[] = {
61 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateId, choice.linkageData),
62 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
63 -1, /* IMPLICIT tag at current level */
64 &asn_DEF_Vanetza_Security_LinkageData,
65 0,
66 {
67#if !defined(ASN_DISABLE_OER_SUPPORT)
68 0,
69#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
70#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
71 0,
72#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
73#if !defined(ASN_DISABLE_JER_SUPPORT)
74 0,
75#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
76 0
77 },
78 0, 0, /* No default value */
79 "linkageData"
80 },
81 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateId, choice.name),
82 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
83 -1, /* IMPLICIT tag at current level */
84 &asn_DEF_Vanetza_Security_Hostname,
85 0,
86 {
87#if !defined(ASN_DISABLE_OER_SUPPORT)
88 0,
89#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
90#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
91 0,
92#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
93#if !defined(ASN_DISABLE_JER_SUPPORT)
94 0,
95#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
96 0
97 },
98 0, 0, /* No default value */
99 "name"
100 },
101 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateId, choice.binaryId),
102 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
103 -1, /* IMPLICIT tag at current level */
104 &asn_DEF_OCTET_STRING,
105 0,
106 {
107#if !defined(ASN_DISABLE_OER_SUPPORT)
108 &asn_OER_memb_Vanetza_Security_binaryId_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_binaryId_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_binaryId_constraint_1
117 },
118 0, 0, /* No default value */
119 "binaryId"
120 },
121 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateId, choice.none),
122 (ASN_TAG_CLASS_CONTEXT | (3 << 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 "none"
140 },
141};
142static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_CertificateId_tag2el_1[] = {
143 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* linkageData */
144 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* name */
145 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* binaryId */
146 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* none */
147};
148asn_CHOICE_specifics_t asn_SPC_Vanetza_Security_CertificateId_specs_1 = {
149 sizeof(struct Vanetza_Security_CertificateId),
150 offsetof(struct Vanetza_Security_CertificateId, _asn_ctx),
151 offsetof(struct Vanetza_Security_CertificateId, present),
152 sizeof(((struct Vanetza_Security_CertificateId *)0)->present),
153 asn_MAP_Vanetza_Security_CertificateId_tag2el_1,
154 4, /* Count of tags in the map */
155 0, 0,
156 4 /* Extensions start */
157};
158asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_CertificateId = {
159 "CertificateId",
160 "CertificateId",
161 &asn_OP_CHOICE,
162 0, /* No effective tags (pointer) */
163 0, /* No effective tags (count) */
164 0, /* No tags (pointer) */
165 0, /* No tags (count) */
166 {
167#if !defined(ASN_DISABLE_OER_SUPPORT)
168 &asn_OER_type_Vanetza_Security_CertificateId_constr_1,
169#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
170#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
171 &asn_PER_type_Vanetza_Security_CertificateId_constr_1,
172#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
173#if !defined(ASN_DISABLE_JER_SUPPORT)
174 0,
175#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
176 CHOICE_constraint
177 },
178 asn_MBR_Vanetza_Security_CertificateId_1,
179 4, /* Elements count */
180 &asn_SPC_Vanetza_Security_CertificateId_specs_1 /* Additional specs */
181};