Vanetza
 
Loading...
Searching...
No Matches
SharedAtRequest.c
1/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "EtsiTs102941TypesAuthorization"
4 * found in "asn1/TS102941v131-TypesAuthorization.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -R`
6 */
7
8#include "SharedAtRequest.h"
9
10static int
11memb_keyTag_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_requestedSubjectAttributes_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
38 asn_app_constraint_failed_f *ctfailcb, void *app_key) {
39
40 if(!sptr) {
41 ASN__CTFAIL(app_key, td, sptr,
42 "%s: value not given (%s:%d)",
43 td->name, __FILE__, __LINE__);
44 return -1;
45 }
46
47
48 if(1 /* No applicable constraints whatsoever */) {
49 /* Nothing is here. See below */
50 }
51
52 return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
53}
54
55#if !defined(ASN_DISABLE_OER_SUPPORT)
56static asn_oer_constraints_t asn_OER_memb_keyTag_constr_3 CC_NOTUSED = {
57 { 0, 0 },
58 16 /* (SIZE(16..16)) */};
59#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
60#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
61static asn_per_constraints_t asn_PER_memb_keyTag_constr_3 CC_NOTUSED = {
62 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
63 { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */,
64 0, 0 /* No PER value map */
65};
66#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
67#if !defined(ASN_DISABLE_OER_SUPPORT)
68static asn_oer_constraints_t asn_OER_memb_requestedSubjectAttributes_constr_5 CC_NOTUSED = {
69 { 0, 0 },
70 -1};
71#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
72#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
73static asn_per_constraints_t asn_PER_memb_requestedSubjectAttributes_constr_5 CC_NOTUSED = {
74 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
75 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
76 0, 0 /* No PER value map */
77};
78#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
79asn_TYPE_member_t asn_MBR_SharedAtRequest_1[] = {
80 { ATF_NOFLAGS, 0, offsetof(struct SharedAtRequest, eaId),
81 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
82 -1, /* IMPLICIT tag at current level */
83 &asn_DEF_HashedId8,
84 0,
85 {
86#if !defined(ASN_DISABLE_OER_SUPPORT)
87 0,
88#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
89#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
90 0,
91#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
92 0
93 },
94 0, 0, /* No default value */
95 "eaId"
96 },
97 { ATF_NOFLAGS, 0, offsetof(struct SharedAtRequest, keyTag),
98 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
99 -1, /* IMPLICIT tag at current level */
100 &asn_DEF_OCTET_STRING,
101 0,
102 {
103#if !defined(ASN_DISABLE_OER_SUPPORT)
104 &asn_OER_memb_keyTag_constr_3,
105#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
106#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
107 &asn_PER_memb_keyTag_constr_3,
108#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
109 memb_keyTag_constraint_1
110 },
111 0, 0, /* No default value */
112 "keyTag"
113 },
114 { ATF_NOFLAGS, 0, offsetof(struct SharedAtRequest, certificateFormat),
115 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
116 -1, /* IMPLICIT tag at current level */
117 &asn_DEF_CertificateFormat,
118 0,
119 {
120#if !defined(ASN_DISABLE_OER_SUPPORT)
121 0,
122#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
123#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
124 0,
125#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
126 0
127 },
128 0, 0, /* No default value */
129 "certificateFormat"
130 },
131 { ATF_NOFLAGS, 0, offsetof(struct SharedAtRequest, requestedSubjectAttributes),
132 (ASN_TAG_CLASS_CONTEXT | (3 << 2)),
133 -1, /* IMPLICIT tag at current level */
134 &asn_DEF_CertificateSubjectAttributes,
135 0,
136 {
137#if !defined(ASN_DISABLE_OER_SUPPORT)
138 &asn_OER_memb_requestedSubjectAttributes_constr_5,
139#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
140#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
141 &asn_PER_memb_requestedSubjectAttributes_constr_5,
142#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
143 memb_requestedSubjectAttributes_constraint_1
144 },
145 0, 0, /* No default value */
146 "requestedSubjectAttributes"
147 },
148};
149static const ber_tlv_tag_t asn_DEF_SharedAtRequest_tags_1[] = {
150 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
151};
152static const asn_TYPE_tag2member_t asn_MAP_SharedAtRequest_tag2el_1[] = {
153 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eaId */
154 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* keyTag */
155 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* certificateFormat */
156 { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* requestedSubjectAttributes */
157};
158asn_SEQUENCE_specifics_t asn_SPC_SharedAtRequest_specs_1 = {
159 sizeof(struct SharedAtRequest),
160 offsetof(struct SharedAtRequest, _asn_ctx),
161 asn_MAP_SharedAtRequest_tag2el_1,
162 4, /* Count of tags in the map */
163 0, 0, 0, /* Optional elements (not needed) */
164 4, /* First extension addition */
165};
166asn_TYPE_descriptor_t asn_DEF_SharedAtRequest = {
167 "SharedAtRequest",
168 "SharedAtRequest",
169 &asn_OP_SEQUENCE,
170 asn_DEF_SharedAtRequest_tags_1,
171 sizeof(asn_DEF_SharedAtRequest_tags_1)
172 /sizeof(asn_DEF_SharedAtRequest_tags_1[0]), /* 1 */
173 asn_DEF_SharedAtRequest_tags_1, /* Same as above */
174 sizeof(asn_DEF_SharedAtRequest_tags_1)
175 /sizeof(asn_DEF_SharedAtRequest_tags_1[0]), /* 1 */
176 {
177#if !defined(ASN_DISABLE_OER_SUPPORT)
178 0,
179#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
180#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
181 0,
182#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
183 SEQUENCE_constraint
184 },
185 asn_MBR_SharedAtRequest_1,
186 4, /* Elements count */
187 &asn_SPC_SharedAtRequest_specs_1 /* Additional specs */
188};
189