Commit 8cac6a3f authored by filatov's avatar filatov
Browse files

fix signer hash calculation

add asncodec files
parent a34de1d4
......@@ -13,7 +13,7 @@ bins = asn1certgen
sources := asn1certgen.c ecc_openssl.c
sources-WIN32 := applink.c
packages += cshared openssl
predirs := asncodec
includes += asncodec
itsLib := asncodec/libSecItsAsn.a
libs += $(itsLib)
libs += $(outdir)/libItsCertAsn.a
include ../common.mk
......@@ -23,14 +23,25 @@ static const char * _keyPath = NULL;
static int _force = 0;
static const char * _cfgFile = NULL;
static const char _sha256_emptyString[] = {
0xe3, 0xb0, 0xc4, 0x42, 0x98, 0xfc, 0x1c, 0x14, 0x9a, 0xfb, 0xf4, 0xc8, 0x99, 0x6f, 0xb9, 0x24,
0x27, 0xae, 0x41, 0xe4, 0x64, 0x9b, 0x93, 0x4c, 0xa4, 0x95, 0x99, 0x1b, 0x78, 0x52, 0xb8, 0x55
};
static const char _sha384_emptyString[] = {
0x38, 0xb0, 0x60, 0xa7, 0x51, 0xac, 0x96, 0x38, 0x4c, 0xd9, 0x32, 0x7e, 0xb1, 0xb1, 0xe3, 0x6a,
0x21, 0xfd, 0xb7, 0x11, 0x14, 0xbe, 0x07, 0x43, 0x4c, 0x0c, 0xc7, 0xbf, 0x63, 0xf6, 0xe1, 0xda,
0x27, 0x4e, 0xde, 0xbf, 0xe7, 0x6f, 0x65, 0xfb, 0xd5, 0x1a, 0xd2, 0xf1, 0x48, 0x98, 0xb9, 0x5b
};
EtsiTs103097Certificate_t * _cert = NULL;
EtsiTs103097Certificate_t * _issuer = NULL;
char _tbsHash[256]; // has space for issuer hash
int _tbsHashLength = 0;
char _tbsHash[512]; // has space for issuer hash + signer hash
int _tbsHashLength = 0;
char _signerHash[256]; // has space for issuer hash
char _signerHashBuf[256]; // has space for issuer hash
char* _signerHash = &_signerHashBuf[0];
int _signerHashLength = 0;
static const char * const _key_formats[] = {
......@@ -156,7 +167,7 @@ static asn_enc_rval_t Signature_oer_encoder(const asn_TYPE_descriptor_t *td,
char h[48];
int hl = 0;
// calculate joint hash
memcpy(_tbsHash, _signerHash, _signerHashLength);
memcpy(_tbsHash+_tbsHashLength, _signerHash, _signerHashLength);
switch (hashId)
{
case sha_256:
......@@ -242,6 +253,7 @@ int main(int argc, char ** argv)
tbsOps.oer_encoder = ToBeSignedCertificate_oer_encoder;
signatureOps.oer_encoder = Signature_oer_encoder;
PublicVerificationKey_PR hashType = PublicVerificationKey_PR_NOTHING;
rc_d = asn_decode(NULL, ATS_BASIC_XER, &asn_DEF_EtsiTs103097Certificate, (void**)&cert, buf, ebuf - buf);
if (rc_d.code != RC_OK){
......@@ -255,8 +267,6 @@ int main(int argc, char ** argv)
return -1;
}
if (_signerName){
PublicVerificationKey_PR hashType = PublicVerificationKey_PR_NOTHING;
cvstrncpy(buf, CERT_MAX_SIZE, _searchPath, "/", _signerName, ".oer", NULL);
ebuf = cstrnload(buf, CERT_MAX_SIZE, buf);
if (ebuf == NULL){
......@@ -300,6 +310,31 @@ int main(int argc, char ** argv)
if (signer){
ASN_STRUCT_FREE(asn_DEF_EtsiTs103097Certificate, signer);
}
} else {
// self-signed
// use hash(empty string)
switch (cert->toBeSigned.verifyKeyIndicator.present){
case VerificationKeyIndicator_PR_verificationKey:
hashType = cert->toBeSigned.verifyKeyIndicator.choice.verificationKey.present;
break;
case VerificationKeyIndicator_PR_reconstructionValue:
hashType = PublicVerificationKey_PR_ecdsaNistP256;
break;
}
switch (hashType) {
case PublicVerificationKey_PR_ecdsaBrainpoolP256r1:
case PublicVerificationKey_PR_ecdsaNistP256:
_signerHash = &_sha256_emptyString[0];
_signerHashLength = sha256_hash_size;
break;
case PublicVerificationKey_PR_ecdsaBrainpoolP384r1:
_signerHash = &_sha384_emptyString[0];
_signerHashLength = sha384_hash_size;
break;
default:
fprintf(stderr, "Unknown verification key curve type\n");
return -1;
}
}
// generate keys if necessary
......
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941TrustLists"
* found in "../asn1/EtsiTs102941/EtsiTs102941TrustLists.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#include "AaEntry.h"
asn_TYPE_member_t asn_MBR_AaEntry_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct AaEntry, aaCertificate),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_EtsiTs103097Certificate,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"aaCertificate"
},
{ ATF_NOFLAGS, 0, offsetof(struct AaEntry, accessPoint),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Url,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"accessPoint"
},
};
static const ber_tlv_tag_t asn_DEF_AaEntry_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_AaEntry_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* aaCertificate */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* accessPoint */
};
asn_SEQUENCE_specifics_t asn_SPC_AaEntry_specs_1 = {
sizeof(struct AaEntry),
offsetof(struct AaEntry, _asn_ctx),
asn_MAP_AaEntry_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_AaEntry = {
"AaEntry",
"AaEntry",
&asn_OP_SEQUENCE,
asn_DEF_AaEntry_tags_1,
sizeof(asn_DEF_AaEntry_tags_1)
/sizeof(asn_DEF_AaEntry_tags_1[0]), /* 1 */
asn_DEF_AaEntry_tags_1, /* Same as above */
sizeof(asn_DEF_AaEntry_tags_1)
/sizeof(asn_DEF_AaEntry_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_AaEntry_1,
2, /* Elements count */
&asn_SPC_AaEntry_specs_1 /* Additional specs */
};
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941TrustLists"
* found in "../asn1/EtsiTs102941/EtsiTs102941TrustLists.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#ifndef _AaEntry_H_
#define _AaEntry_H_
#include <asn_application.h>
/* Including external dependencies */
#include "EtsiTs103097Certificate.h"
#include "Url.h"
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* AaEntry */
typedef struct AaEntry {
EtsiTs103097Certificate_t aaCertificate;
Url_t accessPoint;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} AaEntry_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AaEntry;
extern asn_SEQUENCE_specifics_t asn_SPC_AaEntry_specs_1;
extern asn_TYPE_member_t asn_MBR_AaEntry_1[2];
#ifdef __cplusplus
}
#endif
#endif /* _AaEntry_H_ */
#include <asn_internal.h>
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "IEEE1609dot2"
* found in "../asn1/1609Dot2-ASN1/asn1c/IEEE1609dot2.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#include "AesCcmCiphertext.h"
static int
memb_nonce_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
size_t size;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
size = st->size;
if((size == 12)) {
/* Constraint check succeeded */
return 0;
} else {
ASN__CTFAIL(app_key, td, sptr,
"%s: constraint failed (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
}
static asn_oer_constraints_t asn_OER_memb_nonce_constr_2 CC_NOTUSED = {
{ 0, 0 },
12 /* (SIZE(12..12)) */};
asn_TYPE_member_t asn_MBR_AesCcmCiphertext_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct AesCcmCiphertext, nonce),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_OCTET_STRING,
0,
{ &asn_OER_memb_nonce_constr_2, 0, memb_nonce_constraint_1 },
0, 0, /* No default value */
"nonce"
},
{ ATF_NOFLAGS, 0, offsetof(struct AesCcmCiphertext, ccmCiphertext),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_Opaque,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ccmCiphertext"
},
};
static const ber_tlv_tag_t asn_DEF_AesCcmCiphertext_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_AesCcmCiphertext_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nonce */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ccmCiphertext */
};
asn_SEQUENCE_specifics_t asn_SPC_AesCcmCiphertext_specs_1 = {
sizeof(struct AesCcmCiphertext),
offsetof(struct AesCcmCiphertext, _asn_ctx),
asn_MAP_AesCcmCiphertext_tag2el_1,
2, /* Count of tags in the map */
0, 0, 0, /* Optional elements (not needed) */
-1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_AesCcmCiphertext = {
"AesCcmCiphertext",
"AesCcmCiphertext",
&asn_OP_SEQUENCE,
asn_DEF_AesCcmCiphertext_tags_1,
sizeof(asn_DEF_AesCcmCiphertext_tags_1)
/sizeof(asn_DEF_AesCcmCiphertext_tags_1[0]), /* 1 */
asn_DEF_AesCcmCiphertext_tags_1, /* Same as above */
sizeof(asn_DEF_AesCcmCiphertext_tags_1)
/sizeof(asn_DEF_AesCcmCiphertext_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_AesCcmCiphertext_1,
2, /* Elements count */
&asn_SPC_AesCcmCiphertext_specs_1 /* Additional specs */
};
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "IEEE1609dot2"
* found in "../asn1/1609Dot2-ASN1/asn1c/IEEE1609dot2.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#ifndef _AesCcmCiphertext_H_
#define _AesCcmCiphertext_H_
#include <asn_application.h>
/* Including external dependencies */
#include <OCTET_STRING.h>
#include "Opaque.h"
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* AesCcmCiphertext */
typedef struct AesCcmCiphertext {
OCTET_STRING_t nonce;
Opaque_t ccmCiphertext;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} AesCcmCiphertext_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AesCcmCiphertext;
extern asn_SEQUENCE_specifics_t asn_SPC_AesCcmCiphertext_specs_1;
extern asn_TYPE_member_t asn_MBR_AesCcmCiphertext_1[2];
#ifdef __cplusplus
}
#endif
#endif /* _AesCcmCiphertext_H_ */
#include <asn_internal.h>
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941MessagesCa"
* found in "../asn1/EtsiTs102941/EtsiTs102941MessagesCA.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#include "AuthorizationRequestMessage.h"
int
AuthorizationRequestMessage_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
/* Nothing is here. See below */
}
return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using EtsiTs103097Data_Encrypted_Unicast_52P1,
* so here we adjust the DEF accordingly.
*/
static asn_oer_constraints_t asn_OER_type_AuthorizationRequestMessage_constr_1 CC_NOTUSED = {
{ 0, 0 },
-1};
static const ber_tlv_tag_t asn_DEF_AuthorizationRequestMessage_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_AuthorizationRequestMessage = {
"AuthorizationRequestMessage",
"AuthorizationRequestMessage",
&asn_OP_SEQUENCE,
asn_DEF_AuthorizationRequestMessage_tags_1,
sizeof(asn_DEF_AuthorizationRequestMessage_tags_1)
/sizeof(asn_DEF_AuthorizationRequestMessage_tags_1[0]), /* 1 */
asn_DEF_AuthorizationRequestMessage_tags_1, /* Same as above */
sizeof(asn_DEF_AuthorizationRequestMessage_tags_1)
/sizeof(asn_DEF_AuthorizationRequestMessage_tags_1[0]), /* 1 */
{ &asn_OER_type_AuthorizationRequestMessage_constr_1, 0, AuthorizationRequestMessage_constraint },
asn_MBR_Ieee1609Dot2Data_1,
2, /* Elements count */
&asn_SPC_Ieee1609Dot2Data_specs_1 /* Additional specs */
};
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941MessagesCa"
* found in "../asn1/EtsiTs102941/EtsiTs102941MessagesCA.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#ifndef _AuthorizationRequestMessage_H_
#define _AuthorizationRequestMessage_H_
#include <asn_application.h>
/* Including external dependencies */
#include "EtsiTs103097Data-Encrypted-Unicast.h"
#ifdef __cplusplus
extern "C" {
#endif
/* AuthorizationRequestMessage */
typedef EtsiTs103097Data_Encrypted_Unicast_52P1_t AuthorizationRequestMessage_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AuthorizationRequestMessage;
asn_struct_free_f AuthorizationRequestMessage_free;
asn_struct_print_f AuthorizationRequestMessage_print;
asn_constr_check_f AuthorizationRequestMessage_constraint;
ber_type_decoder_f AuthorizationRequestMessage_decode_ber;
der_type_encoder_f AuthorizationRequestMessage_encode_der;
xer_type_decoder_f AuthorizationRequestMessage_decode_xer;
xer_type_encoder_f AuthorizationRequestMessage_encode_xer;
oer_type_decoder_f AuthorizationRequestMessage_decode_oer;
oer_type_encoder_f AuthorizationRequestMessage_encode_oer;
#ifdef __cplusplus
}
#endif
#endif /* _AuthorizationRequestMessage_H_ */
#include <asn_internal.h>
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941MessagesCa"
* found in "../asn1/EtsiTs102941/EtsiTs102941MessagesCA.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#include "AuthorizationRequestMessageWithPop.h"
int
AuthorizationRequestMessageWithPop_constraint(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
/* Nothing is here. See below */
}
return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}
/*
* This type is implemented using EtsiTs103097Data_SignedAndEncrypted_Unicast_61P0,
* so here we adjust the DEF accordingly.
*/
static asn_oer_constraints_t asn_OER_type_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = {
{ 0, 0 },
-1};
static const ber_tlv_tag_t asn_DEF_AuthorizationRequestMessageWithPop_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
asn_TYPE_descriptor_t asn_DEF_AuthorizationRequestMessageWithPop = {
"AuthorizationRequestMessageWithPop",
"AuthorizationRequestMessageWithPop",
&asn_OP_SEQUENCE,
asn_DEF_AuthorizationRequestMessageWithPop_tags_1,
sizeof(asn_DEF_AuthorizationRequestMessageWithPop_tags_1)
/sizeof(asn_DEF_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */
asn_DEF_AuthorizationRequestMessageWithPop_tags_1, /* Same as above */
sizeof(asn_DEF_AuthorizationRequestMessageWithPop_tags_1)
/sizeof(asn_DEF_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */
{ &asn_OER_type_AuthorizationRequestMessageWithPop_constr_1, 0, AuthorizationRequestMessageWithPop_constraint },
asn_MBR_Ieee1609Dot2Data_1,
2, /* Elements count */
&asn_SPC_Ieee1609Dot2Data_specs_1 /* Additional specs */
};
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941MessagesCa"
* found in "../asn1/EtsiTs102941/EtsiTs102941MessagesCA.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#ifndef _AuthorizationRequestMessageWithPop_H_
#define _AuthorizationRequestMessageWithPop_H_
#include <asn_application.h>
/* Including external dependencies */
#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h"
#ifdef __cplusplus
extern "C" {
#endif
/* AuthorizationRequestMessageWithPop */
typedef EtsiTs103097Data_SignedAndEncrypted_Unicast_61P0_t AuthorizationRequestMessageWithPop_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_AuthorizationRequestMessageWithPop;
asn_struct_free_f AuthorizationRequestMessageWithPop_free;
asn_struct_print_f AuthorizationRequestMessageWithPop_print;
asn_constr_check_f AuthorizationRequestMessageWithPop_constraint;
ber_type_decoder_f AuthorizationRequestMessageWithPop_decode_ber;
der_type_encoder_f AuthorizationRequestMessageWithPop_encode_der;
xer_type_decoder_f AuthorizationRequestMessageWithPop_decode_xer;
xer_type_encoder_f AuthorizationRequestMessageWithPop_encode_xer;
oer_type_decoder_f AuthorizationRequestMessageWithPop_decode_oer;
oer_type_encoder_f AuthorizationRequestMessageWithPop_encode_oer;
#ifdef __cplusplus
}
#endif
#endif /* _AuthorizationRequestMessageWithPop_H_ */
#include <asn_internal.h>
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "EtsiTs102941TypesAuthorization"
* found in "../asn1/EtsiTs102941/EtsiTs102941TypesAuthorization.asn"
* `asn1c -S ../../asn1c/skeletons -fcompound-names -no-gen-PER -gen-autotools -pdu=EtsiTs103097Data -pdu=EnrolmentRequestMessage -pdu=EnrolmentResponseMessage -pdu=AuthorizationRequestMessage -pdu=AuthorizationRequestMessageWithPop -pdu=AuthorizationResponseMessage -pdu=CertificateRevocationListMessage -pdu=TlmCertificateTrustListMessage -pdu=RcaCertificateTrustListMessage -pdu=AuthorizationValidationRequestMessage -pdu=AuthorizationValidationResponseMessage -pdu=CaCertificateRequestMessage`
*/
#include "AuthorizationResponseCode.h"
/*
* This type is implemented using NativeEnumerated,
* so here we adjust the DEF accordingly.
*/
static asn_oer_constraints_t asn_OER_type_AuthorizationResponseCode_constr_1 CC_NOTUSED = {
{ 0, 0 },
-1};
static const asn_INTEGER_enum_map_t asn_MAP_AuthorizationResponseCode_value2enum_1[] = {
{ 0, 2, "ok" },
{ 1, 16, "its-aa-cantparse" },
{ 2, 21, "its-aa-badcontenttype" },
{ 3, 24, "its-aa-imnottherecipient" },
{ 4, 33, "its-aa-unknownencryptionalgorithm" },
{ 5, 23, "its-aa-decryptionfailed" },
{ 6, 20, "its-aa-keysdontmatch" },
{ 7, 24, "its-aa-incompleterequest" },
{ 8, 27, "its-aa-invalidencryptionkey" },
{ 9, 23, "its-aa-outofsyncrequest" },
{ 10, 16, "its-aa-unknownea" },
{ 11, 16, "its-aa-invalidea" },
{ 12, 24, "its-aa-deniedpermissions" },
{ 13, 17, "aa-ea-cantreachea" },
{ 14, 15, "ea-aa-cantparse" },
{ 15, 20, "ea-aa-badcontenttype" },
{ 16, 23, "ea-aa-imnottherecipient" },
{ 17, 32, "ea-aa-unknownencryptionalgorithm" },
{ 18, 22, "ea-aa-decryptionfailed" },
{ 19, 9, "invalidaa" },
{ 20, 18, "invalidaasignature" },
{ 21, 7, "wrongea" },
{ 22, 10, "unknownits" },
{ 23, 16, "invalidsignature" },
{ 24, 20, "invalidencryptionkey" },
{ 25, 17, "deniedpermissions" },
{ 26, 18, "deniedtoomanycerts" }
/* This list is extensible */
};
static const unsigned int asn_MAP_AuthorizationResponseCode_enum2value_1[] = {
13, /* aa-ea-cantreachea(13) */
25, /* deniedpermissions(25) */
26, /* deniedtoomanycerts(26) */
15, /* ea-aa-badcontenttype(15) */
14, /* ea-aa-cantparse(14) */
18, /* ea-aa-decryptionfailed(18) */
16, /* ea-aa-imnottherecipient(16) */
17, /* ea-aa-unknownencryptionalgorithm(17) */
19, /* invalidaa(19) */
20, /* invalidaasignature(20) */
24, /* invalidencryptionkey(24) */