Vanetza
Loading...
Searching...
No Matches
CertificateBase.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_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
12 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
13 long value;
14
15 if(!sptr) {
16 ASN__CTFAIL(app_key, td, sptr,
17 "%s: value not given (%s:%d)",
18 td->name, __FILE__, __LINE__);
19 return -1;
20 }
21
22 value = *(const long *)sptr;
23
24 if((value == 3L)) {
25 /* Constraint check succeeded */
26 return 0;
27 } else {
28 ASN__CTFAIL(app_key, td, sptr,
29 "%s: constraint failed (%s:%d)",
30 td->name, __FILE__, __LINE__);
31 return -1;
32 }
33}
34
35#if !defined(ASN_DISABLE_OER_SUPPORT)
36static asn_oer_constraints_t asn_OER_memb_Vanetza_Security_version_constr_2 CC_NOTUSED = {
37 { 1, 1 } /* (3..3) */,
38 -1};
39#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
40#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
41static asn_per_constraints_t asn_PER_memb_Vanetza_Security_version_constr_2 CC_NOTUSED = {
42 { APC_CONSTRAINED, 0, 0, 3, 3 } /* (3..3) */,
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 0, 0 /* No PER value map */
45};
46#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
47asn_TYPE_member_t asn_MBR_Vanetza_Security_CertificateBase_1[] = {
48 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateBase, version),
49 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
50 -1, /* IMPLICIT tag at current level */
51 &asn_DEF_Vanetza_Security_Uint8,
52 0,
53 {
54#if !defined(ASN_DISABLE_OER_SUPPORT)
55 &asn_OER_memb_Vanetza_Security_version_constr_2,
56#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
57#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
58 &asn_PER_memb_Vanetza_Security_version_constr_2,
59#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
60#if !defined(ASN_DISABLE_JER_SUPPORT)
61 0,
62#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
63 memb_Vanetza_Security_version_constraint_1
64 },
65 0, 0, /* No default value */
66 "version"
67 },
68 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateBase, type),
69 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
70 -1, /* IMPLICIT tag at current level */
71 &asn_DEF_Vanetza_Security_CertificateType,
72 0,
73 {
74#if !defined(ASN_DISABLE_OER_SUPPORT)
75 0,
76#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
77#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
78 0,
79#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
80#if !defined(ASN_DISABLE_JER_SUPPORT)
81 0,
82#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
83 0
84 },
85 0, 0, /* No default value */
86 "type"
87 },
88 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateBase, issuer),
89 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
90 +1, /* EXPLICIT tag at current level */
91 &asn_DEF_Vanetza_Security_IssuerIdentifier,
92 0,
93 {
94#if !defined(ASN_DISABLE_OER_SUPPORT)
95 0,
96#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
97#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
98 0,
99#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
100#if !defined(ASN_DISABLE_JER_SUPPORT)
101 0,
102#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
103 0
104 },
105 0, 0, /* No default value */
106 "issuer"
107 },
108 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_CertificateBase, toBeSigned),
109 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
110 -1, /* IMPLICIT tag at current level */
111 &asn_DEF_Vanetza_Security_ToBeSignedCertificate,
112 0,
113 {
114#if !defined(ASN_DISABLE_OER_SUPPORT)
115 0,
116#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
117#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
118 0,
119#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
120#if !defined(ASN_DISABLE_JER_SUPPORT)
121 0,
122#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
123 0
124 },
125 0, 0, /* No default value */
126 "toBeSigned"
127 },
128 { ATF_POINTER, 1, offsetof(struct Vanetza_Security_CertificateBase, signature),
129 (ASN_TAG_CLASS_CONTEXT | (4 << 2)),
130 +1, /* EXPLICIT tag at current level */
131 &asn_DEF_Vanetza_Security_Signature,
132 0,
133 {
134#if !defined(ASN_DISABLE_OER_SUPPORT)
135 0,
136#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
137#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
138 0,
139#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
140#if !defined(ASN_DISABLE_JER_SUPPORT)
141 0,
142#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
143 0
144 },
145 0, 0, /* No default value */
146 "signature"
147 },
148};
149static const int asn_MAP_Vanetza_Security_CertificateBase_oms_1[] = { 4 };
150static const ber_tlv_tag_t asn_DEF_Vanetza_Security_CertificateBase_tags_1[] = {
151 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
152};
153static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_CertificateBase_tag2el_1[] = {
154 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */
155 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* type */
156 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* issuer */
157 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* toBeSigned */
158 { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* signature */
159};
160asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security_CertificateBase_specs_1 = {
161 sizeof(struct Vanetza_Security_CertificateBase),
162 offsetof(struct Vanetza_Security_CertificateBase, _asn_ctx),
163 asn_MAP_Vanetza_Security_CertificateBase_tag2el_1,
164 5, /* Count of tags in the map */
165 asn_MAP_Vanetza_Security_CertificateBase_oms_1, /* Optional members */
166 1, 0, /* Root/Additions */
167 -1, /* First extension addition */
168};
169asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_CertificateBase = {
170 "CertificateBase",
171 "CertificateBase",
172 &asn_OP_SEQUENCE,
173 asn_DEF_Vanetza_Security_CertificateBase_tags_1,
174 sizeof(asn_DEF_Vanetza_Security_CertificateBase_tags_1)
175 /sizeof(asn_DEF_Vanetza_Security_CertificateBase_tags_1[0]), /* 1 */
176 asn_DEF_Vanetza_Security_CertificateBase_tags_1, /* Same as above */
177 sizeof(asn_DEF_Vanetza_Security_CertificateBase_tags_1)
178 /sizeof(asn_DEF_Vanetza_Security_CertificateBase_tags_1[0]), /* 1 */
179 {
180#if !defined(ASN_DISABLE_OER_SUPPORT)
181 0,
182#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
183#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
184 0,
185#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
186#if !defined(ASN_DISABLE_JER_SUPPORT)
187 0,
188#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
189 SEQUENCE_constraint
190 },
191 asn_MBR_Vanetza_Security_CertificateBase_1,
192 5, /* Elements count */
193 &asn_SPC_Vanetza_Security_CertificateBase_specs_1 /* Additional specs */
194};