Vanetza
Loading...
Searching...
No Matches
EcdsaP256Signature.c
1/*
2 * Generated by asn1c
3 * From ASN.1 module "Ieee1609Dot2BaseTypes"
4 * found in "Ieee1609Dot2BaseTypes.asn"
5 * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security_ -R`
6 */
7
9
10static int
11memb_Vanetza_Security_sSig_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 == 32UL)) {
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_sSig_constr_3 CC_NOTUSED = {
38 { 0, 0 },
39 32 /* (SIZE(32..32)) */};
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_sSig_constr_3 CC_NOTUSED = {
43 { APC_UNCONSTRAINED, -1, -1, 0, 0 },
44 { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */,
45 0, 0 /* No PER value map */
46};
47#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
48asn_TYPE_member_t asn_MBR_Vanetza_Security_EcdsaP256Signature_1[] = {
49 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EcdsaP256Signature, rSig),
50 (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
51 +1, /* EXPLICIT tag at current level */
52 &asn_DEF_Vanetza_Security_EccP256CurvePoint,
53 0,
54 {
55#if !defined(ASN_DISABLE_OER_SUPPORT)
56 0,
57#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
58#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
59 0,
60#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
61#if !defined(ASN_DISABLE_JER_SUPPORT)
62 0,
63#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
64 0
65 },
66 0, 0, /* No default value */
67 "rSig"
68 },
69 { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security_EcdsaP256Signature, sSig),
70 (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
71 -1, /* IMPLICIT tag at current level */
72 &asn_DEF_OCTET_STRING,
73 0,
74 {
75#if !defined(ASN_DISABLE_OER_SUPPORT)
76 &asn_OER_memb_Vanetza_Security_sSig_constr_3,
77#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
78#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
79 &asn_PER_memb_Vanetza_Security_sSig_constr_3,
80#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
81#if !defined(ASN_DISABLE_JER_SUPPORT)
82 0,
83#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
84 memb_Vanetza_Security_sSig_constraint_1
85 },
86 0, 0, /* No default value */
87 "sSig"
88 },
89};
90static const ber_tlv_tag_t asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1[] = {
91 (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
92};
93static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security_EcdsaP256Signature_tag2el_1[] = {
94 { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rSig */
95 { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sSig */
96};
97asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security_EcdsaP256Signature_specs_1 = {
98 sizeof(struct Vanetza_Security_EcdsaP256Signature),
99 offsetof(struct Vanetza_Security_EcdsaP256Signature, _asn_ctx),
100 asn_MAP_Vanetza_Security_EcdsaP256Signature_tag2el_1,
101 2, /* Count of tags in the map */
102 0, 0, 0, /* Optional elements (not needed) */
103 -1, /* First extension addition */
104};
105asn_TYPE_descriptor_t asn_DEF_Vanetza_Security_EcdsaP256Signature = {
106 "EcdsaP256Signature",
107 "EcdsaP256Signature",
108 &asn_OP_SEQUENCE,
109 asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1,
110 sizeof(asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1)
111 /sizeof(asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1[0]), /* 1 */
112 asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1, /* Same as above */
113 sizeof(asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1)
114 /sizeof(asn_DEF_Vanetza_Security_EcdsaP256Signature_tags_1[0]), /* 1 */
115 {
116#if !defined(ASN_DISABLE_OER_SUPPORT)
117 0,
118#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */
119#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT)
120 0,
121#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */
122#if !defined(ASN_DISABLE_JER_SUPPORT)
123 0,
124#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */
125 SEQUENCE_constraint
126 },
127 asn_MBR_Vanetza_Security_EcdsaP256Signature_1,
128 2, /* Elements count */
129 &asn_SPC_Vanetza_Security_EcdsaP256Signature_specs_1 /* Additional specs */
130};