Vanetza
 
Loading...
Searching...
No Matches
SymmetricEncryptionKey.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 "SymmetricEncryptionKey.h"
9
10static int
11memb_aes128Ccm_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
36#if !defined(ASN_DISABLE_OER_SUPPORT)
37static asn_oer_constraints_t asn_OER_memb_aes128Ccm_constr_2 CC_NOTUSED = {
38 { 0, 0 },
39 16 /* (SIZE(16..16)) */};
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_aes128Ccm_constr_2 CC_NOTUSED = {
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */,
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)
49static asn_oer_constraints_t asn_OER_type_SymmetricEncryptionKey_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_SymmetricEncryptionKey_constr_1 CC_NOTUSED = {
55 { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */,
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_SymmetricEncryptionKey_1[] = {
61 { ATF_NOFLAGS, 0, offsetof(struct SymmetricEncryptionKey, choice.aes128Ccm),
62 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
63 -1, /* IMPLICIT tag at current level */
64 &asn_DEF_OCTET_STRING,
65 0,
66 {
67#if !defined(ASN_DISABLE_OER_SUPPORT)
68 &asn_OER_memb_aes128Ccm_constr_2,
69#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
70#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
71 &asn_PER_memb_aes128Ccm_constr_2,
72#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
73 memb_aes128Ccm_constraint_1
74 },
75 0, 0, /* No default value */
76 "aes128Ccm"
77 },
78};
79static const asn_TYPE_tag2member_t asn_MAP_SymmetricEncryptionKey_tag2el_1[] = {
80 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* aes128Ccm */
81};
82asn_CHOICE_specifics_t asn_SPC_SymmetricEncryptionKey_specs_1 = {
83 sizeof(struct SymmetricEncryptionKey),
84 offsetof(struct SymmetricEncryptionKey, _asn_ctx),
85 offsetof(struct SymmetricEncryptionKey, present),
86 sizeof(((struct SymmetricEncryptionKey *)0)->present),
87 asn_MAP_SymmetricEncryptionKey_tag2el_1,
88 1, /* Count of tags in the map */
89 0, 0,
90 1 /* Extensions start */
91};
92asn_TYPE_descriptor_t asn_DEF_SymmetricEncryptionKey = {
93 "SymmetricEncryptionKey",
94 "SymmetricEncryptionKey",
95 &asn_OP_CHOICE,
96 0, /* No effective tags (pointer) */
97 0, /* No effective tags (count) */
98 0, /* No tags (pointer) */
99 0, /* No tags (count) */
100 {
101#if !defined(ASN_DISABLE_OER_SUPPORT)
102 &asn_OER_type_SymmetricEncryptionKey_constr_1,
103#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
104#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
105 &asn_PER_type_SymmetricEncryptionKey_constr_1,
106#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
107 CHOICE_constraint
108 },
109 asn_MBR_SymmetricEncryptionKey_1,
110 1, /* Elements count */
111 &asn_SPC_SymmetricEncryptionKey_specs_1 /* Additional specs */
112};
113