Vanetza
 
Loading...
Searching...
No Matches
AuthorizationValidationResponse.c
1/*
2 * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
3 * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation"
4 * found in "asn1/TS102941v131-TypesAuthorizationValidation.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -R`
6 */
7
8#include "AuthorizationValidationResponse.h"
9
10static int
11memb_requestHash_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_confirmedSubjectAttributes_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_requestHash_constr_2 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_requestHash_constr_2 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_confirmedSubjectAttributes_constr_4 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_confirmedSubjectAttributes_constr_4 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) */
79#if !defined(ASN_DISABLE_OER_SUPPORT)
80static asn_oer_constraints_t asn_OER_type_AuthorizationValidationResponse_constr_1 CC_NOTUSED = {
81 { 0, 0 },
82 -1};
83#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
84#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
85asn_per_constraints_t asn_PER_type_AuthorizationValidationResponse_constr_1 CC_NOTUSED = {
86 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
87 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
88 0, 0 /* No PER value map */
89};
90#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
91asn_TYPE_member_t asn_MBR_AuthorizationValidationResponse_1[] = {
92 { ATF_NOFLAGS, 0, offsetof(struct AuthorizationValidationResponse, requestHash),
93 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
94 -1, /* IMPLICIT tag at current level */
95 &asn_DEF_OCTET_STRING,
96 0,
97 {
98#if !defined(ASN_DISABLE_OER_SUPPORT)
99 &asn_OER_memb_requestHash_constr_2,
100#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
101#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
102 &asn_PER_memb_requestHash_constr_2,
103#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
104 memb_requestHash_constraint_1
105 },
106 0, 0, /* No default value */
107 "requestHash"
108 },
109 { ATF_NOFLAGS, 0, offsetof(struct AuthorizationValidationResponse, responseCode),
110 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
111 -1, /* IMPLICIT tag at current level */
112 &asn_DEF_AuthorizationValidationResponseCode,
113 0,
114 {
115#if !defined(ASN_DISABLE_OER_SUPPORT)
116 0,
117#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
118#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
119 0,
120#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
121 0
122 },
123 0, 0, /* No default value */
124 "responseCode"
125 },
126 { ATF_POINTER, 1, offsetof(struct AuthorizationValidationResponse, confirmedSubjectAttributes),
127 (ASN_TAG_CLASS_CONTEXT | (2 << 2)),
128 -1, /* IMPLICIT tag at current level */
129 &asn_DEF_CertificateSubjectAttributes,
130 0,
131 {
132#if !defined(ASN_DISABLE_OER_SUPPORT)
133 &asn_OER_memb_confirmedSubjectAttributes_constr_4,
134#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
135#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
136 &asn_PER_memb_confirmedSubjectAttributes_constr_4,
137#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
138 memb_confirmedSubjectAttributes_constraint_1
139 },
140 0, 0, /* No default value */
141 "confirmedSubjectAttributes"
142 },
143};
144static const int asn_MAP_AuthorizationValidationResponse_oms_1[] = { 2 };
145static const ber_tlv_tag_t asn_DEF_AuthorizationValidationResponse_tags_1[] = {
146 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
147};
148static const asn_TYPE_tag2member_t asn_MAP_AuthorizationValidationResponse_tag2el_1[] = {
149 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* requestHash */
150 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* responseCode */
151 { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* confirmedSubjectAttributes */
152};
153asn_SEQUENCE_specifics_t asn_SPC_AuthorizationValidationResponse_specs_1 = {
154 sizeof(struct AuthorizationValidationResponse),
155 offsetof(struct AuthorizationValidationResponse, _asn_ctx),
156 asn_MAP_AuthorizationValidationResponse_tag2el_1,
157 3, /* Count of tags in the map */
158 asn_MAP_AuthorizationValidationResponse_oms_1, /* Optional members */
159 1, 0, /* Root/Additions */
160 3, /* First extension addition */
161};
162asn_TYPE_descriptor_t asn_DEF_AuthorizationValidationResponse = {
163 "AuthorizationValidationResponse",
164 "AuthorizationValidationResponse",
165 &asn_OP_SEQUENCE,
166 asn_DEF_AuthorizationValidationResponse_tags_1,
167 sizeof(asn_DEF_AuthorizationValidationResponse_tags_1)
168 /sizeof(asn_DEF_AuthorizationValidationResponse_tags_1[0]), /* 1 */
169 asn_DEF_AuthorizationValidationResponse_tags_1, /* Same as above */
170 sizeof(asn_DEF_AuthorizationValidationResponse_tags_1)
171 /sizeof(asn_DEF_AuthorizationValidationResponse_tags_1[0]), /* 1 */
172 {
173#if !defined(ASN_DISABLE_OER_SUPPORT)
174 &asn_OER_type_AuthorizationValidationResponse_constr_1,
175#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
176#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
177 &asn_PER_type_AuthorizationValidationResponse_constr_1,
178#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
179 SEQUENCE_constraint
180 },
181 asn_MBR_AuthorizationValidationResponse_1,
182 3, /* Elements count */
183 &asn_SPC_AuthorizationValidationResponse_specs_1 /* Additional specs */
184};
185