diff --git a/asn1/COPYRIGHT.md b/asn1/COPYRIGHT.md index 353702286..f20eb80c8 100644 --- a/asn1/COPYRIGHT.md +++ b/asn1/COPYRIGHT.md @@ -11,6 +11,7 @@ Code generated from the files located here can be found in the *vanetza/asn1/its - *TS102894-2v131-CDD.asn* from ETSI TS 102 894-2 v1.3.1 (2018-08) - *TS102941v131-\*.asn* from ETSI TS 102 941 v1.3.1 (2019-02) - *TS103097v131.asn* from ETSI TS 103 097 v1.3.1 (2017-10) +- *TS103097v211-\*.asn* from ETSI TS 103 097 v2.1.1 (2021-10) - *TR103562v211.asn* from ETSI TR 103 562 v2.1.1 (2019-12) - *IEEE1609dot2.asn* and *IEEE1609dot2BaseTypes.asn* from IEEE 1609.2 as printed in ETSI TS 103 097 v1.3.1 diff --git a/asn1/release2/TS102941v221/BaseTypes.asn b/asn1/release2/TS102941v221/BaseTypes.asn new file mode 100644 index 000000000..4a2f9bb8a --- /dev/null +++ b/asn1/release2/TS102941v221/BaseTypes.asn @@ -0,0 +1,58 @@ +EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + HashedId8, Time32, PublicEncryptionKey, PublicVerificationKey, Signature +FROM + Ieee1609Dot2BaseTypes {iso(1) identified-organization(3) ieee(111) + standards-association-numbered-series-standards(2) wave-stds(1609) + dot2(2) base(1) base-types(2) major-version-2(2) minor-version-3(3)} + WITH SUCCESSORS + + CertificateId, SubjectAssurance, SequenceOfPsidSsp, SequenceOfPsidGroupPermissions, + ValidityPeriod, GeographicRegion, HashedData +FROM + Ieee1609Dot2 {iso(1) identified-organization(3) ieee(111) + standards-association-numbered-series-standards(2) wave-stds(1609) + dot2(2) base (1) schema (1) major-version-2(2) minor-version-4(4)} + WITH SUCCESSORS + + EtsiTs103097Data, EtsiTs103097Data-Encrypted, EtsiTs103097Data-Signed, + EtsiTs103097Data-SignedExternalPayload, + EtsiTs103097Data-Unsecured, EtsiTs103097Data-Encrypted-Unicast, EtsiTs103097Data-SignedAndEncrypted-Unicast +FROM + EtsiTs103097Module {itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1)} + WITH SUCCESSORS +; + +CertificateFormat::= INTEGER { + ts103097v131 (1) + }(1..255) + +CertificateSubjectAttributes ::= SEQUENCE { + id CertificateId OPTIONAL, + validityPeriod ValidityPeriod OPTIONAL, + region GeographicRegion OPTIONAL, + assuranceLevel SubjectAssurance OPTIONAL, + appPermissions SequenceOfPsidSsp OPTIONAL, + certIssuePermissions SequenceOfPsidGroupPermissions OPTIONAL, + ... + }(WITH COMPONENTS { ..., appPermissions PRESENT} | + WITH COMPONENTS { ..., certIssuePermissions PRESENT}) + +EcSignature::= CHOICE { + encryptedEcSignature EtsiTs103097Data-Encrypted{EtsiTs103097Data-SignedExternalPayload}, + ecSignature EtsiTs103097Data-SignedExternalPayload + } + +PublicKeys ::= SEQUENCE { + verificationKey PublicVerificationKey, + encryptionKey PublicEncryptionKey OPTIONAL + } + +Version ::= INTEGER {v1(1)} + +END diff --git a/asn1/release2/TS102941v221/MessagesCa.asn b/asn1/release2/TS102941v221/MessagesCa.asn new file mode 100644 index 000000000..59911fa51 --- /dev/null +++ b/asn1/release2/TS102941v221/MessagesCa.asn @@ -0,0 +1,127 @@ +/************************************************************************************* + This file contains the EtsiTs102941Messages module containing all possible PKI messages. + It should be used when all PKI messages needs to be implemented (for example, for CA development) +**************************************************************************************/ +EtsiTs102941MessagesCa + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesCa(0) major-version-3(3) minor-version-3(3)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Data-Signed, +EtsiTs103097Data-SignedExternalPayload, +EtsiTs103097Data-Encrypted-Unicast, +EtsiTs103097Data-SignedAndEncrypted-Unicast +FROM EtsiTs103097Module +{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +Version +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +InnerEcRequestSignedForPop, InnerEcResponse +FROM EtsiTs102941TypesEnrolment +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +EtsiTs102941ButterflyAuthorizationRequest-X509Signed, InnerAtRequest, InnerAtResponse +FROM EtsiTs102941TypesAuthorization +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) } +WITH SUCCESSORS + +ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl +FROM EtsiTs102941TrustLists +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +AuthorizationValidationRequest, AuthorizationValidationResponse +FROM EtsiTs102941TypesAuthorizationValidation +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authValidation(7) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +CaCertificateRequest +FROM EtsiTs102941TypesCaManagement +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) caManagement(8) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +ToBeSignedLinkCertificate, ToBeSignedLinkCertificateTlm, ToBeSignedLinkCertificateRca +FROM EtsiTs102941TypesLinkCertificate +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +EeRaCertRequest, RaEeCertInfo, EeRaDownloadRequest +FROM Ieee1609Dot2Dot1EeRaInterface +{iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +RaAcaCertRequest, AcaRaCertResponse +FROM Ieee1609Dot2Dot1AcaRaInterface +{iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) aca-ra(4) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS +; + +/************ +-- Messages +************/ +EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})} +EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})} +AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})} +AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})} +AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})} +CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})} +TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})} +RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})} +AuthorizationValidationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationValidationRequest PRESENT})})} +AuthorizationValidationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationValidationResponse PRESENT})})} +CaCertificateRequestMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data(WITH COMPONENTS{..., content (WITH COMPONENTS{caCertificateRequest PRESENT})})} +CaCertificateRekeyingMessage ::= EtsiTs103097Data-Signed {EtsiTs103097Data-Signed {EtsiTs102941Data(WITH COMPONENTS{..., content (WITH COMPONENTS{caCertificateRequest PRESENT})})}} +TlmLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{linkCertificateTlm PRESENT})})} +RcaSingleSignedLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{singleSignedLinkCertificateRca PRESENT})})} +RcaDoubleSignedLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{doubleSignedlinkCertificateRca PRESENT})})} +ButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationRequest PRESENT})})} +X509SignedButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{x509SignedbutterflyAuthorizationRequest PRESENT})})} +ButterflyAuthorizationResponseMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationResponse PRESENT})})} +ButterflyAtDownloadRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAtDownloadRequest PRESENT})})} +ButterflyCertRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyCertificateRequest PRESENT})})} +ButterflyCertResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyCertificateResponse PRESENT})})} + +/************ +-- EtsiTs102941Data +************/ + +EtsiTs102941Data::= SEQUENCE { + version Version (v1), + content EtsiTs102941DataContent + } + +EtsiTs102941DataContent ::= CHOICE { + enrolmentRequest InnerEcRequestSignedForPop, + enrolmentResponse InnerEcResponse, + authorizationRequest InnerAtRequest, + authorizationResponse InnerAtResponse, + certificateRevocationList ToBeSignedCrl, + certificateTrustListTlm ToBeSignedTlmCtl, + certificateTrustListRca ToBeSignedRcaCtl, + authorizationValidationRequest AuthorizationValidationRequest, + authorizationValidationResponse AuthorizationValidationResponse, + caCertificateRequest CaCertificateRequest, + ..., + linkCertificateTlm ToBeSignedLinkCertificateTlm, + singleSignedLinkCertificateRca ToBeSignedLinkCertificateRca, + doubleSignedlinkCertificateRca RcaSingleSignedLinkCertificateMessage, + /* Extension for butterfly key provisioning */ + [[butterflyAuthorizationRequest EeRaCertRequest, + x509SignedbutterflyAuthorizationRequest EtsiTs102941ButterflyAuthorizationRequest-X509Signed, + butterflyAuthorizationResponse RaEeCertInfo, + butterflyCertificateRequest RaAcaCertRequest, + butterflyCertificateResponse AcaRaCertResponse, + butterflyAtDownloadRequest EeRaDownloadRequest]] + } + + + +END diff --git a/asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn b/asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn new file mode 100644 index 000000000..65124503d --- /dev/null +++ b/asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn @@ -0,0 +1,106 @@ +/************************************************************************************* + This file contains the EtsiTs102941MessagesItss-OptionalPrivacy module providing the + same subset of messages as the EtsiTs102941MessagesItss module. + It should never be used together with the EtsiTs102941MessagesCA and EtsiTs102941MessagesItss + + This module allows the usage of unencrypted EC signature for AA requests. +**************************************************************************************/ +EtsiTs102941MessagesItss-OptionalPrivacy + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesItssOp(2) major-version-3(3) minor-version-3(3)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Data-Signed, +EtsiTs103097Data-Encrypted-Unicast, +EtsiTs103097Data-SignedAndEncrypted-Unicast +FROM EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +Version +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +InnerEcRequestSignedForPop, InnerEcResponse +FROM EtsiTs102941TypesEnrolment +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +EtsiTs102941ButterflyAuthorizationRequest-X509Signed, InnerAtRequest, InnerAtResponse +FROM EtsiTs102941TypesAuthorization +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) } +WITH SUCCESSORS + +ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl +FROM EtsiTs102941TrustLists +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +ToBeSignedLinkCertificate, ToBeSignedLinkCertificateTlm +FROM EtsiTs102941TypesLinkCertificate +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +EeRaCertRequest, RaEeCertInfo, EeRaDownloadRequest +FROM Ieee1609Dot2Dot1EeRaInterface +{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +; + +/************ +-- Messages +************/ + +EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})} +EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})} +AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})} +AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})} +AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})} +CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})} +TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})} +RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})} +TlmLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{linkCertificateTlm PRESENT})})} +ButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationRequest PRESENT})})} +X509SignedButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{x509SignedbutterflyAuthorizationRequest PRESENT})})} +ButterflyAuthorizationResponseMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationResponse PRESENT})})} +ButterflyAtDownloadRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAtDownloadRequest PRESENT})})} + +/************ +-- EtsiTs102941Data +************/ + +EtsiTs102941Data::= SEQUENCE { + version Version (v1), + content EtsiTs102941DataContent + } + +EtsiTs102941DataContent ::= CHOICE { + enrolmentRequest InnerEcRequestSignedForPop, + enrolmentResponse InnerEcResponse, + authorizationRequest InnerAtRequest, + authorizationResponse InnerAtResponse, + certificateRevocationList ToBeSignedCrl, + certificateTrustListTlm ToBeSignedTlmCtl, + certificateTrustListRca ToBeSignedRcaCtl, + authorizationValidationRequest NULL, + authorizationValidationResponse NULL, + caCertificateRequest NULL, + ..., + linkCertificateTlm ToBeSignedLinkCertificateTlm, + singleSignedLinkCertificateRca NULL, + doubleSignedlinkCertificateRca NULL, + /* Extension for butterfly key provisioning */ + [[butterflyAuthorizationRequest EeRaCertRequest, + x509SignedbutterflyAuthorizationRequest EtsiTs102941ButterflyAuthorizationRequest-X509Signed, + butterflyAuthorizationResponse RaEeCertInfo, + butterflyCertificateRequest NULL, + butterflyCertificateResponse NULL, + butterflyAtDownloadRequest EeRaDownloadRequest]] + } + +END diff --git a/asn1/release2/TS102941v221/MessagesItss.asn b/asn1/release2/TS102941v221/MessagesItss.asn new file mode 100644 index 000000000..14a51f1e7 --- /dev/null +++ b/asn1/release2/TS102941v221/MessagesItss.asn @@ -0,0 +1,112 @@ +/************************************************************************************* + This file contains the EtsiTs102941MessagesItss module providing the ITS-S subset + of messages defined in the module EtsiTs102941MessagesCA + It should never be imported together with the module EtsiTs102941MessagesCA. + Use the EtsiTs102941MessagesCA if all possible PKI message types are needed. + + This module blocks the usage of unencrypted EC signature for AA requests. +**************************************************************************************/ +EtsiTs102941MessagesItss + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) messagesItss(1) major-version-3(3) minor-version-3(3)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Data-Signed, +EtsiTs103097Data-Encrypted-Unicast, +EtsiTs103097Data-SignedAndEncrypted-Unicast +FROM EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +Version +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +InnerEcRequestSignedForPop, InnerEcResponse +FROM EtsiTs102941TypesEnrolment +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +EtsiTs102941ButterflyAuthorizationRequest-X509Signed, InnerAtRequest, InnerAtResponse +FROM EtsiTs102941TypesAuthorization +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) } +WITH SUCCESSORS + +ToBeSignedCrl, ToBeSignedTlmCtl, ToBeSignedRcaCtl +FROM EtsiTs102941TrustLists +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +ToBeSignedLinkCertificate, ToBeSignedLinkCertificateTlm +FROM EtsiTs102941TypesLinkCertificate +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +EeRaCertRequest, RaEeCertInfo, EeRaDownloadRequest +FROM Ieee1609Dot2Dot1EeRaInterface +{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS +; + +/************ +-- Messages +************/ + +EnrolmentRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentRequest PRESENT})})} +EnrolmentResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{enrolmentResponse PRESENT})})} +AuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})} +AuthorizationRequestMessageWithPop ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationRequest PRESENT})})} +AuthorizationResponseMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{authorizationResponse PRESENT})})} +CertificateRevocationListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateRevocationList PRESENT})})} +TlmCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListTlm PRESENT})})} +RcaCertificateTrustListMessage ::= EtsiTs103097Data-Signed{EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{certificateTrustListRca PRESENT})})} +TlmLinkCertificateMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{linkCertificateTlm PRESENT})})} +ButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationRequest PRESENT})})} +X509SignedButterflyAuthorizationRequestMessage ::= EtsiTs103097Data-Encrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{x509SignedbutterflyAuthorizationRequest PRESENT})})} +ButterflyAuthorizationResponseMessage ::= EtsiTs103097Data-Signed {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAuthorizationResponse PRESENT})})} +ButterflyAtDownloadRequestMessage ::= EtsiTs103097Data-SignedAndEncrypted-Unicast {EtsiTs102941Data (WITH COMPONENTS{..., content (WITH COMPONENTS{butterflyAtDownloadRequest PRESENT})})} + +/************ +-- EtsiTs102941Data +************/ + +EtsiTs102941Data::= SEQUENCE { + version Version (v1), + content EtsiTs102941DataContent + } + +EtsiTs102941DataContent ::= CHOICE { + enrolmentRequest InnerEcRequestSignedForPop, + enrolmentResponse InnerEcResponse, + authorizationRequest InnerAtRequest, + authorizationResponse InnerAtResponse, + certificateRevocationList ToBeSignedCrl, + certificateTrustListTlm ToBeSignedTlmCtl, + certificateTrustListRca ToBeSignedRcaCtl, + authorizationValidationRequest NULL, + authorizationValidationResponse NULL, + caCertificateRequest NULL, + ..., + linkCertificateTlm ToBeSignedLinkCertificateTlm, + singleSignedLinkCertificateRca NULL, + doubleSignedlinkCertificateRca NULL, + /* Extension for butterfly key provisioning */ + [[butterflyAuthorizationRequest EeRaCertRequest, + x509SignedbutterflyAuthorizationRequest EtsiTs102941ButterflyAuthorizationRequest-X509Signed, + butterflyAuthorizationResponse RaEeCertInfo, + butterflyCertificateRequest NULL, + butterflyCertificateResponse NULL, + butterflyAtDownloadRequest EeRaDownloadRequest]] + } (WITH COMPONENTS{..., + authorizationRequest (WITH COMPONENTS{..., + ecSignature (WITH COMPONENTS{..., + encryptedEcSignature PRESENT + }) + }) + }) + +END diff --git a/asn1/release2/TS102941v221/README.md b/asn1/release2/TS102941v221/README.md new file mode 100644 index 000000000..da9225531 --- /dev/null +++ b/asn1/release2/TS102941v221/README.md @@ -0,0 +1,3 @@ +The TS 102941 v2.2.1 PKI ASN1 files are copied from its [ETSI repository](https://forge.etsi.org/rep/ITS/asn1/pki_ts102941/-/tree/v2.2.1). + +See [ETSI License](https://forge.etsi.org/rep/ITS/asn1/pki_ts102941/-/blob/v2.2.1/LICENSE) for copyright details. diff --git a/asn1/release2/TS102941v221/TrustLists.asn b/asn1/release2/TS102941v221/TrustLists.asn new file mode 100644 index 000000000..7e1a57197 --- /dev/null +++ b/asn1/release2/TS102941v221/TrustLists.asn @@ -0,0 +1,143 @@ +EtsiTs102941TrustLists + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) trustLists(6) major-version-3(3) minor-version-1(1)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Certificate, EtsiTs103097Data-SignedAndEncrypted, EtsiTs103097Data-Signed +FROM +EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +HashedId8, Time32, Version --, CertificateAuthorityConstraints +FROM EtsiTs102941BaseTypes +{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS +; + +/************ +-- CRL +************/ +ToBeSignedCrl ::= SEQUENCE { + version Version, + thisUpdate Time32, + nextUpdate Time32, + entries SEQUENCE OF CrlEntry, + ... +} + +CrlEntry ::= HashedId8 + +/************ +-- TLM CTL +************/ + +ToBeSignedTlmCtl ::= CtlFormat (FullCtl | DeltaCtl) (WITH COMPONENTS {..., + ctlCommands ( WITH COMPONENT( + ( WITH COMPONENTS {..., + add ( WITH COMPONENTS {..., + ea ABSENT, + aa ABSENT + }) + }) + )) +}) + +/************ +-- RCA CTL +************/ + +ToBeSignedRcaCtl ::= CtlFormat (FullCtl | DeltaCtl) ( WITH COMPONENTS {..., + ctlCommands ( WITH COMPONENT( + ( WITH COMPONENTS {..., + add ( WITH COMPONENTS {..., + rca ABSENT, + tlm ABSENT + }) + }) + )) +}) + +/************ +-- CTL +************/ + +FullCtl::= CtlFormat ( WITH COMPONENTS {..., + isFullCtl ( TRUE ), + ctlCommands ( WITH COMPONENT( + ( WITH COMPONENTS {..., + delete ABSENT + }) + )) +}) + +DeltaCtl::= CtlFormat (WITH COMPONENTS {..., + isFullCtl(FALSE) +}) + + +CtlFormat ::= SEQUENCE { + version Version, + nextUpdate Time32, + isFullCtl BOOLEAN, + ctlSequence INTEGER (0..255), + ctlCommands SEQUENCE OF CtlCommand, + ... +} + +CtlCommand ::= CHOICE { + add CtlEntry, + delete CtlDelete, + ... +} + +CtlEntry ::= CHOICE { + rca RootCaEntry, + ea EaEntry, + aa AaEntry, + dc DcEntry, + tlm TlmEntry, + ... +} + +CtlDelete ::= CHOICE { + cert HashedId8, + dc DcDelete, + ... +} + +TlmEntry::= SEQUENCE { + selfSignedTLMCertificate EtsiTs103097Certificate, + successorTo EtsiTs103097Certificate OPTIONAL, + accessPoint Url +} + +RootCaEntry ::= SEQUENCE { + selfsignedRootCa EtsiTs103097Certificate, + successorTo EtsiTs103097Certificate OPTIONAL +} + +EaEntry ::= SEQUENCE { + eaCertificate EtsiTs103097Certificate, + aaAccessPoint Url, + itsAccessPoint Url OPTIONAL +} + +AaEntry ::= SEQUENCE { + aaCertificate EtsiTs103097Certificate, + accessPoint Url +} + +DcEntry ::= SEQUENCE { + url Url, + cert SEQUENCE OF HashedId8 +} + +DcDelete ::= Url + +Url::= IA5String + +END diff --git a/asn1/release2/TS102941v221/TypesAuthorization.asn b/asn1/release2/TS102941v221/TypesAuthorization.asn new file mode 100644 index 000000000..fa3c2e7e4 --- /dev/null +++ b/asn1/release2/TS102941v221/TypesAuthorization.asn @@ -0,0 +1,105 @@ +EtsiTs102941TypesAuthorization + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-3(3)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Certificate, +EtsiTs103097Data-Signed +FROM EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +CertificateFormat, CertificateSubjectAttributes, EcSignature, HashedId8, PublicKeys, Version +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +EeRaInterfacePdu +FROM Ieee1609Dot2Dot1EeRaInterface +{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) ee-ra(11) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest, ScmsPdu-Scoped, SignerSingleX509Cert +FROM Ieee1609Dot2Dot1Protocol +{ iso(1) identified-organization(3) ieee(111) standards-association-numbered-series-standards(2) wave-stds(1609) dot2(2) extension-standards(255) dot1(1) interfaces(1) protocol(17) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +; + +/************ +-- AuthorizationRequest/Response +************/ + +AuthorizationResponseCode ::= ENUMERATED { + ok(0), + -- ITS->AA + its-aa-cantparse, -- valid for any structure + its-aa-badcontenttype, -- not encrypted, not signed, not authorizationrequest + its-aa-imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me + its-aa-unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm + its-aa-decryptionfailed, -- works for ECIES-HMAC and AES-CCM + its-aa-keysdontmatch, -- HMAC keyTag verification fails + its-aa-incompleterequest, -- some elements are missing + its-aa-invalidencryptionkey, -- the responseEncryptionKey is bad + its-aa-outofsyncrequest, -- signingTime is outside acceptable limits + its-aa-unknownea, -- the EA identified by eaId is unknown to me + its-aa-invalidea, -- the EA certificate is revoked + its-aa-deniedpermissions, -- I, the AA, deny the requested permissions + -- AA->EA + aa-ea-cantreachea, -- the EA is unreachable (network error?) + -- EA->AA + ea-aa-cantparse, -- valid for any structure + ea-aa-badcontenttype, -- not encrypted, not signed, not authorizationrequest + ea-aa-imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me + ea-aa-unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm + ea-aa-decryptionfailed, -- works for ECIES-HMAC and AES-CCM + -- TODO: to be continued... + invalidaa, -- the AA certificate presented is invalid/revoked/whatever + invalidaasignature, -- the AA certificate presented can't validate the request signature + wrongea, -- the encrypted signature doesn't designate me as the EA + unknownits, -- can't retrieve the EC/ITS in my DB + invalidsignature, -- signature verification of the request by the EC fails + invalidencryptionkey, -- signature is good, but the key is bad + deniedpermissions, -- permissions not granted + deniedtoomanycerts, -- parallel limit + ... } + + +InnerAtRequest ::= SEQUENCE { + publicKeys PublicKeys, + hmacKey OCTET STRING (SIZE(32)), + sharedAtRequest SharedAtRequest, + ecSignature EcSignature, + ... + } + +SharedAtRequest ::= SEQUENCE { + eaId HashedId8, + keyTag OCTET STRING (SIZE(16)), + certificateFormat CertificateFormat, + requestedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}), + ... + } + +InnerAtResponse ::= SEQUENCE { + requestHash OCTET STRING (SIZE(16)), + responseCode AuthorizationResponseCode, + certificate EtsiTs103097Certificate OPTIONAL, + ... + } + (WITH COMPONENTS { responseCode (ok), certificate PRESENT } + | WITH COMPONENTS { responseCode (ALL EXCEPT ok), certificate ABSENT } + ) + +EtsiTs102941ButterflyAuthorizationRequest-X509Signed ::= Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest { + ScmsPdu-Scoped { + EeRaInterfacePdu (WITH COMPONENTS { + eeRaCertRequest}) + }, + SignerSingleX509Cert +} + +END diff --git a/asn1/release2/TS102941v221/TypesAuthorizationValidation.asn b/asn1/release2/TS102941v221/TypesAuthorizationValidation.asn new file mode 100644 index 000000000..9797fe857 --- /dev/null +++ b/asn1/release2/TS102941v221/TypesAuthorizationValidation.asn @@ -0,0 +1,63 @@ +EtsiTs102941TypesAuthorizationValidation + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authValidation(7) major-version-3(3) minor-version-1(1)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Certificate +FROM EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +CertificateFormat, CertificateSubjectAttributes,EcSignature, HashedId8, PublicKeys, Version +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +SharedAtRequest +FROM EtsiTs102941TypesAuthorization +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) authorization(5) major-version-3(3) minor-version-2(2) } +WITH SUCCESSORS +; + +/************ +-- AuthorizationValidationRequest/Response +************/ + +AuthorizationValidationResponseCode ::= ENUMERATED { + ok(0), + cantparse, -- valid for any structure + badcontenttype, -- not encrypted, not signed, not permissionsverificationrequest + imnottherecipient, -- the "recipients" of the outermost encrypted data doesn't include me + unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm + decryptionfailed, -- works for ECIES-HMAC and AES-CCM + invalidaa, -- the AA certificate presented is invalid/revoked/whatever + invalidaasignature, -- the AA certificate presented can't validate the request signature + wrongea, -- the encrypted signature doesn't designate me as the EA + unknownits, -- can't retrieve the EC/ITS in my DB + invalidsignature, -- signature verification of the request by the EC fails + invalidencryptionkey, -- signature is good, but the responseEncryptionKey is bad + deniedpermissions, -- requested permissions not granted + deniedtoomanycerts, -- parallel limit + deniedrequest, -- any other reason? + ... } + +AuthorizationValidationRequest ::= SEQUENCE { + sharedAtRequest SharedAtRequest, + ecSignature EcSignature, + ... + } + +AuthorizationValidationResponse ::= SEQUENCE { + requestHash OCTET STRING (SIZE(16)), + responseCode AuthorizationValidationResponseCode, + confirmedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}) OPTIONAL, + ... + } + (WITH COMPONENTS { responseCode (ok), confirmedSubjectAttributes PRESENT } + | WITH COMPONENTS { responseCode (ALL EXCEPT ok), confirmedSubjectAttributes ABSENT } + ) + +END diff --git a/asn1/release2/TS102941v221/TypesCaManagement.asn b/asn1/release2/TS102941v221/TypesCaManagement.asn new file mode 100644 index 000000000..4fa55b8b3 --- /dev/null +++ b/asn1/release2/TS102941v221/TypesCaManagement.asn @@ -0,0 +1,31 @@ +EtsiTs102941TypesCaManagement + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) caManagement(8) major-version-3(3) minor-version-1(1)} + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Certificate, EtsiTs103097Data-Signed +FROM +EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +PublicKeys, CertificateSubjectAttributes +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS +; + +/************ +-- CA certificate request +************/ + +CaCertificateRequest ::= SEQUENCE { + publicKeys PublicKeys, + requestedSubjectAttributes CertificateSubjectAttributes, + ... +} + +END diff --git a/asn1/release2/TS102941v221/TypesEnrolment.asn b/asn1/release2/TS102941v221/TypesEnrolment.asn new file mode 100644 index 000000000..c0a0de07a --- /dev/null +++ b/asn1/release2/TS102941v221/TypesEnrolment.asn @@ -0,0 +1,62 @@ +EtsiTs102941TypesEnrolment + { itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) enrolment(4) major-version-3(3) minor-version-1(1) } + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +EtsiTs103097Certificate, +EtsiTs103097Data-Signed +FROM EtsiTs103097Module +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS + +CertificateFormat, CertificateSubjectAttributes, EcSignature, HashedId8, PublicKeys, Version +FROM EtsiTs102941BaseTypes +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1) } +WITH SUCCESSORS +; + +/************ +-- EnrolmentRequest/Response +************/ + +EnrolmentResponseCode ::= ENUMERATED { + ok(0), + cantparse, -- valid for any structure + badcontenttype, -- not encrypted, not signed, not enrolmentrequest + imnottherecipient, -- the "recipients" doesn't include me + unknownencryptionalgorithm, -- either kexalg or contentencryptionalgorithm + decryptionfailed, -- works for ECIES-HMAC and AES-CCM + unknownits, -- can't retrieve the ITS from the itsId + invalidsignature, -- signature verification of the request fails + invalidencryptionkey, -- signature is good, but the responseEncryptionKey is bad + baditsstatus, -- revoked, not yet active + incompleterequest, -- some elements are missing + deniedpermissions, -- requested permissions are not granted + invalidkeys, -- either the verification_key of the encryption_key is bad + deniedrequest, -- any other reason? + ... } + +InnerEcRequestSignedForPop::= EtsiTs103097Data-Signed{InnerEcRequest} + +InnerEcRequest ::= SEQUENCE { + itsId OCTET STRING, + certificateFormat CertificateFormat, + publicKeys PublicKeys, + requestedSubjectAttributes CertificateSubjectAttributes (WITH COMPONENTS{..., certIssuePermissions ABSENT}), + ... + } + +InnerEcResponse ::= SEQUENCE { + requestHash OCTET STRING (SIZE(16)), + responseCode EnrolmentResponseCode, + certificate EtsiTs103097Certificate OPTIONAL, + ... + } + (WITH COMPONENTS { responseCode (ok), certificate PRESENT } + | WITH COMPONENTS { responseCode (ALL EXCEPT ok), certificate ABSENT } + ) + +END diff --git a/asn1/release2/TS102941v221/TypesLinkCertificate.asn b/asn1/release2/TS102941v221/TypesLinkCertificate.asn new file mode 100644 index 000000000..86439379b --- /dev/null +++ b/asn1/release2/TS102941v221/TypesLinkCertificate.asn @@ -0,0 +1,30 @@ +EtsiTs102941TypesLinkCertificate +{ itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) linkCertificate(9) major-version-3(3) minor-version-1(1) } + +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN + +IMPORTS + +Time32, HashedData +FROM EtsiTs102941BaseTypes +{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) ts(102941) baseTypes(3) major-version-3(3) minor-version-1(1)} +WITH SUCCESSORS + +; + +/************ +-- Link certificate messages +************/ + +ToBeSignedLinkCertificate ::= SEQUENCE { + expiryTime Time32, + certificateHash HashedData, + ... +} + +ToBeSignedLinkCertificateTlm ::= ToBeSignedLinkCertificate +ToBeSignedLinkCertificateRca ::= ToBeSignedLinkCertificate + +END + diff --git a/asn1/release2/TS103097v211-Extension.asn b/asn1/release2/TS103097v211-Extension.asn new file mode 100644 index 000000000..8365f4184 --- /dev/null +++ b/asn1/release2/TS103097v211-Extension.asn @@ -0,0 +1,52 @@ +EtsiTs103097ExtensionModule +{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) extension(2) major-version-1(1) minor-version-1(1)} +DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +IMPORTS + HashedId8, + Time32 +FROM Ieee1609Dot2BaseTypes {iso(1) identified-organization(3) ieee(111) + standards-association-numbered-series-standards(2) wave-stds(1609) + dot2(2) base(1) base-types(2) major-version-2 (2) minor-version-3 (3)} +WITH SUCCESSORS +; + +ExtensionModuleVersion::= INTEGER(1) + +Extension {EXT-TYPE : ExtensionTypes} ::= SEQUENCE { + id EXT-TYPE.&extId({ExtensionTypes}), + content EXT-TYPE.&ExtContent({ExtensionTypes}{@.id}) +} + +EXT-TYPE ::= CLASS { + &extId ExtId, + &ExtContent +} WITH SYNTAX {&ExtContent IDENTIFIED BY &extId} + +ExtId ::= INTEGER(0..255) + +EtsiOriginatingHeaderInfoExtension ::= Extension{{EtsiTs103097HeaderInfoExtensions}} + +EtsiTs103097HeaderInfoExtensionId ::= ExtId + etsiTs102941CrlRequestId EtsiTs103097HeaderInfoExtensionId ::= 1 --'01'H + etsiTs102941DeltaCtlRequestId EtsiTs103097HeaderInfoExtensionId ::= 2 --'02'H + +EtsiTs103097HeaderInfoExtensions EXT-TYPE ::= { + { EtsiTs102941CrlRequest IDENTIFIED BY etsiTs102941CrlRequestId } | + { EtsiTs102941DeltaCtlRequest IDENTIFIED BY etsiTs102941DeltaCtlRequestId }, + ... +} + +EtsiTs102941CrlRequest::= SEQUENCE { + issuerId HashedId8, + lastKnownUpdate Time32 OPTIONAL +} + +EtsiTs102941CtlRequest::= SEQUENCE { + issuerId HashedId8, + lastKnownCtlSequence INTEGER (0..255) OPTIONAL +} + +EtsiTs102941DeltaCtlRequest::= EtsiTs102941CtlRequest + +END diff --git a/asn1/release2/TS103097v211.asn b/asn1/release2/TS103097v211.asn new file mode 100644 index 000000000..d97fc398c --- /dev/null +++ b/asn1/release2/TS103097v211.asn @@ -0,0 +1,123 @@ +EtsiTs103097Module +{itu-t(0) identified-organization(4) etsi(0) itsDomain(5) wg5(5) secHeaders(103097) core(1) major-version-3(3) minor-version-1(1)} + +DEFINITIONS AUTOMATIC TAGS ::= BEGIN + +IMPORTS + +Ieee1609Dot2Data, Certificate +FROM Ieee1609Dot2 {iso(1) identified-organization(3) ieee(111) + standards-association-numbered-series-standards(2) wave-stds(1609) + dot2(2) base(1) schema(1) major-version-2(2) minor-version-4(4)} +WITH SUCCESSORS + +ExtensionModuleVersion +FROM EtsiTs103097ExtensionModule {itu-t(0) identified-organization(4) + etsi(0) itsDomain(5) wg5(5) secHeaders(103097) extension(2) major-version-1(1) minor-version-1(1)} +; + +EtsiTs103097Certificate::= Certificate (WITH COMPONENTS{..., + toBeSigned (WITH COMPONENTS{..., + id (WITH COMPONENTS{..., + linkageData ABSENT, + binaryId ABSENT + }), + certRequestPermissions ABSENT, + canRequestRollover ABSENT + }) +}) + +EtsiTs103097Data::=Ieee1609Dot2Data (WITH COMPONENTS {..., + content (WITH COMPONENTS {..., + signedData (WITH COMPONENTS {..., -- constraints on signed data headers + tbsData (WITH COMPONENTS { + headerInfo (WITH COMPONENTS {..., + generationTime PRESENT, + p2pcdLearningRequest ABSENT, + missingCrlIdentifier ABSENT + }) + }), + signer (WITH COMPONENTS {..., --constraints on the certificate + certificate ((WITH COMPONENT (EtsiTs103097Certificate))^(SIZE(1))) + }) + }), + encryptedData (WITH COMPONENTS {..., -- constraints on encrypted data headers + recipients (WITH COMPONENT ( + (WITH COMPONENTS {..., + pskRecipInfo ABSENT, + symmRecipInfo ABSENT, + rekRecipInfo ABSENT + }) + )) + }), + signedCertificateRequest ABSENT + }) +}) + +EtsiTs103097Data-Unsecured {ToBeSentDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {..., + content (WITH COMPONENTS { + unsecuredData (CONTAINING ToBeSentDataContent) + }) +}) + +EtsiTs103097Data-Signed {ToBeSignedDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {..., + content (WITH COMPONENTS { + signedData (WITH COMPONENTS {..., + tbsData (WITH COMPONENTS { + payload (WITH COMPONENTS { + data (WITH COMPONENTS {..., + content (WITH COMPONENTS { + unsecuredData (CONTAINING ToBeSignedDataContent) + }) + }) PRESENT + }) + }) + }) + }) +}) + +EtsiTs103097Data-SignedExternalPayload ::= EtsiTs103097Data (WITH COMPONENTS {..., + content (WITH COMPONENTS { + signedData (WITH COMPONENTS {..., + tbsData (WITH COMPONENTS { + payload (WITH COMPONENTS { + extDataHash (WITH COMPONENTS { + sha256HashedData PRESENT + }) PRESENT + }) + }) + }) + }) +}) + +EtsiTs103097Data-Encrypted {ToBeEncryptedDataContent} ::= EtsiTs103097Data (WITH COMPONENTS {..., + content (WITH COMPONENTS { + encryptedData (WITH COMPONENTS {..., + ciphertext (WITH COMPONENTS {..., + aes128ccm (WITH COMPONENTS {..., + ccmCiphertext (CONSTRAINED BY {-- ccm encryption of -- ToBeEncryptedDataContent}) + }) + }) + }) + }) +}) + +EtsiTs103097Data-SignedAndEncrypted {ToBesignedAndEncryptedDataContent} ::= EtsiTs103097Data-Encrypted {EtsiTs103097Data-Signed {ToBesignedAndEncryptedDataContent}} + +EtsiTs103097Data-Encrypted-Unicast {ToBeEncryptedDataContent} ::= EtsiTs103097Data-Encrypted { EtsiTs103097Data-Unsecured{ToBeEncryptedDataContent}} (WITH COMPONENTS {..., + content (WITH COMPONENTS { + encryptedData (WITH COMPONENTS {..., + recipients (SIZE(1)) + }) + }) +}) + +EtsiTs103097Data-SignedAndEncrypted-Unicast {ToBesignedAndEncryptedDataContent} ::= EtsiTs103097Data-Encrypted {EtsiTs103097Data-Signed {ToBesignedAndEncryptedDataContent}} (WITH COMPONENTS {..., + content (WITH COMPONENTS { + encryptedData (WITH COMPONENTS {..., + recipients (SIZE(1)) + }) + }) +}) + +END diff --git a/vanetza/asn1/CMakeLists.txt b/vanetza/asn1/CMakeLists.txt index c40eea469..74b741bc2 100644 --- a/vanetza/asn1/CMakeLists.txt +++ b/vanetza/asn1/CMakeLists.txt @@ -1,11 +1,13 @@ set(_its_asn1_source_file "asn1c_its_sources.txt") set(_its_r2_asn1_source_file "asn1c_its_r2_sources.txt") set(_sec_asn1_source_file "asn1c_security_sources.txt") +set(_sec_r2_asn1_source_file "asn1c_security_r2_sources.txt") set(_support_asn1_source_file "asn1c_support_sources.txt") set(_its_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/its") set(_its_r2_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/its/r2") set(_sec_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/security") +set(_sec_r2_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/security/r2") set(_support_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/support") option(VANETZA_ASN1_WITH_ASN1C "Enable asn1c targets" OFF) @@ -57,6 +59,24 @@ if(VANETZA_ASN1_WITH_ASN1C) set(_its_asn1_files ${_iso_asn1_files} ${_its_asn1_files} ${_its_asn1_files_depending_on_iso}) endif() + set(_ieee_2_asn1_files + IEEE1609dot2.asn IEEE1609dot2BaseTypes.asn IEEE1609dot2crl.asn IEEE1609dot2crlBaseTypes.asn) + set(_ieee_21_asn1_files + IEEE1609dot2dot1AcaEeInterface.asn IEEE1609dot2dot1AcaLaInterface.asn IEEE1609dot2dot1AcaMaInterface.asn + IEEE1609dot2dot1AcaRaInterface.asn IEEE1609dot2dot1Acpc.asn IEEE1609dot2dot1CamRaInterface.asn + IEEE1609dot2dot1CertManagement.asn IEEE1609dot2dot1EcaEeInterface.asn IEEE1609dot2dot1EeMaInterface.asn + IEEE1609dot2dot1EeRaInterface.asn IEEE1609dot2dot1LaMaInterface.asn IEEE1609dot2dot1LaRaInterface.asn + IEEE1609dot2dot1MaRaInterface.asn IEEE1609dot2dot1Protocol.asn) + list(TRANSFORM _ieee_2_asn1_files PREPEND ${PROJECT_BINARY_DIR}/ieee/) + list(TRANSFORM _ieee_21_asn1_files PREPEND ${PROJECT_BINARY_DIR}/ieee/) + + set(_ieee_asn1_files ${_ieee_2_asn1_files} ${_ieee_21_asn1_files}) + add_custom_command(OUTPUT ${_ieee_asn1_files} + COMMAND ${CMAKE_COMMAND} -DDIRECTORY=${PROJECT_BINARY_DIR}/ieee -P fetch_ieee_asn1_files.cmake + COMMENT "Fetch and patch IEEE1609 ASN.1 file" + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + VERBATIM) + set(_pki_asn1_files ${PROJECT_SOURCE_DIR}/asn1/TS102941v131-BaseTypes.asn ${PROJECT_SOURCE_DIR}/asn1/TS102941v131-MessagesCa.asn @@ -66,12 +86,31 @@ if(VANETZA_ASN1_WITH_ASN1C) ${PROJECT_SOURCE_DIR}/asn1/TS102941v131-TypesCaManagement.asn ${PROJECT_SOURCE_DIR}/asn1/TS102941v131-TypesEnrolment.asn ) + + set(_pki_r2_asn1_files + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/BaseTypes.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/MessagesCa.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/MessagesItss.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/TrustLists.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/TypesAuthorization.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/TypesAuthorizationValidation.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/TypesCaManagement.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/TypesEnrolment.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS102941v221/TypesLinkCertificate.asn + ) + set(_sec_asn1_files ${PROJECT_SOURCE_DIR}/asn1/TS103097v131.asn ${PROJECT_SOURCE_DIR}/asn1/IEEE1609dot2.asn ${PROJECT_SOURCE_DIR}/asn1/IEEE1609dot2BaseTypes.asn ) + set(_sec_r2_asn1_files + ${PROJECT_SOURCE_DIR}/asn1/release2/TS103097v211.asn + ${PROJECT_SOURCE_DIR}/asn1/release2/TS103097v211-Extension.asn + ) + add_custom_command(OUTPUT ${_support_asn1_dir} DEPENDS "${ASN1C_SKELETON_DIR}" COMMAND ${CMAKE_COMMAND} -E make_directory ${_support_asn1_dir} @@ -125,11 +164,26 @@ if(VANETZA_ASN1_WITH_ASN1C) -P collect_asn1c_sources.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM) + add_custom_command(OUTPUT "${_sec_r2_asn1_dir}" + DEPENDS ${_sec_r2_asn1_files} ${_pki_r2_asn1_files} ${_ieee_asn1_files} + COMMAND ${CMAKE_COMMAND} -E make_directory ${_sec_r2_asn1_dir} + COMMAND ${ASN1C_EXECUTABLE} ${_asn1c_flags} -fprefix=Vanetza_Security2_ -R -D ${_sec_r2_asn1_dir} ${_sec_r2_asn1_files} ${_pki_r2_asn1_files} ${_ieee_asn1_files} + COMMAND ${CMAKE_COMMAND} -DASN1C_OUTPUT_DIR=security/r2 -DASN1C_PREFIX=Vanetza_Security2_ + -P ${CMAKE_CURRENT_SOURCE_DIR}/remove_prefix_from_filename.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + COMMENT "Generating code from Security Release 2 (1609.2 and TS 103 097, TS 102 941) ASN.1 modules" VERBATIM) + add_custom_command(OUTPUT "${_sec_r2_asn1_source_file}" + DEPENDS ${_sec_r2_asn1_dir} + COMMAND ${CMAKE_COMMAND} -DASN1C_OUTPUT_DIR=security/r2 -DASN1C_SOURCE_FILE=${_sec_r2_asn1_source_file} + -P collect_asn1c_sources.cmake + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM) + add_custom_target(generate_asn1c DEPENDS "${_support_asn1_dir}" "${_support_asn1_source_file}" "${_its_asn1_dir}" "${_its_asn1_source_file}" "${_its_r2_asn1_dir}" "${_its_r2_asn1_source_file}" "${_sec_asn1_dir}" "${_sec_asn1_source_file}" + "${_sec_r2_asn1_dir}" "${_sec_r2_asn1_source_file}" VERBATIM) add_custom_command(TARGET generate_asn1c POST_BUILD COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} @@ -151,6 +205,11 @@ if(VANETZA_ASN1_WITH_ASN1C) -P ${CMAKE_CURRENT_SOURCE_DIR}/patch_asn1c_generated.cmake COMMENT "Patching generated security asn1c files" WORKING_DIRECTORY ${_sec_asn1_dir} VERBATIM) + add_custom_command(TARGET generate_asn1c POST_BUILD + COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DASN1C_PREFIX=Vanetza_Security2_ + -P ${CMAKE_CURRENT_SOURCE_DIR}/patch_asn1c_generated.cmake + COMMENT "Patching generated security release2 asn1c files" + WORKING_DIRECTORY ${_sec_r2_asn1_dir} VERBATIM) add_custom_command(TARGET generate_asn1c POST_BUILD COMMAND ${CMAKE_COMMAND} -DPATCH_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}/patches -P ${CMAKE_CURRENT_SOURCE_DIR}/apply_patches.cmake @@ -182,6 +241,10 @@ if(VANETZA_ASN1_WITH_ASN1C) -DASN1C_OUTPUT_DIR=${_sec_asn1_dir} -DASN1C_SOURCE_FILE=${_sec_asn1_source_file} -P clean_asn1c.cmake + COMMAND ${CMAKE_COMMAND} + -DASN1C_OUTPUT_DIR=${_sec_r2_asn1_dir} + -DASN1C_SOURCE_FILE=${_sec_r2_asn1_source_file} + -P clean_asn1c.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM) add_dependencies(generate_asn1c clean_asn1c) endif() @@ -227,6 +290,7 @@ target_sources(asn1_support PRIVATE memory.c) add_asn1_component(its) add_asn1_component(its/r2) add_asn1_component(security) +add_asn1_component(security/r2) add_vanetza_component(asn1 asn1c_wrapper.cpp) target_link_libraries(asn1 PUBLIC asn1_its Boost::boost) diff --git a/vanetza/asn1/asn1c_security_r2_sources.txt b/vanetza/asn1/asn1c_security_r2_sources.txt new file mode 100644 index 000000000..e08de2bff --- /dev/null +++ b/vanetza/asn1/asn1c_security_r2_sources.txt @@ -0,0 +1,386 @@ +# generated file +security/r2/AaEntry.c +security/r2/AcaEeCertResponse.c +security/r2/AcaEeCertResponseCubkSpdu.c +security/r2/AcaEeCertResponsePlainSpdu.c +security/r2/AcaEeCertResponsePrivateSpdu.c +security/r2/AcaEeInterfacePdu.c +security/r2/AcaLaInterfacePdu.c +security/r2/AcaMaInterfacePdu.c +security/r2/AcaRaCertResponse.c +security/r2/AcaRaCertResponseSpdu.c +security/r2/AcaRaInterfacePdu.c +security/r2/AcaResponse.c +security/r2/AcaSsp.c +security/r2/AcpcNodeValue.c +security/r2/AcpcPdu.c +security/r2/AcpcPsid.c +security/r2/AcpcSsp.c +security/r2/AcpcTreeId.c +security/r2/AdditionalParams.c +security/r2/Aes128CcmCiphertext.c +security/r2/AppExtension.c +security/r2/AprvBinaryTree.c +security/r2/AprvHashCalculationInput.c +security/r2/AuthorizationResponseCode.c +security/r2/AuthorizationValidationRequest.c +security/r2/AuthorizationValidationRequestMessage.c +security/r2/AuthorizationValidationResponse.c +security/r2/AuthorizationValidationResponseCode.c +security/r2/AuthorizationValidationResponseMessage.c +security/r2/BasePublicEncryptionKey.c +security/r2/BitmapSsp.c +security/r2/BitmapSspRange.c +security/r2/BlindedKey.c +security/r2/ButterflyCertRequestMessage.c +security/r2/ButterflyCertResponseMessage.c +security/r2/ButterflyExpansion.c +security/r2/ButterflyParamsOriginal.c +security/r2/CaCertificateRekeyingMessage.c +security/r2/CaCertificateRequest.c +security/r2/CaCertificateRequestMessage.c +security/r2/CamRaBatchResponse.c +security/r2/CamRaInterfacePdu.c +security/r2/CamSsp.c +security/r2/CertIssueExtension.c +security/r2/CertManagementPdu.c +security/r2/CertRequestExtension.c +security/r2/Certificate.c +security/r2/CertificateBase.c +security/r2/CertificateChain.c +security/r2/CertificateChainSpdu.c +security/r2/CertificateFormat.c +security/r2/CertificateId.c +security/r2/CertificateManagementInfoStatus.c +security/r2/CertificateManagementInformationStatusSpdu.c +security/r2/CertificateSubjectAttributes.c +security/r2/CertificateType.c +security/r2/CircularRegion.c +security/r2/CompositeCrl.c +security/r2/CompositeCrlSpdu.c +security/r2/ContributedExtensionBlock.c +security/r2/ContributedExtensionBlocks.c +security/r2/Countersignature.c +security/r2/CountryAndRegions.c +security/r2/CountryAndSubregions.c +security/r2/CountryOnly.c +security/r2/CrlContents.c +security/r2/CrlEntry.c +security/r2/CrlInfoStatus.c +security/r2/CrlPriorityInfo.c +security/r2/CrlPsid.c +security/r2/CrlSeries.c +security/r2/CrlSignerSsp.c +security/r2/CtlCommand.c +security/r2/CtlDelete.c +security/r2/CtlElectorEntry.c +security/r2/CtlEntry.c +security/r2/CtlFormat.c +security/r2/CtlInfoStatus.c +security/r2/CtlRootCaEntry.c +security/r2/CtlSequenceNumber.c +security/r2/CtlSeriesId.c +security/r2/CtlSignatureSpdu.c +security/r2/DcDelete.c +security/r2/DcEntry.c +security/r2/DcSsp.c +security/r2/DcmSsp.c +security/r2/DeltaCtl.c +security/r2/Duration.c +security/r2/EaEntry.c +security/r2/EcSignature.c +security/r2/EcaEeCertResponse.c +security/r2/EcaEeCertResponseSpdu.c +security/r2/EcaEeInterfacePdu.c +security/r2/EcaSsp.c +security/r2/EccP256CurvePoint.c +security/r2/EccP384CurvePoint.c +security/r2/EcdsaP256Signature.c +security/r2/EcdsaP384Signature.c +security/r2/EcencP256EncryptedKey.c +security/r2/EciesP256EncryptedKey.c +security/r2/EcsigP256Signature.c +security/r2/EeEcaCertRequest.c +security/r2/EeEcaCertRequestSpdu.c +security/r2/EeMaInterfacePdu.c +security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.c +security/r2/EeRaCertRequest.c +security/r2/EeRaCertRequestSpdu.c +security/r2/EeRaDownloadRequest.c +security/r2/EeRaDownloadRequestPlainSpdu.c +security/r2/EeRaDownloadRequestSpdu.c +security/r2/EeRaInterfacePdu.c +security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.c +security/r2/EeRaX509AuthenticatedCertRequestSpdu.c +security/r2/EeSsp.c +security/r2/ElectorSsp.c +security/r2/Elevation.c +security/r2/EncryptedData.c +security/r2/EncryptedDataEncryptionKey.c +security/r2/EncryptedIndividualPLV.c +security/r2/EncryptionKey.c +security/r2/EndEntityType.c +security/r2/EnrolmentResponseCode.c +security/r2/EtsiOriginatingHeaderInfoExtension.c +security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.c +security/r2/EtsiTs102941CrlRequest.c +security/r2/EtsiTs102941CtlRequest.c +security/r2/EtsiTs102941DeltaCtlRequest.c +security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.c +security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.c +security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.c +security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.c +security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.c +security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.c +security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.c +security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.c +security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.c +security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.c +security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.c +security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.c +security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.c +security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.c +security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.c +security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.c +security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.c +security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.c +security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.c +security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.c +security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.c +security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.c +security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.c +security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.c +security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.c +security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.c +security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.c +security/r2/EtsiTs103097Certificate.c +security/r2/EtsiTs103097Data-Encrypted-Unicast.c +security/r2/EtsiTs103097Data-Encrypted.c +security/r2/EtsiTs103097Data-Signed.c +security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.c +security/r2/EtsiTs103097Data-SignedAndEncrypted.c +security/r2/EtsiTs103097Data-SignedExternalPayload.c +security/r2/EtsiTs103097Data-Unsecured.c +security/r2/EtsiTs103097Data.c +security/r2/EtsiTs103097ExtensionModule_ExtId.c +security/r2/EtsiTs103097HeaderInfoExtensionId.c +security/r2/ExpansionAlgorithmIdentifier.c +security/r2/ExplicitCertificate.c +security/r2/Extension.c +security/r2/ExtensionModuleVersion.c +security/r2/FullCtl.c +security/r2/FullIeeeTbsCtl.c +security/r2/GeographicRegion.c +security/r2/GroupCrlEntry.c +security/r2/GroupLinkageValue.c +security/r2/GroupSingleSeedCrlEntry.c +security/r2/HashAlgorithm.c +security/r2/HashBasedRevocationInfo.c +security/r2/HashedData.c +security/r2/HashedId10.c +security/r2/HashedId3.c +security/r2/HashedId32.c +security/r2/HashedId48.c +security/r2/HashedId8.c +security/r2/HeaderInfo.c +security/r2/HeaderInfoContributorId.c +security/r2/Hostname.c +security/r2/IMaxGroup.c +security/r2/IValue.c +security/r2/IcaSsp.c +security/r2/IdentifiedRegion.c +security/r2/Ieee1609ContributedHeaderInfoExtension.c +security/r2/Ieee1609Dot2BaseTypes_ExtId.c +security/r2/Ieee1609Dot2Content.c +security/r2/Ieee1609Dot2Data-Encrypted.c +security/r2/Ieee1609Dot2Data-EncryptedSigned.c +security/r2/Ieee1609Dot2Data-Signed.c +security/r2/Ieee1609Dot2Data-SignedCertRequest.c +security/r2/Ieee1609Dot2Data-SignedEncrypted.c +security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.c +security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.c +security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.c +security/r2/Ieee1609Dot2Data-Unsecured.c +security/r2/Ieee1609Dot2Data.c +security/r2/Ieee1609HeaderInfoExtensionId.c +security/r2/Ieee1609dot2dot1MsctlType.c +security/r2/IeeeExtension.c +security/r2/ImplicitCertificate.c +security/r2/IndividualAprv.c +security/r2/IndividualRevocation.c +security/r2/InnerAtRequest.c +security/r2/InnerAtResponse.c +security/r2/InnerEcRequest.c +security/r2/InnerEcRequestSignedForPop.c +security/r2/InnerEcResponse.c +security/r2/IssuerIdentifier.c +security/r2/JMaxGroup.c +security/r2/KnownLatitude.c +security/r2/KnownLongitude.c +security/r2/LAGroup.c +security/r2/LaId.c +security/r2/LaMaInterfacePdu.c +security/r2/LaRaInterfacePdu.c +security/r2/LaSsp.c +security/r2/Latitude.c +security/r2/LinkageData.c +security/r2/LinkageInfo.c +security/r2/LinkageSeed.c +security/r2/LinkageValue.c +security/r2/Longitude.c +security/r2/LopSsp.c +security/r2/LvGenerationFunctionIdentifier.c +security/r2/MaInfoStatus.c +security/r2/MaRaInterfacePdu.c +security/r2/MaSsp.c +security/r2/MissingCrlIdentifier.c +security/r2/MultiSignedCtl.c +security/r2/MultiSignedCtlSpdu.c +security/r2/NinetyDegreeInt.c +security/r2/One28BitCcmCiphertext.c +security/r2/OneEightyDegreeInt.c +security/r2/Opaque.c +security/r2/OperatingOrganizationId.c +security/r2/PKRecipientInfo.c +security/r2/PduFunctionalType.c +security/r2/PgSsp.c +security/r2/PolygonalRegion.c +security/r2/PreLinkageValue.c +security/r2/PreSharedKeyRecipientInfo.c +security/r2/Psid.c +security/r2/PsidGroupPermissions.c +security/r2/PsidSsp.c +security/r2/PsidSspRange.c +security/r2/PublicEncryptionKey.c +security/r2/PublicKeys.c +security/r2/PublicVerificationKey.c +security/r2/RaAcaCertRequest.c +security/r2/RaAcaCertRequestFlags.c +security/r2/RaAcaCertRequestSpdu.c +security/r2/RaCamBatchRequest.c +security/r2/RaEeCertAck.c +security/r2/RaEeCertAckSpdu.c +security/r2/RaEeCertAndAcpcInfoSpdu.c +security/r2/RaEeCertInfo.c +security/r2/RaEeCertInfoSpdu.c +security/r2/RaEeEnrollmentCertAckSpdu.c +security/r2/RaSsp.c +security/r2/RcaDoubleSignedLinkCertificateMessage.c +security/r2/RcaSingleSignedLinkCertificateMessage.c +security/r2/RecipientInfo.c +security/r2/RectangularRegion.c +security/r2/RegionAndSubregions.c +security/r2/RootCaEntry.c +security/r2/RootCaSsp.c +security/r2/ScmsPdu-EeEcaCertRequest.c +security/r2/ScmsPdu-EeRaCertRequest.c +security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.c +security/r2/ScmsPdu-RaAcaCertRequest.c +security/r2/ScmsPdu-Scoped.c +security/r2/ScmsPdu.c +security/r2/ScopedCertificateRequest.c +security/r2/SecuredCrl.c +security/r2/SecurityMgmtPsid.c +security/r2/SecurityMgmtSsp.c +security/r2/SeedEvolutionFunctionIdentifier.c +security/r2/SequenceOfAppExtensions.c +security/r2/SequenceOfCertIssueExtensions.c +security/r2/SequenceOfCertRequestExtensions.c +security/r2/SequenceOfCertificate.c +security/r2/SequenceOfCrlInfoStatus.c +security/r2/SequenceOfCtlInfoStatus.c +security/r2/SequenceOfGroupCrlEntry.c +security/r2/SequenceOfGroupSingleSeedCrlEntry.c +security/r2/SequenceOfHashBasedRevocationInfo.c +security/r2/SequenceOfHashedId3.c +security/r2/SequenceOfIMaxGroup.c +security/r2/SequenceOfIdentifiedRegion.c +security/r2/SequenceOfIndividualRevocation.c +security/r2/SequenceOfJMaxGroup.c +security/r2/SequenceOfLAGroup.c +security/r2/SequenceOfLinkageSeed.c +security/r2/SequenceOfMaInfoStatus.c +security/r2/SequenceOfOctetString.c +security/r2/SequenceOfPsid.c +security/r2/SequenceOfPsidGroupPermissions.c +security/r2/SequenceOfPsidSsp.c +security/r2/SequenceOfPsidSspRange.c +security/r2/SequenceOfRecipientInfo.c +security/r2/SequenceOfRectangularRegion.c +security/r2/SequenceOfRegionAndSubregions.c +security/r2/SequenceOfUint16.c +security/r2/SequenceOfUint8.c +security/r2/SequenceOfX509Certificate.c +security/r2/ServiceSpecificPermissions.c +security/r2/SharedAtRequest.c +security/r2/Signature.c +security/r2/SignedAprvBinaryTree.c +security/r2/SignedCertificateRequest.c +security/r2/SignedData.c +security/r2/SignedDataPayload.c +security/r2/SignedIndividualAprv.c +security/r2/SignedX509CertificateRequest.c +security/r2/SignerIdentifier.c +security/r2/SignerSelf.c +security/r2/SignerSingleCert.c +security/r2/SignerSingleX509Cert.c +security/r2/SspRange.c +security/r2/SubjectAssurance.c +security/r2/SubjectPermissions.c +security/r2/SymmAlgorithm.c +security/r2/SymmRecipientInfo.c +security/r2/SymmetricCiphertext.c +security/r2/SymmetricEncryptionKey.c +security/r2/TestCertificate.c +security/r2/TestSecurityMgmtSsp.c +security/r2/ThreeDLocation.c +security/r2/Time32.c +security/r2/Time64.c +security/r2/TlmEntry.c +security/r2/ToBeSignedCertificate.c +security/r2/ToBeSignedCrl.c +security/r2/ToBeSignedCtlSignature.c +security/r2/ToBeSignedData.c +security/r2/ToBeSignedHashIdCrl.c +security/r2/ToBeSignedLinkCertificate.c +security/r2/ToBeSignedLinkCertificateRca.c +security/r2/ToBeSignedLinkCertificateTlm.c +security/r2/ToBeSignedLinkageValueCrl.c +security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.c +security/r2/ToBeSignedRcaCtl.c +security/r2/ToBeSignedTlmCtl.c +security/r2/TwoDLocation.c +security/r2/TypeSpecificCrlContents.c +security/r2/Uint16.c +security/r2/Uint3.c +security/r2/Uint32.c +security/r2/Uint64.c +security/r2/Uint8.c +security/r2/UnCountryId.c +security/r2/UnknownLatitude.c +security/r2/UnknownLongitude.c +security/r2/UnsecuredAprvBinaryTree.c +security/r2/Url.c +security/r2/ValidityPeriod.c +security/r2/VerificationKeyIndicator.c +security/r2/Version.c +security/r2/X509Certificate.c +security/r2/X509SignerIdentifier.c diff --git a/vanetza/asn1/fetch_ieee_asn1_files.cmake b/vanetza/asn1/fetch_ieee_asn1_files.cmake new file mode 100644 index 000000000..e009865bd --- /dev/null +++ b/vanetza/asn1/fetch_ieee_asn1_files.cmake @@ -0,0 +1,87 @@ +find_package(Git REQUIRED) +if(NOT DIRECTORY) + message(FATAL_ERROR "DIRECTORY variable is undefined") +endif() +file(MAKE_DIRECTORY "${DIRECTORY}") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2/-/raw/2022-published/Ieee1609Dot2.asn + "${DIRECTORY}/IEEE1609dot2.asn") +file(READ "${DIRECTORY}/IEEE1609dot2.asn" _content) +string(REGEX REPLACE " Extension" " IeeeExtension" _content "${_content}") +file(WRITE "${DIRECTORY}/IEEE1609dot2.asn" "${_content}") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2/-/raw/2022-published/Ieee1609Dot2BaseTypes.asn + "${DIRECTORY}/IEEE1609dot2BaseTypes.asn") +file(READ "${DIRECTORY}/IEEE1609dot2BaseTypes.asn" _content) +string(REGEX REPLACE "([\r\n])Extension" "\\1IeeeExtension" _content "${_content}") +file(WRITE "${DIRECTORY}/IEEE1609dot2BaseTypes.asn" "${_content}") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2/-/raw/2022-published/Ieee1609Dot2Crl.asn + "${DIRECTORY}/IEEE1609dot2crl.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2/-/raw/2022-published/Ieee1609Dot2CrlBaseTypes.asn + "${DIRECTORY}/IEEE1609dot2crlBaseTypes.asn") + + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1AcaEeInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1AcaEeInterface.asn") +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1AcaLaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1AcaLaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1AcaMaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1AcaMaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1AcaRaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1AcaRaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1Acpc.asn + "${DIRECTORY}/IEEE1609dot2dot1Acpc.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1CamRaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1CamRaInterface.asn") +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1CertManagement.asn + "${DIRECTORY}/IEEE1609dot2dot1CertManagement.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1EcaEeInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1EcaEeInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1EeMaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1EeMaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1EeRaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1EeRaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1LaMaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1LaMaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1LaRaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1LaRaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1MaRaInterface.asn + "${DIRECTORY}/IEEE1609dot2dot1MaRaInterface.asn") + +file(DOWNLOAD + https://forge.etsi.org/rep/ITS/asn1/ieee1609.2.1/-/raw/2022-published/Ieee1609Dot2Dot1Protocol.asn + "${DIRECTORY}/IEEE1609dot2dot1Protocol.asn") +# --git-dir is needed as it will otherwise interface with the underlying vanetza git dir +execute_process(COMMAND "${GIT_EXECUTABLE}" --git-dir "${DIRECTORY}" -C "${DIRECTORY}" apply -v INPUT_FILE "patches/ieee/Ieeedot2dot1Protocol.patch" RESULT_VARIABLE PATCH_RESULT) +if(NOT PATCH_RESULT EQUAL 0) + message(SEND_ERROR "Applying patch on IEEE1609dot2dot1Protocol failed!") +endif() \ No newline at end of file diff --git a/vanetza/asn1/patches/ieee/Ieeedot2dot1Protocol.patch b/vanetza/asn1/patches/ieee/Ieeedot2dot1Protocol.patch new file mode 100644 index 000000000..33589cdaa --- /dev/null +++ b/vanetza/asn1/patches/ieee/Ieeedot2dot1Protocol.patch @@ -0,0 +1,60 @@ +diff --git a/IEEE1609dot2dot1Protocol.asn b/IEEE1609dot2dot1Protocol.asn +index 78c0489..1bfb644 100644 +--- a/IEEE1609dot2dot1Protocol.asn ++++ b/IEEE1609dot2dot1Protocol.asn +@@ -440,31 +440,35 @@ SignerSelf ::= SignerIdentifier (WITH COMPONENTS { + -- Certificate Requests -- + --***************************************************************************-- + ++ScmsPdu-RaAcaCertRequest ::= ScmsPdu-Scoped { ++ AcaRaInterfacePdu (WITH COMPONENTS { ++ raAcaCertRequest ++ }) ++} ++ScmsPdu-EeEcaCertRequest ::= ScmsPdu-Scoped { ++ EcaEeInterfacePdu (WITH COMPONENTS { ++ eeEcaCertRequest ++ }) ++} ++ScmsPdu-EeRaCertRequest ::= ScmsPdu-Scoped { ++ EeRaInterfacePdu (WITH COMPONENTS { ++ eeRaCertRequest ++ }) ++} ++ScmsPdu-EeRaSuccessorEnrollmentCertRequest ::= ScmsPdu-Scoped { ++ EeRaInterfacePdu (WITH COMPONENTS { ++ eeRaSuccessorEnrollmentCertRequest ++ }) ++} ++ ++ + /** + * @brief This structure defines the all certificate request structures as a + * scoped version of the ScmsPdu. + */ + ScopedCertificateRequest ::= ScmsPdu ( +- ScmsPdu-Scoped { +- AcaRaInterfacePdu (WITH COMPONENTS { +- raAcaCertRequest +- }) +- } | +- ScmsPdu-Scoped { +- EcaEeInterfacePdu (WITH COMPONENTS { +- eeEcaCertRequest +- }) +- } | +- ScmsPdu-Scoped { +- EeRaInterfacePdu (WITH COMPONENTS { +- eeRaCertRequest +- }) +- } | +- ScmsPdu-Scoped { +- EeRaInterfacePdu (WITH COMPONENTS { +- eeRaSuccessorEnrollmentCertRequest +- }) +- } ++ScmsPdu-RaAcaCertRequest | ScmsPdu-EeEcaCertRequest | ++ScmsPdu-EeRaCertRequest | ScmsPdu-EeRaSuccessorEnrollmentCertRequest + ) + + /** diff --git a/vanetza/asn1/security/r2/AaEntry.c b/vanetza/asn1/security/r2/AaEntry.c new file mode 100644 index 000000000..6ebed86db --- /dev/null +++ b/vanetza/asn1/security/r2/AaEntry.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AaEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AaEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AaEntry, aaCertificate), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aaCertificate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AaEntry, accessPoint), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Url, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "accessPoint" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AaEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_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_Vanetza_Security2_AaEntry_specs_1 = { + sizeof(struct Vanetza_Security2_AaEntry), + offsetof(struct Vanetza_Security2_AaEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_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_Vanetza_Security2_AaEntry = { + "AaEntry", + "AaEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AaEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AaEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AaEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AaEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AaEntry_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_AaEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AaEntry.h b/vanetza/asn1/security/r2/AaEntry.h new file mode 100644 index 000000000..2c8c2adef --- /dev/null +++ b/vanetza/asn1/security/r2/AaEntry.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AaEntry_H_ +#define _Vanetza_Security2_AaEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Certificate.h" +#include "Url.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AaEntry */ +typedef struct Vanetza_Security2_AaEntry { + Vanetza_Security2_EtsiTs103097Certificate_t aaCertificate; + Vanetza_Security2_Url_t accessPoint; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AaEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AaEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AaEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AaEntry_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AaEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaEeCertResponse.c b/vanetza/asn1/security/r2/AcaEeCertResponse.c new file mode 100644 index 000000000..d186f7c8c --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponse.c @@ -0,0 +1,212 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaEeCertResponse.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_privateKeyInfo_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_privateKeyInfo_constr_5 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_privateKeyInfo_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaEeCertResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaEeCertResponse, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaEeCertResponse, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaEeCertResponse, certificate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificate" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_AcaEeCertResponse, privateKeyInfo), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_privateKeyInfo_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_privateKeyInfo_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_privateKeyInfo_constraint_1 + }, + 0, 0, /* No default value */ + "privateKeyInfo" + }, +}; +static const int asn_MAP_Vanetza_Security2_AcaEeCertResponse_oms_1[] = { 3 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcaEeCertResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* certificate */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* privateKeyInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AcaEeCertResponse_specs_1 = { + sizeof(struct Vanetza_Security2_AcaEeCertResponse), + offsetof(struct Vanetza_Security2_AcaEeCertResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_AcaEeCertResponse_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_AcaEeCertResponse_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponse = { + "AcaEeCertResponse", + "AcaEeCertResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AcaEeCertResponse_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcaEeCertResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaEeCertResponse.h b/vanetza/asn1/security/r2/AcaEeCertResponse.h new file mode 100644 index 000000000..b500eaa86 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponse.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaEeCertResponse_H_ +#define _Vanetza_Security2_AcaEeCertResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "Certificate.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaEeCertResponse */ +typedef struct Vanetza_Security2_AcaEeCertResponse { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_Certificate_t certificate; + OCTET_STRING_t *privateKeyInfo; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcaEeCertResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AcaEeCertResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaEeCertResponse_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaEeCertResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaEeCertResponseCubkSpdu.c b/vanetza/asn1/security/r2/AcaEeCertResponseCubkSpdu.c new file mode 100644 index 000000000..4254d4069 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponseCubkSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaEeCertResponseCubkSpdu.h" + +int +Vanetza_Security2_AcaEeCertResponseCubkSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaEeCertResponseCubkSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeCertResponseCubkSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu = { + "AcaEeCertResponseCubkSpdu", + "AcaEeCertResponseCubkSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaEeCertResponseCubkSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaEeCertResponseCubkSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcaEeCertResponseCubkSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaEeCertResponseCubkSpdu.h b/vanetza/asn1/security/r2/AcaEeCertResponseCubkSpdu.h new file mode 100644 index 000000000..3f39bf6db --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponseCubkSpdu.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaEeCertResponseCubkSpdu_H_ +#define _Vanetza_Security2_AcaEeCertResponseCubkSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Encrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaEeCertResponseCubkSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_t Vanetza_Security2_AcaEeCertResponseCubkSpdu_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeCertResponseCubkSpdu_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu; +asn_struct_free_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_free; +asn_struct_print_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_print; +asn_constr_check_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_AcaEeCertResponseCubkSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaEeCertResponseCubkSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaEeCertResponsePlainSpdu.c b/vanetza/asn1/security/r2/AcaEeCertResponsePlainSpdu.c new file mode 100644 index 000000000..82a24d5aa --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponsePlainSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaEeCertResponsePlainSpdu.h" + +int +Vanetza_Security2_AcaEeCertResponsePlainSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaEeCertResponsePlainSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeCertResponsePlainSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu = { + "AcaEeCertResponsePlainSpdu", + "AcaEeCertResponsePlainSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaEeCertResponsePlainSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaEeCertResponsePlainSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcaEeCertResponsePlainSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaEeCertResponsePlainSpdu.h b/vanetza/asn1/security/r2/AcaEeCertResponsePlainSpdu.h new file mode 100644 index 000000000..685b7d560 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponsePlainSpdu.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaEeCertResponsePlainSpdu_H_ +#define _Vanetza_Security2_AcaEeCertResponsePlainSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaEeCertResponsePlainSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t Vanetza_Security2_AcaEeCertResponsePlainSpdu_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeCertResponsePlainSpdu_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu; +asn_struct_free_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_free; +asn_struct_print_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_print; +asn_constr_check_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_AcaEeCertResponsePlainSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaEeCertResponsePlainSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaEeCertResponsePrivateSpdu.c b/vanetza/asn1/security/r2/AcaEeCertResponsePrivateSpdu.c new file mode 100644 index 000000000..9a90f8f2f --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponsePrivateSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaEeCertResponsePrivateSpdu.h" + +int +Vanetza_Security2_AcaEeCertResponsePrivateSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu = { + "AcaEeCertResponsePrivateSpdu", + "AcaEeCertResponsePrivateSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaEeCertResponsePrivateSpdu.h b/vanetza/asn1/security/r2/AcaEeCertResponsePrivateSpdu.h new file mode 100644 index 000000000..334d8d645 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeCertResponsePrivateSpdu.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaEeCertResponsePrivateSpdu_H_ +#define _Vanetza_Security2_AcaEeCertResponsePrivateSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-EncryptedSigned.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaEeCertResponsePrivateSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_t Vanetza_Security2_AcaEeCertResponsePrivateSpdu_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu; +asn_struct_free_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_free; +asn_struct_print_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_print; +asn_constr_check_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_AcaEeCertResponsePrivateSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaEeCertResponsePrivateSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaEeInterfacePdu.c b/vanetza/asn1/security/r2/AcaEeInterfacePdu.c new file mode 100644 index 000000000..5517c3aa5 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeInterfacePdu.c @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaEeInterfacePdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaEeInterfacePdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeInterfacePdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaEeInterfacePdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaEeInterfacePdu, choice.acaEeCertResponse), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaEeCertResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acaEeCertResponse" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcaEeInterfacePdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* acaEeCertResponse */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcaEeInterfacePdu_specs_1 = { + sizeof(struct Vanetza_Security2_AcaEeInterfacePdu), + offsetof(struct Vanetza_Security2_AcaEeInterfacePdu, _asn_ctx), + offsetof(struct Vanetza_Security2_AcaEeInterfacePdu, present), + sizeof(((struct Vanetza_Security2_AcaEeInterfacePdu *)0)->present), + asn_MAP_Vanetza_Security2_AcaEeInterfacePdu_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeInterfacePdu = { + "AcaEeInterfacePdu", + "AcaEeInterfacePdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaEeInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaEeInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_AcaEeInterfacePdu_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcaEeInterfacePdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaEeInterfacePdu.h b/vanetza/asn1/security/r2/AcaEeInterfacePdu.h new file mode 100644 index 000000000..1d38df60c --- /dev/null +++ b/vanetza/asn1/security/r2/AcaEeInterfacePdu.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaEeInterfacePdu_H_ +#define _Vanetza_Security2_AcaEeInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AcaEeCertResponse.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AcaEeInterfacePdu_PR { + Vanetza_Security2_AcaEeInterfacePdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_AcaEeInterfacePdu_PR_acaEeCertResponse + /* Extensions may appear below */ + +} Vanetza_Security2_AcaEeInterfacePdu_PR; + +/* Vanetza_Security2_AcaEeInterfacePdu */ +typedef struct Vanetza_Security2_AcaEeInterfacePdu { + Vanetza_Security2_AcaEeInterfacePdu_PR present; + union Vanetza_Security2_AcaEeInterfacePdu_u { + Vanetza_Security2_AcaEeCertResponse_t acaEeCertResponse; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcaEeInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaEeInterfacePdu; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcaEeInterfacePdu_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaEeInterfacePdu_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaEeInterfacePdu_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaEeInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaLaInterfacePdu.c b/vanetza/asn1/security/r2/AcaLaInterfacePdu.c new file mode 100644 index 000000000..8760b3836 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaLaInterfacePdu.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaLaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaLaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaLaInterfacePdu.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaLaInterfacePdu = { + "AcaLaInterfacePdu", + "AcaLaInterfacePdu", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaLaInterfacePdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/AcaLaInterfacePdu.h b/vanetza/asn1/security/r2/AcaLaInterfacePdu.h new file mode 100644 index 000000000..bd53d1ba5 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaLaInterfacePdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaLaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaLaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaLaInterfacePdu_H_ +#define _Vanetza_Security2_AcaLaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaLaInterfacePdu */ +typedef NULL_t Vanetza_Security2_AcaLaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaLaInterfacePdu; +asn_struct_free_f Vanetza_Security2_AcaLaInterfacePdu_free; +asn_struct_print_f Vanetza_Security2_AcaLaInterfacePdu_print; +asn_constr_check_f Vanetza_Security2_AcaLaInterfacePdu_constraint; +ber_type_decoder_f Vanetza_Security2_AcaLaInterfacePdu_decode_ber; +der_type_encoder_f Vanetza_Security2_AcaLaInterfacePdu_encode_der; +xer_type_decoder_f Vanetza_Security2_AcaLaInterfacePdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcaLaInterfacePdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcaLaInterfacePdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcaLaInterfacePdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcaLaInterfacePdu_encode_oer; +per_type_decoder_f Vanetza_Security2_AcaLaInterfacePdu_decode_uper; +per_type_encoder_f Vanetza_Security2_AcaLaInterfacePdu_encode_uper; +per_type_decoder_f Vanetza_Security2_AcaLaInterfacePdu_decode_aper; +per_type_encoder_f Vanetza_Security2_AcaLaInterfacePdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaLaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaMaInterfacePdu.c b/vanetza/asn1/security/r2/AcaMaInterfacePdu.c new file mode 100644 index 000000000..adce62c83 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaMaInterfacePdu.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaMaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaMaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaMaInterfacePdu.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaMaInterfacePdu = { + "AcaMaInterfacePdu", + "AcaMaInterfacePdu", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaMaInterfacePdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/AcaMaInterfacePdu.h b/vanetza/asn1/security/r2/AcaMaInterfacePdu.h new file mode 100644 index 000000000..27a53f653 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaMaInterfacePdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaMaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaMaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaMaInterfacePdu_H_ +#define _Vanetza_Security2_AcaMaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaMaInterfacePdu */ +typedef NULL_t Vanetza_Security2_AcaMaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaMaInterfacePdu; +asn_struct_free_f Vanetza_Security2_AcaMaInterfacePdu_free; +asn_struct_print_f Vanetza_Security2_AcaMaInterfacePdu_print; +asn_constr_check_f Vanetza_Security2_AcaMaInterfacePdu_constraint; +ber_type_decoder_f Vanetza_Security2_AcaMaInterfacePdu_decode_ber; +der_type_encoder_f Vanetza_Security2_AcaMaInterfacePdu_encode_der; +xer_type_decoder_f Vanetza_Security2_AcaMaInterfacePdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcaMaInterfacePdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcaMaInterfacePdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcaMaInterfacePdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcaMaInterfacePdu_encode_oer; +per_type_decoder_f Vanetza_Security2_AcaMaInterfacePdu_decode_uper; +per_type_encoder_f Vanetza_Security2_AcaMaInterfacePdu_encode_uper; +per_type_decoder_f Vanetza_Security2_AcaMaInterfacePdu_decode_aper; +per_type_encoder_f Vanetza_Security2_AcaMaInterfacePdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaMaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaRaCertResponse.c b/vanetza/asn1/security/r2/AcaRaCertResponse.c new file mode 100644 index 000000000..36e2f6347 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaRaCertResponse.c @@ -0,0 +1,172 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaRaCertResponse.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaRaCertResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaRaCertResponse, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaRaCertResponse, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaRaCertResponse, requestHash), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaRaCertResponse, acaResponse), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acaResponse" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcaRaCertResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* acaResponse */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AcaRaCertResponse_specs_1 = { + sizeof(struct Vanetza_Security2_AcaRaCertResponse), + offsetof(struct Vanetza_Security2_AcaRaCertResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_AcaRaCertResponse_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaRaCertResponse = { + "AcaRaCertResponse", + "AcaRaCertResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AcaRaCertResponse_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcaRaCertResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaRaCertResponse.h b/vanetza/asn1/security/r2/AcaRaCertResponse.h new file mode 100644 index 000000000..33332a86e --- /dev/null +++ b/vanetza/asn1/security/r2/AcaRaCertResponse.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaRaCertResponse_H_ +#define _Vanetza_Security2_AcaRaCertResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "HashedId8.h" +#include "AcaResponse.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaRaCertResponse */ +typedef struct Vanetza_Security2_AcaRaCertResponse { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_HashedId8_t requestHash; + Vanetza_Security2_AcaResponse_t acaResponse; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcaRaCertResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaRaCertResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AcaRaCertResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaRaCertResponse_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaRaCertResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaRaCertResponseSpdu.c b/vanetza/asn1/security/r2/AcaRaCertResponseSpdu.c new file mode 100644 index 000000000..2e8810f50 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaRaCertResponseSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaRaCertResponseSpdu.h" + +int +Vanetza_Security2_AcaRaCertResponseSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaRaCertResponseSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaRaCertResponseSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu = { + "AcaRaCertResponseSpdu", + "AcaRaCertResponseSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaRaCertResponseSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaRaCertResponseSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcaRaCertResponseSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaRaCertResponseSpdu.h b/vanetza/asn1/security/r2/AcaRaCertResponseSpdu.h new file mode 100644 index 000000000..eb3a2ad0a --- /dev/null +++ b/vanetza/asn1/security/r2/AcaRaCertResponseSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaRaCertResponseSpdu_H_ +#define _Vanetza_Security2_AcaRaCertResponseSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaRaCertResponseSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_AcaRaCertResponseSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaRaCertResponseSpdu; +asn_struct_free_f Vanetza_Security2_AcaRaCertResponseSpdu_free; +asn_struct_print_f Vanetza_Security2_AcaRaCertResponseSpdu_print; +asn_constr_check_f Vanetza_Security2_AcaRaCertResponseSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_AcaRaCertResponseSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_AcaRaCertResponseSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_AcaRaCertResponseSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcaRaCertResponseSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcaRaCertResponseSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcaRaCertResponseSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcaRaCertResponseSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_AcaRaCertResponseSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_AcaRaCertResponseSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_AcaRaCertResponseSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_AcaRaCertResponseSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaRaCertResponseSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaRaInterfacePdu.c b/vanetza/asn1/security/r2/AcaRaInterfacePdu.c new file mode 100644 index 000000000..f1cb327cb --- /dev/null +++ b/vanetza/asn1/security/r2/AcaRaInterfacePdu.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaRaInterfacePdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaRaInterfacePdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaRaInterfacePdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaRaInterfacePdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaRaInterfacePdu, choice.raAcaCertRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaAcaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "raAcaCertRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaRaInterfacePdu, choice.acaRaCertResponse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaRaCertResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acaRaCertResponse" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcaRaInterfacePdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* raAcaCertRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* acaRaCertResponse */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcaRaInterfacePdu_specs_1 = { + sizeof(struct Vanetza_Security2_AcaRaInterfacePdu), + offsetof(struct Vanetza_Security2_AcaRaInterfacePdu, _asn_ctx), + offsetof(struct Vanetza_Security2_AcaRaInterfacePdu, present), + sizeof(((struct Vanetza_Security2_AcaRaInterfacePdu *)0)->present), + asn_MAP_Vanetza_Security2_AcaRaInterfacePdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaRaInterfacePdu = { + "AcaRaInterfacePdu", + "AcaRaInterfacePdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaRaInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaRaInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_AcaRaInterfacePdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcaRaInterfacePdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaRaInterfacePdu.h b/vanetza/asn1/security/r2/AcaRaInterfacePdu.h new file mode 100644 index 000000000..4506d5169 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaRaInterfacePdu.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaRaInterfacePdu_H_ +#define _Vanetza_Security2_AcaRaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RaAcaCertRequest.h" +#include "AcaRaCertResponse.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AcaRaInterfacePdu_PR { + Vanetza_Security2_AcaRaInterfacePdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_AcaRaInterfacePdu_PR_raAcaCertRequest, + Vanetza_Security2_AcaRaInterfacePdu_PR_acaRaCertResponse + /* Extensions may appear below */ + +} Vanetza_Security2_AcaRaInterfacePdu_PR; + +/* Vanetza_Security2_AcaRaInterfacePdu */ +typedef struct Vanetza_Security2_AcaRaInterfacePdu { + Vanetza_Security2_AcaRaInterfacePdu_PR present; + union Vanetza_Security2_AcaRaInterfacePdu_u { + Vanetza_Security2_RaAcaCertRequest_t raAcaCertRequest; + Vanetza_Security2_AcaRaCertResponse_t acaRaCertResponse; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcaRaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaRaInterfacePdu; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcaRaInterfacePdu_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaRaInterfacePdu_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaRaInterfacePdu_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaRaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaResponse.c b/vanetza/asn1/security/r2/AcaResponse.c new file mode 100644 index 000000000..32c437607 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaResponse.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaResponse.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcaResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaResponse_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaResponse, choice.plain), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaEeCertResponsePlainSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "plain" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaResponse, choice.Private), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaEeCertResponsePrivateSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "private" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaResponse, choice.cubk), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaEeCertResponseCubkSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cubk" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcaResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* plain */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* private */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cubk */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcaResponse_specs_1 = { + sizeof(struct Vanetza_Security2_AcaResponse), + offsetof(struct Vanetza_Security2_AcaResponse, _asn_ctx), + offsetof(struct Vanetza_Security2_AcaResponse, present), + sizeof(((struct Vanetza_Security2_AcaResponse *)0)->present), + asn_MAP_Vanetza_Security2_AcaResponse_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaResponse = { + "AcaResponse", + "AcaResponse", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcaResponse_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcaResponse_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_AcaResponse_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcaResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaResponse.h b/vanetza/asn1/security/r2/AcaResponse.h new file mode 100644 index 000000000..181e51d5c --- /dev/null +++ b/vanetza/asn1/security/r2/AcaResponse.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaResponse_H_ +#define _Vanetza_Security2_AcaResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AcaEeCertResponsePlainSpdu.h" +#include "AcaEeCertResponsePrivateSpdu.h" +#include "AcaEeCertResponseCubkSpdu.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AcaResponse_PR { + Vanetza_Security2_AcaResponse_PR_NOTHING, /* No components present */ + Vanetza_Security2_AcaResponse_PR_plain, + Vanetza_Security2_AcaResponse_PR_private, + Vanetza_Security2_AcaResponse_PR_cubk + /* Extensions may appear below */ + +} Vanetza_Security2_AcaResponse_PR; + +/* Vanetza_Security2_AcaResponse */ +typedef struct Vanetza_Security2_AcaResponse { + Vanetza_Security2_AcaResponse_PR present; + union Vanetza_Security2_AcaResponse_u { + Vanetza_Security2_AcaEeCertResponsePlainSpdu_t plain; + Vanetza_Security2_AcaEeCertResponsePrivateSpdu_t Private; + Vanetza_Security2_AcaEeCertResponseCubkSpdu_t cubk; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcaResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaResponse; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcaResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaResponse_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcaResponse_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcaSsp.c b/vanetza/asn1/security/r2/AcaSsp.c new file mode 100644 index 000000000..52fb2d5a4 --- /dev/null +++ b/vanetza/asn1/security/r2/AcaSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AcaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_AcaSsp), + offsetof(struct Vanetza_Security2_AcaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_AcaSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaSsp = { + "AcaSsp", + "AcaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AcaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AcaSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcaSsp.h b/vanetza/asn1/security/r2/AcaSsp.h new file mode 100644 index 000000000..84c2adf0f --- /dev/null +++ b/vanetza/asn1/security/r2/AcaSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcaSsp_H_ +#define _Vanetza_Security2_AcaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcaSsp */ +typedef struct Vanetza_Security2_AcaSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AcaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcaSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcpcNodeValue.c b/vanetza/asn1/security/r2/AcpcNodeValue.c new file mode 100644 index 000000000..2e09a4f60 --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcNodeValue.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcpcNodeValue.h" + +int +Vanetza_Security2_AcpcNodeValue_constraint(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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcpcNodeValue_constr_1 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcNodeValue_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcNodeValue = { + "AcpcNodeValue", + "AcpcNodeValue", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcpcNodeValue_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcpcNodeValue_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcpcNodeValue_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcpcNodeValue_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcpcNodeValue.h b/vanetza/asn1/security/r2/AcpcNodeValue.h new file mode 100644 index 000000000..e86fb9fb5 --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcNodeValue.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcpcNodeValue_H_ +#define _Vanetza_Security2_AcpcNodeValue_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcpcNodeValue */ +typedef OCTET_STRING_t Vanetza_Security2_AcpcNodeValue_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcNodeValue_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcNodeValue; +asn_struct_free_f Vanetza_Security2_AcpcNodeValue_free; +asn_struct_print_f Vanetza_Security2_AcpcNodeValue_print; +asn_constr_check_f Vanetza_Security2_AcpcNodeValue_constraint; +ber_type_decoder_f Vanetza_Security2_AcpcNodeValue_decode_ber; +der_type_encoder_f Vanetza_Security2_AcpcNodeValue_encode_der; +xer_type_decoder_f Vanetza_Security2_AcpcNodeValue_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcpcNodeValue_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcpcNodeValue_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcpcNodeValue_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcpcNodeValue_encode_oer; +per_type_decoder_f Vanetza_Security2_AcpcNodeValue_decode_uper; +per_type_encoder_f Vanetza_Security2_AcpcNodeValue_encode_uper; +per_type_decoder_f Vanetza_Security2_AcpcNodeValue_decode_aper; +per_type_encoder_f Vanetza_Security2_AcpcNodeValue_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcpcNodeValue_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcpcPdu.c b/vanetza/asn1/security/r2/AcpcPdu.c new file mode 100644 index 000000000..6d33549bd --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcPdu.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcpcPdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcpcPdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcPdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcpcPdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcpcPdu, choice.tree), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AprvBinaryTree, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tree" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcpcPdu, choice.aprv), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IndividualAprv, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aprv" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcpcPdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tree */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* aprv */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcpcPdu_specs_1 = { + sizeof(struct Vanetza_Security2_AcpcPdu), + offsetof(struct Vanetza_Security2_AcpcPdu, _asn_ctx), + offsetof(struct Vanetza_Security2_AcpcPdu, present), + sizeof(((struct Vanetza_Security2_AcpcPdu *)0)->present), + asn_MAP_Vanetza_Security2_AcpcPdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcPdu = { + "AcpcPdu", + "AcpcPdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcpcPdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcpcPdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_AcpcPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcpcPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcpcPdu.h b/vanetza/asn1/security/r2/AcpcPdu.h new file mode 100644 index 000000000..3695da587 --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcPdu.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcpcPdu_H_ +#define _Vanetza_Security2_AcpcPdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AprvBinaryTree.h" +#include "IndividualAprv.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AcpcPdu_PR { + Vanetza_Security2_AcpcPdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_AcpcPdu_PR_tree, + Vanetza_Security2_AcpcPdu_PR_aprv + /* Extensions may appear below */ + +} Vanetza_Security2_AcpcPdu_PR; + +/* Vanetza_Security2_AcpcPdu */ +typedef struct Vanetza_Security2_AcpcPdu { + Vanetza_Security2_AcpcPdu_PR present; + union Vanetza_Security2_AcpcPdu_u { + Vanetza_Security2_AprvBinaryTree_t tree; + Vanetza_Security2_IndividualAprv_t aprv; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcpcPdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcPdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcpcPdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcpcPsid.c b/vanetza/asn1/security/r2/AcpcPsid.c new file mode 100644 index 000000000..7c6c1639c --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcPsid.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcpcPsid.h" + +int +Vanetza_Security2_AcpcPsid_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value == 2113696L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Psid, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcpcPsid_constr_1 CC_NOTUSED = { + { 4, 1 } /* (2113696..2113696) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcPsid_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 0, -1, 2113696, 2113696 } /* (2113696..2113696) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcpcPsid_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcPsid = { + "AcpcPsid", + "AcpcPsid", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_AcpcPsid_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcpcPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcpcPsid_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcpcPsid_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcpcPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcpcPsid_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcpcPsid_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcpcPsid_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcpcPsid_constraint + }, + 0, 0, /* No members */ + &asn_SPC_Vanetza_Security2_Psid_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcpcPsid.h b/vanetza/asn1/security/r2/AcpcPsid.h new file mode 100644 index 000000000..2debb264e --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcPsid.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcpcPsid_H_ +#define _Vanetza_Security2_AcpcPsid_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcpcPsid */ +typedef Vanetza_Security2_Psid_t Vanetza_Security2_AcpcPsid_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcPsid; +asn_struct_free_f Vanetza_Security2_AcpcPsid_free; +asn_struct_print_f Vanetza_Security2_AcpcPsid_print; +asn_constr_check_f Vanetza_Security2_AcpcPsid_constraint; +ber_type_decoder_f Vanetza_Security2_AcpcPsid_decode_ber; +der_type_encoder_f Vanetza_Security2_AcpcPsid_encode_der; +xer_type_decoder_f Vanetza_Security2_AcpcPsid_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcpcPsid_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcpcPsid_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcpcPsid_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcpcPsid_encode_oer; +per_type_decoder_f Vanetza_Security2_AcpcPsid_decode_uper; +per_type_encoder_f Vanetza_Security2_AcpcPsid_encode_uper; +per_type_decoder_f Vanetza_Security2_AcpcPsid_decode_aper; +per_type_encoder_f Vanetza_Security2_AcpcPsid_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcpcPsid_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcpcSsp.c b/vanetza/asn1/security/r2/AcpcSsp.c new file mode 100644 index 000000000..0579a2e5b --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcSsp.c @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcpcSsp.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcpcSsp_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcSsp_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_AcpcSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AcpcSsp, choice.cam), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CamSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cam" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AcpcSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* cam */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AcpcSsp_specs_1 = { + sizeof(struct Vanetza_Security2_AcpcSsp), + offsetof(struct Vanetza_Security2_AcpcSsp, _asn_ctx), + offsetof(struct Vanetza_Security2_AcpcSsp, present), + sizeof(((struct Vanetza_Security2_AcpcSsp *)0)->present), + asn_MAP_Vanetza_Security2_AcpcSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcSsp = { + "AcpcSsp", + "AcpcSsp", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcpcSsp_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcpcSsp_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_AcpcSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_AcpcSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcpcSsp.h b/vanetza/asn1/security/r2/AcpcSsp.h new file mode 100644 index 000000000..3a58ad001 --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcSsp.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcpcSsp_H_ +#define _Vanetza_Security2_AcpcSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CamSsp.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AcpcSsp_PR { + Vanetza_Security2_AcpcSsp_PR_NOTHING, /* No components present */ + Vanetza_Security2_AcpcSsp_PR_cam + /* Extensions may appear below */ + +} Vanetza_Security2_AcpcSsp_PR; + +/* Vanetza_Security2_AcpcSsp */ +typedef struct Vanetza_Security2_AcpcSsp { + Vanetza_Security2_AcpcSsp_PR present; + union Vanetza_Security2_AcpcSsp_u { + Vanetza_Security2_CamSsp_t cam; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AcpcSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcSsp; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcpcSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AcpcTreeId.c b/vanetza/asn1/security/r2/AcpcTreeId.c new file mode 100644 index 000000000..8e40f64dd --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcTreeId.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AcpcTreeId.h" + +int +Vanetza_Security2_AcpcTreeId_constraint(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 == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AcpcTreeId_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcTreeId_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcTreeId = { + "AcpcTreeId", + "AcpcTreeId", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AcpcTreeId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AcpcTreeId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AcpcTreeId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AcpcTreeId_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AcpcTreeId.h b/vanetza/asn1/security/r2/AcpcTreeId.h new file mode 100644 index 000000000..31e4c91de --- /dev/null +++ b/vanetza/asn1/security/r2/AcpcTreeId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AcpcTreeId_H_ +#define _Vanetza_Security2_AcpcTreeId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AcpcTreeId */ +typedef OCTET_STRING_t Vanetza_Security2_AcpcTreeId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AcpcTreeId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AcpcTreeId; +asn_struct_free_f Vanetza_Security2_AcpcTreeId_free; +asn_struct_print_f Vanetza_Security2_AcpcTreeId_print; +asn_constr_check_f Vanetza_Security2_AcpcTreeId_constraint; +ber_type_decoder_f Vanetza_Security2_AcpcTreeId_decode_ber; +der_type_encoder_f Vanetza_Security2_AcpcTreeId_encode_der; +xer_type_decoder_f Vanetza_Security2_AcpcTreeId_decode_xer; +xer_type_encoder_f Vanetza_Security2_AcpcTreeId_encode_xer; +jer_type_encoder_f Vanetza_Security2_AcpcTreeId_encode_jer; +oer_type_decoder_f Vanetza_Security2_AcpcTreeId_decode_oer; +oer_type_encoder_f Vanetza_Security2_AcpcTreeId_encode_oer; +per_type_decoder_f Vanetza_Security2_AcpcTreeId_decode_uper; +per_type_encoder_f Vanetza_Security2_AcpcTreeId_encode_uper; +per_type_decoder_f Vanetza_Security2_AcpcTreeId_decode_aper; +per_type_encoder_f Vanetza_Security2_AcpcTreeId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AcpcTreeId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AdditionalParams.c b/vanetza/asn1/security/r2/AdditionalParams.c new file mode 100644 index 000000000..391816aed --- /dev/null +++ b/vanetza/asn1/security/r2/AdditionalParams.c @@ -0,0 +1,144 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AdditionalParams.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AdditionalParams_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AdditionalParams_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AdditionalParams_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AdditionalParams, choice.original), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ButterflyParamsOriginal, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "original" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AdditionalParams, choice.unified), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ButterflyExpansion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "unified" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AdditionalParams, choice.compactUnified), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ButterflyExpansion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "compactUnified" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AdditionalParams, choice.encryptionKey), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptionKey" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AdditionalParams_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* original */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* unified */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* compactUnified */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* encryptionKey */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AdditionalParams_specs_1 = { + sizeof(struct Vanetza_Security2_AdditionalParams), + offsetof(struct Vanetza_Security2_AdditionalParams, _asn_ctx), + offsetof(struct Vanetza_Security2_AdditionalParams, present), + sizeof(((struct Vanetza_Security2_AdditionalParams *)0)->present), + asn_MAP_Vanetza_Security2_AdditionalParams_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AdditionalParams = { + "AdditionalParams", + "AdditionalParams", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AdditionalParams_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AdditionalParams_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_AdditionalParams_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_AdditionalParams_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AdditionalParams.h b/vanetza/asn1/security/r2/AdditionalParams.h new file mode 100644 index 000000000..1cbdbb07b --- /dev/null +++ b/vanetza/asn1/security/r2/AdditionalParams.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AdditionalParams_H_ +#define _Vanetza_Security2_AdditionalParams_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ButterflyParamsOriginal.h" +#include "ButterflyExpansion.h" +#include "PublicEncryptionKey.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AdditionalParams_PR { + Vanetza_Security2_AdditionalParams_PR_NOTHING, /* No components present */ + Vanetza_Security2_AdditionalParams_PR_original, + Vanetza_Security2_AdditionalParams_PR_unified, + Vanetza_Security2_AdditionalParams_PR_compactUnified, + Vanetza_Security2_AdditionalParams_PR_encryptionKey + /* Extensions may appear below */ + +} Vanetza_Security2_AdditionalParams_PR; + +/* Vanetza_Security2_AdditionalParams */ +typedef struct Vanetza_Security2_AdditionalParams { + Vanetza_Security2_AdditionalParams_PR present; + union Vanetza_Security2_AdditionalParams_u { + Vanetza_Security2_ButterflyParamsOriginal_t original; + Vanetza_Security2_ButterflyExpansion_t unified; + Vanetza_Security2_ButterflyExpansion_t compactUnified; + Vanetza_Security2_PublicEncryptionKey_t encryptionKey; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AdditionalParams_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AdditionalParams; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_AdditionalParams_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AdditionalParams_1[4]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AdditionalParams_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AdditionalParams_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Aes128CcmCiphertext.c b/vanetza/asn1/security/r2/Aes128CcmCiphertext.c new file mode 100644 index 000000000..ec3f5433a --- /dev/null +++ b/vanetza/asn1/security/r2/Aes128CcmCiphertext.c @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Aes128CcmCiphertext.h" + +/* + * This type is implemented using Vanetza_Security2_One28BitCcmCiphertext, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Aes128CcmCiphertext = { + "Aes128CcmCiphertext", + "Aes128CcmCiphertext", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Aes128CcmCiphertext_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_One28BitCcmCiphertext_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_One28BitCcmCiphertext_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Aes128CcmCiphertext.h b/vanetza/asn1/security/r2/Aes128CcmCiphertext.h new file mode 100644 index 000000000..e9a262b3a --- /dev/null +++ b/vanetza/asn1/security/r2/Aes128CcmCiphertext.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Aes128CcmCiphertext_H_ +#define _Vanetza_Security2_Aes128CcmCiphertext_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "One28BitCcmCiphertext.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Aes128CcmCiphertext */ +typedef Vanetza_Security2_One28BitCcmCiphertext_t Vanetza_Security2_Aes128CcmCiphertext_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Aes128CcmCiphertext; +asn_struct_free_f Vanetza_Security2_Aes128CcmCiphertext_free; +asn_struct_print_f Vanetza_Security2_Aes128CcmCiphertext_print; +asn_constr_check_f Vanetza_Security2_Aes128CcmCiphertext_constraint; +ber_type_decoder_f Vanetza_Security2_Aes128CcmCiphertext_decode_ber; +der_type_encoder_f Vanetza_Security2_Aes128CcmCiphertext_encode_der; +xer_type_decoder_f Vanetza_Security2_Aes128CcmCiphertext_decode_xer; +xer_type_encoder_f Vanetza_Security2_Aes128CcmCiphertext_encode_xer; +jer_type_encoder_f Vanetza_Security2_Aes128CcmCiphertext_encode_jer; +oer_type_decoder_f Vanetza_Security2_Aes128CcmCiphertext_decode_oer; +oer_type_encoder_f Vanetza_Security2_Aes128CcmCiphertext_encode_oer; +per_type_decoder_f Vanetza_Security2_Aes128CcmCiphertext_decode_uper; +per_type_encoder_f Vanetza_Security2_Aes128CcmCiphertext_encode_uper; +per_type_decoder_f Vanetza_Security2_Aes128CcmCiphertext_decode_aper; +per_type_encoder_f Vanetza_Security2_Aes128CcmCiphertext_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Aes128CcmCiphertext_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AppExtension.c b/vanetza/asn1/security/r2/AppExtension.c new file mode 100644 index 000000000..d1f1389e2 --- /dev/null +++ b/vanetza/asn1/security/r2/AppExtension.c @@ -0,0 +1,259 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AppExtension.h" + +static const long asn_VAL_2_Vanetza_Security2_certExtId_OperatingOrganization = 1; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_SetCertExtensions_1_rows[] = { + { "&id", aioc__value, &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, &asn_VAL_2_Vanetza_Security2_certExtId_OperatingOrganization }, + { "&App", aioc__type, &asn_DEF_Vanetza_Security2_OperatingOrganizationId }, + { "&Issue", aioc__type, &asn_DEF_NULL }, + { "&Req", aioc__type, &asn_DEF_NULL } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_SetCertExtensions_1[] = { + { 1, 4, asn_IOS_Vanetza_Security2_SetCertExtensions_1_rows } +}; +static int +memb_Vanetza_Security2_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* 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_type_selector_result_t +select_AppExtension_Vanetza_Security2_content_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_Vanetza_Security2_SetCertExtensions_1; + size_t constraining_column = 0; /* &id */ + size_t for_column = 1; /* &App */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Vanetza_Security2_AppExtension, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_Vanetza_Security2_content_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_content_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AppExtension__content, choice.OperatingOrganizationId), + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), + 0, + &asn_DEF_Vanetza_Security2_OperatingOrganizationId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "OperatingOrganizationId" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_content_tag2el_3[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 } /* OperatingOrganizationId */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_content_specs_3 = { + sizeof(struct Vanetza_Security2_AppExtension__content), + offsetof(struct Vanetza_Security2_AppExtension__content, _asn_ctx), + offsetof(struct Vanetza_Security2_AppExtension__content, present), + sizeof(((struct Vanetza_Security2_AppExtension__content *)0)->present), + asn_MAP_Vanetza_Security2_content_tag2el_3, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_content_3 = { + "content", + "content", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_Vanetza_Security2_content_3, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_content_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AppExtension_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AppExtension, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_id_constraint_1 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AppExtension, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_content_3, + select_AppExtension_Vanetza_Security2_content_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_content_constraint_1 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AppExtension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AppExtension_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AppExtension_specs_1 = { + sizeof(struct Vanetza_Security2_AppExtension), + offsetof(struct Vanetza_Security2_AppExtension, _asn_ctx), + asn_MAP_Vanetza_Security2_AppExtension_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_Vanetza_Security2_AppExtension = { + "AppExtension", + "AppExtension", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AppExtension_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AppExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AppExtension_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AppExtension_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AppExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AppExtension_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AppExtension_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_AppExtension_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AppExtension.h b/vanetza/asn1/security/r2/AppExtension.h new file mode 100644 index 000000000..717ada595 --- /dev/null +++ b/vanetza/asn1/security/r2/AppExtension.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AppExtension_H_ +#define _Vanetza_Security2_AppExtension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2BaseTypes_ExtId.h" +#include "ANY.h" +#include "asn_ioc.h" +#include "OperatingOrganizationId.h" +#include "NULL.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AppExtension__content_PR { + Vanetza_Security2_AppExtension__content_PR_NOTHING, /* No components present */ + Vanetza_Security2_AppExtension__content_PR_OperatingOrganizationId +} Vanetza_Security2_AppExtension__content_PR; + +/* Vanetza_Security2_AppExtension */ +typedef struct Vanetza_Security2_AppExtension { + Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t id; + struct Vanetza_Security2_AppExtension__content { + Vanetza_Security2_AppExtension__content_PR present; + union Vanetza_Security2_AppExtension__Vanetza_Security2_content_u { + Vanetza_Security2_OperatingOrganizationId_t OperatingOrganizationId; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AppExtension_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AppExtension; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AppExtension_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AppExtension_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AppExtension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AprvBinaryTree.c b/vanetza/asn1/security/r2/AprvBinaryTree.c new file mode 100644 index 000000000..ea86de0f6 --- /dev/null +++ b/vanetza/asn1/security/r2/AprvBinaryTree.c @@ -0,0 +1,344 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AprvBinaryTree.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_nodeValueList_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1UL)) { + /* Perform validation of the inner elements */ + return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_nodeValueList_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_nodeValueList_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_nodeValueList_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_nodeValueList_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_nodeValueList_8[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_AcpcNodeValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_nodeValueList_tags_8[] = { + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_nodeValueList_specs_8 = { + sizeof(struct Vanetza_Security2_AprvBinaryTree__nodeValueList), + offsetof(struct Vanetza_Security2_AprvBinaryTree__nodeValueList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_nodeValueList_8 = { + "nodeValueList", + "nodeValueList", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_nodeValueList_tags_8, + sizeof(asn_DEF_Vanetza_Security2_nodeValueList_tags_8) + /sizeof(asn_DEF_Vanetza_Security2_nodeValueList_tags_8[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_nodeValueList_tags_8, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_nodeValueList_tags_8) + /sizeof(asn_DEF_Vanetza_Security2_nodeValueList_tags_8[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_nodeValueList_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_nodeValueList_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_nodeValueList_8, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_nodeValueList_specs_8 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AprvBinaryTree_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, currentI), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "currentI" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, acpcTreeId), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcpcTreeId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acpcTreeId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, hashAlgorithmId), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashAlgorithm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "hashAlgorithmId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, tree), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tree" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvBinaryTree, nodeValueList), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + 0, + &asn_DEF_Vanetza_Security2_nodeValueList_8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_nodeValueList_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_nodeValueList_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_nodeValueList_constraint_1 + }, + 0, 0, /* No default value */ + "nodeValueList" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AprvBinaryTree_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* currentI */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* acpcTreeId */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* hashAlgorithmId */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* tree */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* nodeValueList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AprvBinaryTree_specs_1 = { + sizeof(struct Vanetza_Security2_AprvBinaryTree), + offsetof(struct Vanetza_Security2_AprvBinaryTree, _asn_ctx), + asn_MAP_Vanetza_Security2_AprvBinaryTree_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AprvBinaryTree = { + "AprvBinaryTree", + "AprvBinaryTree", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AprvBinaryTree_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AprvBinaryTree_1, + 7, /* Elements count */ + &asn_SPC_Vanetza_Security2_AprvBinaryTree_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AprvBinaryTree.h b/vanetza/asn1/security/r2/AprvBinaryTree.h new file mode 100644 index 000000000..9d0922d03 --- /dev/null +++ b/vanetza/asn1/security/r2/AprvBinaryTree.h @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AprvBinaryTree_H_ +#define _Vanetza_Security2_AprvBinaryTree_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "IValue.h" +#include "AcpcTreeId.h" +#include "HashAlgorithm.h" +#include "BIT_STRING.h" +#include "AcpcNodeValue.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AprvBinaryTree */ +typedef struct Vanetza_Security2_AprvBinaryTree { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_IValue_t currentI; + Vanetza_Security2_AcpcTreeId_t acpcTreeId; + Vanetza_Security2_HashAlgorithm_t hashAlgorithmId; + BIT_STRING_t tree; + struct Vanetza_Security2_AprvBinaryTree__nodeValueList { + A_SEQUENCE_OF(Vanetza_Security2_AcpcNodeValue_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } nodeValueList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AprvBinaryTree_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AprvBinaryTree; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AprvBinaryTree_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AprvBinaryTree_1[7]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AprvBinaryTree_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AprvHashCalculationInput.c b/vanetza/asn1/security/r2/AprvHashCalculationInput.c new file mode 100644 index 000000000..a276ad0b3 --- /dev/null +++ b/vanetza/asn1/security/r2/AprvHashCalculationInput.c @@ -0,0 +1,231 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AprvHashCalculationInput.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_parentNodeValue_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_parentNodeValue_constr_6 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_parentNodeValue_constr_6 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_AprvHashCalculationInput_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvHashCalculationInput, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvHashCalculationInput, acpcTreeId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcpcTreeId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acpcTreeId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvHashCalculationInput, acpcPeriod), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acpcPeriod" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvHashCalculationInput, childNodeId), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "childNodeId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AprvHashCalculationInput, parentNodeValue), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_parentNodeValue_constr_6, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_parentNodeValue_constr_6, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_parentNodeValue_constraint_1 + }, + 0, 0, /* No default value */ + "parentNodeValue" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AprvHashCalculationInput_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* acpcTreeId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* acpcPeriod */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* childNodeId */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* parentNodeValue */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AprvHashCalculationInput_specs_1 = { + sizeof(struct Vanetza_Security2_AprvHashCalculationInput), + offsetof(struct Vanetza_Security2_AprvHashCalculationInput, _asn_ctx), + asn_MAP_Vanetza_Security2_AprvHashCalculationInput_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AprvHashCalculationInput = { + "AprvHashCalculationInput", + "AprvHashCalculationInput", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AprvHashCalculationInput_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AprvHashCalculationInput_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_AprvHashCalculationInput_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AprvHashCalculationInput.h b/vanetza/asn1/security/r2/AprvHashCalculationInput.h new file mode 100644 index 000000000..d2934273a --- /dev/null +++ b/vanetza/asn1/security/r2/AprvHashCalculationInput.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AprvHashCalculationInput_H_ +#define _Vanetza_Security2_AprvHashCalculationInput_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "AcpcTreeId.h" +#include "IValue.h" +#include "BIT_STRING.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AprvHashCalculationInput */ +typedef struct Vanetza_Security2_AprvHashCalculationInput { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_AcpcTreeId_t acpcTreeId; + Vanetza_Security2_IValue_t acpcPeriod; + BIT_STRING_t childNodeId; + OCTET_STRING_t parentNodeValue; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AprvHashCalculationInput_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AprvHashCalculationInput; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AprvHashCalculationInput_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AuthorizationResponseCode.c b/vanetza/asn1/security/r2/AuthorizationResponseCode.c new file mode 100644 index 000000000..e5b3bed82 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationResponseCode.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AuthorizationResponseCode.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AuthorizationResponseCode_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationResponseCode_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 5, 5, 0, 26 } /* (0..26,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_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_Vanetza_Security2_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) */ + 23, /* invalidsignature(23) */ + 2, /* its-aa-badcontenttype(2) */ + 1, /* its-aa-cantparse(1) */ + 5, /* its-aa-decryptionfailed(5) */ + 12, /* its-aa-deniedpermissions(12) */ + 3, /* its-aa-imnottherecipient(3) */ + 7, /* its-aa-incompleterequest(7) */ + 11, /* its-aa-invalidea(11) */ + 8, /* its-aa-invalidencryptionkey(8) */ + 6, /* its-aa-keysdontmatch(6) */ + 9, /* its-aa-outofsyncrequest(9) */ + 10, /* its-aa-unknownea(10) */ + 4, /* its-aa-unknownencryptionalgorithm(4) */ + 0, /* ok(0) */ + 22, /* unknownits(22) */ + 21 /* wrongea(21) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_AuthorizationResponseCode_specs_1 = { + asn_MAP_Vanetza_Security2_AuthorizationResponseCode_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_AuthorizationResponseCode_enum2value_1, /* N => "tag"; sorted by N */ + 27, /* Number of elements in the maps */ + 28, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationResponseCode = { + "AuthorizationResponseCode", + "AuthorizationResponseCode", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationResponseCode_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AuthorizationResponseCode_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AuthorizationResponseCode_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_AuthorizationResponseCode_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AuthorizationResponseCode.h b/vanetza/asn1/security/r2/AuthorizationResponseCode.h new file mode 100644 index 000000000..b665d2a4c --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationResponseCode.h @@ -0,0 +1,82 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AuthorizationResponseCode_H_ +#define _Vanetza_Security2_AuthorizationResponseCode_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AuthorizationResponseCode { + Vanetza_Security2_AuthorizationResponseCode_ok = 0, + Vanetza_Security2_AuthorizationResponseCode_its_aa_cantparse = 1, + Vanetza_Security2_AuthorizationResponseCode_its_aa_badcontenttype = 2, + Vanetza_Security2_AuthorizationResponseCode_its_aa_imnottherecipient = 3, + Vanetza_Security2_AuthorizationResponseCode_its_aa_unknownencryptionalgorithm = 4, + Vanetza_Security2_AuthorizationResponseCode_its_aa_decryptionfailed = 5, + Vanetza_Security2_AuthorizationResponseCode_its_aa_keysdontmatch = 6, + Vanetza_Security2_AuthorizationResponseCode_its_aa_incompleterequest = 7, + Vanetza_Security2_AuthorizationResponseCode_its_aa_invalidencryptionkey = 8, + Vanetza_Security2_AuthorizationResponseCode_its_aa_outofsyncrequest = 9, + Vanetza_Security2_AuthorizationResponseCode_its_aa_unknownea = 10, + Vanetza_Security2_AuthorizationResponseCode_its_aa_invalidea = 11, + Vanetza_Security2_AuthorizationResponseCode_its_aa_deniedpermissions = 12, + Vanetza_Security2_AuthorizationResponseCode_aa_ea_cantreachea = 13, + Vanetza_Security2_AuthorizationResponseCode_ea_aa_cantparse = 14, + Vanetza_Security2_AuthorizationResponseCode_ea_aa_badcontenttype = 15, + Vanetza_Security2_AuthorizationResponseCode_ea_aa_imnottherecipient = 16, + Vanetza_Security2_AuthorizationResponseCode_ea_aa_unknownencryptionalgorithm = 17, + Vanetza_Security2_AuthorizationResponseCode_ea_aa_decryptionfailed = 18, + Vanetza_Security2_AuthorizationResponseCode_invalidaa = 19, + Vanetza_Security2_AuthorizationResponseCode_invalidaasignature = 20, + Vanetza_Security2_AuthorizationResponseCode_wrongea = 21, + Vanetza_Security2_AuthorizationResponseCode_unknownits = 22, + Vanetza_Security2_AuthorizationResponseCode_invalidsignature = 23, + Vanetza_Security2_AuthorizationResponseCode_invalidencryptionkey = 24, + Vanetza_Security2_AuthorizationResponseCode_deniedpermissions = 25, + Vanetza_Security2_AuthorizationResponseCode_deniedtoomanycerts = 26 + /* + * Enumeration is extensible + */ +} e_Vanetza_Security2_AuthorizationResponseCode; + +/* Vanetza_Security2_AuthorizationResponseCode */ +typedef long Vanetza_Security2_AuthorizationResponseCode_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationResponseCode_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationResponseCode; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_AuthorizationResponseCode_specs_1; +asn_struct_free_f Vanetza_Security2_AuthorizationResponseCode_free; +asn_struct_print_f Vanetza_Security2_AuthorizationResponseCode_print; +asn_constr_check_f Vanetza_Security2_AuthorizationResponseCode_constraint; +ber_type_decoder_f Vanetza_Security2_AuthorizationResponseCode_decode_ber; +der_type_encoder_f Vanetza_Security2_AuthorizationResponseCode_encode_der; +xer_type_decoder_f Vanetza_Security2_AuthorizationResponseCode_decode_xer; +xer_type_encoder_f Vanetza_Security2_AuthorizationResponseCode_encode_xer; +jer_type_encoder_f Vanetza_Security2_AuthorizationResponseCode_encode_jer; +oer_type_decoder_f Vanetza_Security2_AuthorizationResponseCode_decode_oer; +oer_type_encoder_f Vanetza_Security2_AuthorizationResponseCode_encode_oer; +per_type_decoder_f Vanetza_Security2_AuthorizationResponseCode_decode_uper; +per_type_encoder_f Vanetza_Security2_AuthorizationResponseCode_encode_uper; +per_type_decoder_f Vanetza_Security2_AuthorizationResponseCode_decode_aper; +per_type_encoder_f Vanetza_Security2_AuthorizationResponseCode_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AuthorizationResponseCode_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AuthorizationValidationRequest.c b/vanetza/asn1/security/r2/AuthorizationValidationRequest.c new file mode 100644 index 000000000..0a09f8591 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationRequest.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation" + * found in "asn1/release2/TS102941v221/TypesAuthorizationValidation.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AuthorizationValidationRequest.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AuthorizationValidationRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AuthorizationValidationRequest, sharedAtRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SharedAtRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sharedAtRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AuthorizationValidationRequest, ecSignature), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcSignature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecSignature" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AuthorizationValidationRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sharedAtRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ecSignature */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AuthorizationValidationRequest_specs_1 = { + sizeof(struct Vanetza_Security2_AuthorizationValidationRequest), + offsetof(struct Vanetza_Security2_AuthorizationValidationRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_AuthorizationValidationRequest_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationRequest = { + "AuthorizationValidationRequest", + "AuthorizationValidationRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AuthorizationValidationRequest_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_AuthorizationValidationRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AuthorizationValidationRequest.h b/vanetza/asn1/security/r2/AuthorizationValidationRequest.h new file mode 100644 index 000000000..6ac6295b2 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation" + * found in "asn1/release2/TS102941v221/TypesAuthorizationValidation.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AuthorizationValidationRequest_H_ +#define _Vanetza_Security2_AuthorizationValidationRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SharedAtRequest.h" +#include "EcSignature.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AuthorizationValidationRequest */ +typedef struct Vanetza_Security2_AuthorizationValidationRequest { + Vanetza_Security2_SharedAtRequest_t sharedAtRequest; + Vanetza_Security2_EcSignature_t ecSignature; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AuthorizationValidationRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AuthorizationValidationRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AuthorizationValidationRequest_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AuthorizationValidationRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AuthorizationValidationRequestMessage.c b/vanetza/asn1/security/r2/AuthorizationValidationRequestMessage.c new file mode 100644 index 000000000..9c51d7be7 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AuthorizationValidationRequestMessage.h" + +int +Vanetza_Security2_AuthorizationValidationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AuthorizationValidationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationValidationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage = { + "AuthorizationValidationRequestMessage", + "AuthorizationValidationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AuthorizationValidationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AuthorizationValidationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AuthorizationValidationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AuthorizationValidationRequestMessage.h b/vanetza/asn1/security/r2/AuthorizationValidationRequestMessage.h new file mode 100644 index 000000000..85d8c89fa --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AuthorizationValidationRequestMessage_H_ +#define _Vanetza_Security2_AuthorizationValidationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AuthorizationValidationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_AuthorizationValidationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationRequestMessage; +asn_struct_free_f Vanetza_Security2_AuthorizationValidationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_AuthorizationValidationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_AuthorizationValidationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_AuthorizationValidationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AuthorizationValidationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AuthorizationValidationResponse.c b/vanetza/asn1/security/r2/AuthorizationValidationResponse.c new file mode 100644 index 000000000..dd33e9cf1 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationResponse.c @@ -0,0 +1,197 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation" + * found in "asn1/release2/TS102941v221/TypesAuthorizationValidation.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AuthorizationValidationResponse.h" + +static int +memb_Vanetza_Security2_requestHash_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_confirmedSubjectAttributes_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_requestHash_constr_2 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_requestHash_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_confirmedSubjectAttributes_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_confirmedSubjectAttributes_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AuthorizationValidationResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationValidationResponse_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_AuthorizationValidationResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AuthorizationValidationResponse, requestHash), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_requestHash_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_requestHash_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_requestHash_constraint_1 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_AuthorizationValidationResponse, responseCode), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "responseCode" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_AuthorizationValidationResponse, confirmedSubjectAttributes), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateSubjectAttributes, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_confirmedSubjectAttributes_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_confirmedSubjectAttributes_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_confirmedSubjectAttributes_constraint_1 + }, + 0, 0, /* No default value */ + "confirmedSubjectAttributes" + }, +}; +static const int asn_MAP_Vanetza_Security2_AuthorizationValidationResponse_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_AuthorizationValidationResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* responseCode */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* confirmedSubjectAttributes */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AuthorizationValidationResponse_specs_1 = { + sizeof(struct Vanetza_Security2_AuthorizationValidationResponse), + offsetof(struct Vanetza_Security2_AuthorizationValidationResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_AuthorizationValidationResponse_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_AuthorizationValidationResponse_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponse = { + "AuthorizationValidationResponse", + "AuthorizationValidationResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AuthorizationValidationResponse_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AuthorizationValidationResponse_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_AuthorizationValidationResponse_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_AuthorizationValidationResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AuthorizationValidationResponse.h b/vanetza/asn1/security/r2/AuthorizationValidationResponse.h new file mode 100644 index 000000000..114a0d83a --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationResponse.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation" + * found in "asn1/release2/TS102941v221/TypesAuthorizationValidation.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AuthorizationValidationResponse_H_ +#define _Vanetza_Security2_AuthorizationValidationResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "AuthorizationValidationResponseCode.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CertificateSubjectAttributes; + +/* Vanetza_Security2_AuthorizationValidationResponse */ +typedef struct Vanetza_Security2_AuthorizationValidationResponse { + OCTET_STRING_t requestHash; + Vanetza_Security2_AuthorizationValidationResponseCode_t responseCode; + struct Vanetza_Security2_CertificateSubjectAttributes *confirmedSubjectAttributes; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_AuthorizationValidationResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_AuthorizationValidationResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_AuthorizationValidationResponse_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationValidationResponse_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CertificateSubjectAttributes.h" + +#endif /* _Vanetza_Security2_AuthorizationValidationResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AuthorizationValidationResponseCode.c b/vanetza/asn1/security/r2/AuthorizationValidationResponseCode.c new file mode 100644 index 000000000..cf105e0e1 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationResponseCode.c @@ -0,0 +1,99 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation" + * found in "asn1/release2/TS102941v221/TypesAuthorizationValidation.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AuthorizationValidationResponseCode.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AuthorizationValidationResponseCode_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationValidationResponseCode_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 14 } /* (0..14,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_AuthorizationValidationResponseCode_value2enum_1[] = { + { 0, 2, "ok" }, + { 1, 9, "cantparse" }, + { 2, 14, "badcontenttype" }, + { 3, 17, "imnottherecipient" }, + { 4, 26, "unknownencryptionalgorithm" }, + { 5, 16, "decryptionfailed" }, + { 6, 9, "invalidaa" }, + { 7, 18, "invalidaasignature" }, + { 8, 7, "wrongea" }, + { 9, 10, "unknownits" }, + { 10, 16, "invalidsignature" }, + { 11, 20, "invalidencryptionkey" }, + { 12, 17, "deniedpermissions" }, + { 13, 18, "deniedtoomanycerts" }, + { 14, 13, "deniedrequest" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_Vanetza_Security2_AuthorizationValidationResponseCode_enum2value_1[] = { + 2, /* badcontenttype(2) */ + 1, /* cantparse(1) */ + 5, /* decryptionfailed(5) */ + 12, /* deniedpermissions(12) */ + 14, /* deniedrequest(14) */ + 13, /* deniedtoomanycerts(13) */ + 3, /* imnottherecipient(3) */ + 6, /* invalidaa(6) */ + 7, /* invalidaasignature(7) */ + 11, /* invalidencryptionkey(11) */ + 10, /* invalidsignature(10) */ + 0, /* ok(0) */ + 4, /* unknownencryptionalgorithm(4) */ + 9, /* unknownits(9) */ + 8 /* wrongea(8) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_AuthorizationValidationResponseCode_specs_1 = { + asn_MAP_Vanetza_Security2_AuthorizationValidationResponseCode_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_AuthorizationValidationResponseCode_enum2value_1, /* N => "tag"; sorted by N */ + 15, /* Number of elements in the maps */ + 16, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode = { + "AuthorizationValidationResponseCode", + "AuthorizationValidationResponseCode", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AuthorizationValidationResponseCode_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AuthorizationValidationResponseCode_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_AuthorizationValidationResponseCode_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AuthorizationValidationResponseCode.h b/vanetza/asn1/security/r2/AuthorizationValidationResponseCode.h new file mode 100644 index 000000000..42c9d4734 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationResponseCode.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorizationValidation" + * found in "asn1/release2/TS102941v221/TypesAuthorizationValidation.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AuthorizationValidationResponseCode_H_ +#define _Vanetza_Security2_AuthorizationValidationResponseCode_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_AuthorizationValidationResponseCode { + Vanetza_Security2_AuthorizationValidationResponseCode_ok = 0, + Vanetza_Security2_AuthorizationValidationResponseCode_cantparse = 1, + Vanetza_Security2_AuthorizationValidationResponseCode_badcontenttype = 2, + Vanetza_Security2_AuthorizationValidationResponseCode_imnottherecipient = 3, + Vanetza_Security2_AuthorizationValidationResponseCode_unknownencryptionalgorithm = 4, + Vanetza_Security2_AuthorizationValidationResponseCode_decryptionfailed = 5, + Vanetza_Security2_AuthorizationValidationResponseCode_invalidaa = 6, + Vanetza_Security2_AuthorizationValidationResponseCode_invalidaasignature = 7, + Vanetza_Security2_AuthorizationValidationResponseCode_wrongea = 8, + Vanetza_Security2_AuthorizationValidationResponseCode_unknownits = 9, + Vanetza_Security2_AuthorizationValidationResponseCode_invalidsignature = 10, + Vanetza_Security2_AuthorizationValidationResponseCode_invalidencryptionkey = 11, + Vanetza_Security2_AuthorizationValidationResponseCode_deniedpermissions = 12, + Vanetza_Security2_AuthorizationValidationResponseCode_deniedtoomanycerts = 13, + Vanetza_Security2_AuthorizationValidationResponseCode_deniedrequest = 14 + /* + * Enumeration is extensible + */ +} e_Vanetza_Security2_AuthorizationValidationResponseCode; + +/* Vanetza_Security2_AuthorizationValidationResponseCode */ +typedef long Vanetza_Security2_AuthorizationValidationResponseCode_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationValidationResponseCode_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponseCode; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_AuthorizationValidationResponseCode_specs_1; +asn_struct_free_f Vanetza_Security2_AuthorizationValidationResponseCode_free; +asn_struct_print_f Vanetza_Security2_AuthorizationValidationResponseCode_print; +asn_constr_check_f Vanetza_Security2_AuthorizationValidationResponseCode_constraint; +ber_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseCode_decode_ber; +der_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseCode_encode_der; +xer_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseCode_decode_xer; +xer_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseCode_encode_xer; +jer_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseCode_encode_jer; +oer_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseCode_decode_oer; +oer_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseCode_encode_oer; +per_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseCode_decode_uper; +per_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseCode_encode_uper; +per_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseCode_decode_aper; +per_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseCode_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AuthorizationValidationResponseCode_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/AuthorizationValidationResponseMessage.c b/vanetza/asn1/security/r2/AuthorizationValidationResponseMessage.c new file mode 100644 index 000000000..86d7b41cf --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "AuthorizationValidationResponseMessage.h" + +int +Vanetza_Security2_AuthorizationValidationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_AuthorizationValidationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_AuthorizationValidationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage = { + "AuthorizationValidationResponseMessage", + "AuthorizationValidationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_AuthorizationValidationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_AuthorizationValidationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_AuthorizationValidationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/AuthorizationValidationResponseMessage.h b/vanetza/asn1/security/r2/AuthorizationValidationResponseMessage.h new file mode 100644 index 000000000..6de32e244 --- /dev/null +++ b/vanetza/asn1/security/r2/AuthorizationValidationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_AuthorizationValidationResponseMessage_H_ +#define _Vanetza_Security2_AuthorizationValidationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_AuthorizationValidationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_AuthorizationValidationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_AuthorizationValidationResponseMessage; +asn_struct_free_f Vanetza_Security2_AuthorizationValidationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_AuthorizationValidationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_AuthorizationValidationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_AuthorizationValidationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_AuthorizationValidationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/BasePublicEncryptionKey.c b/vanetza/asn1/security/r2/BasePublicEncryptionKey.c new file mode 100644 index 000000000..8fbff75a5 --- /dev/null +++ b/vanetza/asn1/security/r2/BasePublicEncryptionKey.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "BasePublicEncryptionKey.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_BasePublicEncryptionKey_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_BasePublicEncryptionKey_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_BasePublicEncryptionKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_BasePublicEncryptionKey, choice.eciesNistP256), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eciesNistP256" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_BasePublicEncryptionKey, choice.eciesBrainpoolP256r1), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eciesBrainpoolP256r1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_BasePublicEncryptionKey, choice.ecencSm2), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecencSm2" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_BasePublicEncryptionKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eciesNistP256 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eciesBrainpoolP256r1 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ecencSm2 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_BasePublicEncryptionKey_specs_1 = { + sizeof(struct Vanetza_Security2_BasePublicEncryptionKey), + offsetof(struct Vanetza_Security2_BasePublicEncryptionKey, _asn_ctx), + offsetof(struct Vanetza_Security2_BasePublicEncryptionKey, present), + sizeof(((struct Vanetza_Security2_BasePublicEncryptionKey *)0)->present), + asn_MAP_Vanetza_Security2_BasePublicEncryptionKey_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BasePublicEncryptionKey = { + "BasePublicEncryptionKey", + "BasePublicEncryptionKey", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_BasePublicEncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_BasePublicEncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_BasePublicEncryptionKey_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_BasePublicEncryptionKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/BasePublicEncryptionKey.h b/vanetza/asn1/security/r2/BasePublicEncryptionKey.h new file mode 100644 index 000000000..5538c3ff3 --- /dev/null +++ b/vanetza/asn1/security/r2/BasePublicEncryptionKey.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_BasePublicEncryptionKey_H_ +#define _Vanetza_Security2_BasePublicEncryptionKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP256CurvePoint.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_BasePublicEncryptionKey_PR { + Vanetza_Security2_BasePublicEncryptionKey_PR_NOTHING, /* No components present */ + Vanetza_Security2_BasePublicEncryptionKey_PR_eciesNistP256, + Vanetza_Security2_BasePublicEncryptionKey_PR_eciesBrainpoolP256r1, + /* Extensions may appear below */ + Vanetza_Security2_BasePublicEncryptionKey_PR_ecencSm2 +} Vanetza_Security2_BasePublicEncryptionKey_PR; + +/* Vanetza_Security2_BasePublicEncryptionKey */ +typedef struct Vanetza_Security2_BasePublicEncryptionKey { + Vanetza_Security2_BasePublicEncryptionKey_PR present; + union Vanetza_Security2_BasePublicEncryptionKey_u { + Vanetza_Security2_EccP256CurvePoint_t eciesNistP256; + Vanetza_Security2_EccP256CurvePoint_t eciesBrainpoolP256r1; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_EccP256CurvePoint_t ecencSm2; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_BasePublicEncryptionKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BasePublicEncryptionKey; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_BasePublicEncryptionKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_BasePublicEncryptionKey_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_BasePublicEncryptionKey_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_BasePublicEncryptionKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/BitmapSsp.c b/vanetza/asn1/security/r2/BitmapSsp.c new file mode 100644 index 000000000..7a510597a --- /dev/null +++ b/vanetza/asn1/security/r2/BitmapSsp.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "BitmapSsp.h" + +int +Vanetza_Security2_BitmapSsp_constraint(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 <= 31UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_BitmapSsp_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..31)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_BitmapSsp_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 0, 31 } /* (SIZE(0..31)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_BitmapSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BitmapSsp = { + "BitmapSsp", + "BitmapSsp", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_BitmapSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_BitmapSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_BitmapSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_BitmapSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_BitmapSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_BitmapSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_BitmapSsp_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_BitmapSsp_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_BitmapSsp_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/BitmapSsp.h b/vanetza/asn1/security/r2/BitmapSsp.h new file mode 100644 index 000000000..b28b9b1d7 --- /dev/null +++ b/vanetza/asn1/security/r2/BitmapSsp.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_BitmapSsp_H_ +#define _Vanetza_Security2_BitmapSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_BitmapSsp */ +typedef OCTET_STRING_t Vanetza_Security2_BitmapSsp_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_BitmapSsp_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BitmapSsp; +asn_struct_free_f Vanetza_Security2_BitmapSsp_free; +asn_struct_print_f Vanetza_Security2_BitmapSsp_print; +asn_constr_check_f Vanetza_Security2_BitmapSsp_constraint; +ber_type_decoder_f Vanetza_Security2_BitmapSsp_decode_ber; +der_type_encoder_f Vanetza_Security2_BitmapSsp_encode_der; +xer_type_decoder_f Vanetza_Security2_BitmapSsp_decode_xer; +xer_type_encoder_f Vanetza_Security2_BitmapSsp_encode_xer; +jer_type_encoder_f Vanetza_Security2_BitmapSsp_encode_jer; +oer_type_decoder_f Vanetza_Security2_BitmapSsp_decode_oer; +oer_type_encoder_f Vanetza_Security2_BitmapSsp_encode_oer; +per_type_decoder_f Vanetza_Security2_BitmapSsp_decode_uper; +per_type_encoder_f Vanetza_Security2_BitmapSsp_encode_uper; +per_type_decoder_f Vanetza_Security2_BitmapSsp_decode_aper; +per_type_encoder_f Vanetza_Security2_BitmapSsp_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_BitmapSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/BitmapSspRange.c b/vanetza/asn1/security/r2/BitmapSspRange.c new file mode 100644 index 000000000..aa4aa4661 --- /dev/null +++ b/vanetza/asn1/security/r2/BitmapSspRange.c @@ -0,0 +1,169 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "BitmapSspRange.h" + +static int +memb_Vanetza_Security2_sspValue_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 >= 1UL && size <= 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_sspBitmask_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 >= 1UL && size <= 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_sspValue_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_sspValue_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_sspBitmask_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_sspBitmask_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_BitmapSspRange_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_BitmapSspRange, sspValue), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_sspValue_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_sspValue_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_sspValue_constraint_1 + }, + 0, 0, /* No default value */ + "sspValue" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_BitmapSspRange, sspBitmask), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_sspBitmask_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_sspBitmask_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_sspBitmask_constraint_1 + }, + 0, 0, /* No default value */ + "sspBitmask" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_BitmapSspRange_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sspValue */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sspBitmask */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_BitmapSspRange_specs_1 = { + sizeof(struct Vanetza_Security2_BitmapSspRange), + offsetof(struct Vanetza_Security2_BitmapSspRange, _asn_ctx), + asn_MAP_Vanetza_Security2_BitmapSspRange_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_Vanetza_Security2_BitmapSspRange = { + "BitmapSspRange", + "BitmapSspRange", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1, + sizeof(asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_BitmapSspRange_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_BitmapSspRange_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_BitmapSspRange_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/BitmapSspRange.h b/vanetza/asn1/security/r2/BitmapSspRange.h new file mode 100644 index 000000000..95e051ae0 --- /dev/null +++ b/vanetza/asn1/security/r2/BitmapSspRange.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_BitmapSspRange_H_ +#define _Vanetza_Security2_BitmapSspRange_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_BitmapSspRange */ +typedef struct Vanetza_Security2_BitmapSspRange { + OCTET_STRING_t sspValue; + OCTET_STRING_t sspBitmask; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_BitmapSspRange_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BitmapSspRange; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_BitmapSspRange_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_BitmapSspRange_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_BitmapSspRange_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/BlindedKey.c b/vanetza/asn1/security/r2/BlindedKey.c new file mode 100644 index 000000000..6b1c88f76 --- /dev/null +++ b/vanetza/asn1/security/r2/BlindedKey.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "BlindedKey.h" + +/* + * This type is implemented using Vanetza_Security2_EccP256CurvePoint, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_BlindedKey_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_BlindedKey_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BlindedKey = { + "BlindedKey", + "BlindedKey", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EccP256CurvePoint_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_EccP256CurvePoint_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/BlindedKey.h b/vanetza/asn1/security/r2/BlindedKey.h new file mode 100644 index 000000000..dc4e806ba --- /dev/null +++ b/vanetza/asn1/security/r2/BlindedKey.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_BlindedKey_H_ +#define _Vanetza_Security2_BlindedKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP256CurvePoint.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_BlindedKey */ +typedef Vanetza_Security2_EccP256CurvePoint_t Vanetza_Security2_BlindedKey_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_BlindedKey_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_BlindedKey; +asn_struct_free_f Vanetza_Security2_BlindedKey_free; +asn_struct_print_f Vanetza_Security2_BlindedKey_print; +asn_constr_check_f Vanetza_Security2_BlindedKey_constraint; +ber_type_decoder_f Vanetza_Security2_BlindedKey_decode_ber; +der_type_encoder_f Vanetza_Security2_BlindedKey_encode_der; +xer_type_decoder_f Vanetza_Security2_BlindedKey_decode_xer; +xer_type_encoder_f Vanetza_Security2_BlindedKey_encode_xer; +jer_type_encoder_f Vanetza_Security2_BlindedKey_encode_jer; +oer_type_decoder_f Vanetza_Security2_BlindedKey_decode_oer; +oer_type_encoder_f Vanetza_Security2_BlindedKey_encode_oer; +per_type_decoder_f Vanetza_Security2_BlindedKey_decode_uper; +per_type_encoder_f Vanetza_Security2_BlindedKey_encode_uper; +per_type_decoder_f Vanetza_Security2_BlindedKey_decode_aper; +per_type_encoder_f Vanetza_Security2_BlindedKey_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_BlindedKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ButterflyCertRequestMessage.c b/vanetza/asn1/security/r2/ButterflyCertRequestMessage.c new file mode 100644 index 000000000..809dd95d7 --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyCertRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ButterflyCertRequestMessage.h" + +int +Vanetza_Security2_ButterflyCertRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ButterflyCertRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ButterflyCertRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage = { + "ButterflyCertRequestMessage", + "ButterflyCertRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ButterflyCertRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ButterflyCertRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ButterflyCertRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ButterflyCertRequestMessage.h b/vanetza/asn1/security/r2/ButterflyCertRequestMessage.h new file mode 100644 index 000000000..a5e2f571e --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyCertRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ButterflyCertRequestMessage_H_ +#define _Vanetza_Security2_ButterflyCertRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ButterflyCertRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_ButterflyCertRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyCertRequestMessage; +asn_struct_free_f Vanetza_Security2_ButterflyCertRequestMessage_free; +asn_struct_print_f Vanetza_Security2_ButterflyCertRequestMessage_print; +asn_constr_check_f Vanetza_Security2_ButterflyCertRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_ButterflyCertRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_ButterflyCertRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_ButterflyCertRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_ButterflyCertRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_ButterflyCertRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_ButterflyCertRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_ButterflyCertRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_ButterflyCertRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_ButterflyCertRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_ButterflyCertRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_ButterflyCertRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ButterflyCertRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ButterflyCertResponseMessage.c b/vanetza/asn1/security/r2/ButterflyCertResponseMessage.c new file mode 100644 index 000000000..7256a1ca2 --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyCertResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ButterflyCertResponseMessage.h" + +int +Vanetza_Security2_ButterflyCertResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ButterflyCertResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ButterflyCertResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage = { + "ButterflyCertResponseMessage", + "ButterflyCertResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ButterflyCertResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ButterflyCertResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ButterflyCertResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ButterflyCertResponseMessage.h b/vanetza/asn1/security/r2/ButterflyCertResponseMessage.h new file mode 100644 index 000000000..642095960 --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyCertResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ButterflyCertResponseMessage_H_ +#define _Vanetza_Security2_ButterflyCertResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ButterflyCertResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_ButterflyCertResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyCertResponseMessage; +asn_struct_free_f Vanetza_Security2_ButterflyCertResponseMessage_free; +asn_struct_print_f Vanetza_Security2_ButterflyCertResponseMessage_print; +asn_constr_check_f Vanetza_Security2_ButterflyCertResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_ButterflyCertResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_ButterflyCertResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_ButterflyCertResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_ButterflyCertResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_ButterflyCertResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_ButterflyCertResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_ButterflyCertResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_ButterflyCertResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_ButterflyCertResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_ButterflyCertResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_ButterflyCertResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ButterflyCertResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ButterflyExpansion.c b/vanetza/asn1/security/r2/ButterflyExpansion.c new file mode 100644 index 000000000..fbfa89b00 --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyExpansion.c @@ -0,0 +1,119 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ButterflyExpansion.h" + +static int +memb_Vanetza_Security2_aes128_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_aes128_constr_2 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_aes128_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ButterflyExpansion_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ButterflyExpansion_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ButterflyExpansion_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ButterflyExpansion, choice.aes128), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_aes128_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_aes128_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_aes128_constraint_1 + }, + 0, 0, /* No default value */ + "aes128" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ButterflyExpansion_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* aes128 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_ButterflyExpansion_specs_1 = { + sizeof(struct Vanetza_Security2_ButterflyExpansion), + offsetof(struct Vanetza_Security2_ButterflyExpansion, _asn_ctx), + offsetof(struct Vanetza_Security2_ButterflyExpansion, present), + sizeof(((struct Vanetza_Security2_ButterflyExpansion *)0)->present), + asn_MAP_Vanetza_Security2_ButterflyExpansion_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyExpansion = { + "ButterflyExpansion", + "ButterflyExpansion", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ButterflyExpansion_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ButterflyExpansion_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_ButterflyExpansion_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_ButterflyExpansion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ButterflyExpansion.h b/vanetza/asn1/security/r2/ButterflyExpansion.h new file mode 100644 index 000000000..82df433c8 --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyExpansion.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ButterflyExpansion_H_ +#define _Vanetza_Security2_ButterflyExpansion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_ButterflyExpansion_PR { + Vanetza_Security2_ButterflyExpansion_PR_NOTHING, /* No components present */ + Vanetza_Security2_ButterflyExpansion_PR_aes128 + /* Extensions may appear below */ + +} Vanetza_Security2_ButterflyExpansion_PR; + +/* Vanetza_Security2_ButterflyExpansion */ +typedef struct Vanetza_Security2_ButterflyExpansion { + Vanetza_Security2_ButterflyExpansion_PR present; + union Vanetza_Security2_ButterflyExpansion_u { + OCTET_STRING_t aes128; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ButterflyExpansion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyExpansion; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_ButterflyExpansion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ButterflyExpansion_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ButterflyExpansion_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ButterflyExpansion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ButterflyParamsOriginal.c b/vanetza/asn1/security/r2/ButterflyParamsOriginal.c new file mode 100644 index 000000000..93f09b033 --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyParamsOriginal.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ButterflyParamsOriginal.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ButterflyParamsOriginal_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ButterflyParamsOriginal, signingExpansion), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ButterflyExpansion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signingExpansion" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ButterflyParamsOriginal, encryptionKey), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptionKey" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ButterflyParamsOriginal, encryptionExpansion), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ButterflyExpansion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptionExpansion" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ButterflyParamsOriginal_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* signingExpansion */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* encryptionKey */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* encryptionExpansion */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ButterflyParamsOriginal_specs_1 = { + sizeof(struct Vanetza_Security2_ButterflyParamsOriginal), + offsetof(struct Vanetza_Security2_ButterflyParamsOriginal, _asn_ctx), + asn_MAP_Vanetza_Security2_ButterflyParamsOriginal_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyParamsOriginal = { + "ButterflyParamsOriginal", + "ButterflyParamsOriginal", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ButterflyParamsOriginal_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ButterflyParamsOriginal_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_ButterflyParamsOriginal_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ButterflyParamsOriginal.h b/vanetza/asn1/security/r2/ButterflyParamsOriginal.h new file mode 100644 index 000000000..05667d65a --- /dev/null +++ b/vanetza/asn1/security/r2/ButterflyParamsOriginal.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ButterflyParamsOriginal_H_ +#define _Vanetza_Security2_ButterflyParamsOriginal_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ButterflyExpansion.h" +#include "PublicEncryptionKey.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ButterflyParamsOriginal */ +typedef struct Vanetza_Security2_ButterflyParamsOriginal { + Vanetza_Security2_ButterflyExpansion_t signingExpansion; + Vanetza_Security2_PublicEncryptionKey_t encryptionKey; + Vanetza_Security2_ButterflyExpansion_t encryptionExpansion; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ButterflyParamsOriginal_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ButterflyParamsOriginal; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ButterflyParamsOriginal_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ButterflyParamsOriginal_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ButterflyParamsOriginal_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CaCertificateRekeyingMessage.c b/vanetza/asn1/security/r2/CaCertificateRekeyingMessage.c new file mode 100644 index 000000000..c0ccfbad6 --- /dev/null +++ b/vanetza/asn1/security/r2/CaCertificateRekeyingMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CaCertificateRekeyingMessage.h" + +int +Vanetza_Security2_CaCertificateRekeyingMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CaCertificateRekeyingMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CaCertificateRekeyingMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage = { + "CaCertificateRekeyingMessage", + "CaCertificateRekeyingMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CaCertificateRekeyingMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CaCertificateRekeyingMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CaCertificateRekeyingMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CaCertificateRekeyingMessage.h b/vanetza/asn1/security/r2/CaCertificateRekeyingMessage.h new file mode 100644 index 000000000..d4f718584 --- /dev/null +++ b/vanetza/asn1/security/r2/CaCertificateRekeyingMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CaCertificateRekeyingMessage_H_ +#define _Vanetza_Security2_CaCertificateRekeyingMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CaCertificateRekeyingMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P1_t Vanetza_Security2_CaCertificateRekeyingMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CaCertificateRekeyingMessage; +asn_struct_free_f Vanetza_Security2_CaCertificateRekeyingMessage_free; +asn_struct_print_f Vanetza_Security2_CaCertificateRekeyingMessage_print; +asn_constr_check_f Vanetza_Security2_CaCertificateRekeyingMessage_constraint; +ber_type_decoder_f Vanetza_Security2_CaCertificateRekeyingMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_CaCertificateRekeyingMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_CaCertificateRekeyingMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_CaCertificateRekeyingMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_CaCertificateRekeyingMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_CaCertificateRekeyingMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_CaCertificateRekeyingMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_CaCertificateRekeyingMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_CaCertificateRekeyingMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_CaCertificateRekeyingMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_CaCertificateRekeyingMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CaCertificateRekeyingMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CaCertificateRequest.c b/vanetza/asn1/security/r2/CaCertificateRequest.c new file mode 100644 index 000000000..3846494a5 --- /dev/null +++ b/vanetza/asn1/security/r2/CaCertificateRequest.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesCaManagement" + * found in "asn1/release2/TS102941v221/TypesCaManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CaCertificateRequest.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CaCertificateRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CaCertificateRequest, publicKeys), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicKeys, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "publicKeys" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CaCertificateRequest, requestedSubjectAttributes), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateSubjectAttributes, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestedSubjectAttributes" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CaCertificateRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* publicKeys */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* requestedSubjectAttributes */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CaCertificateRequest_specs_1 = { + sizeof(struct Vanetza_Security2_CaCertificateRequest), + offsetof(struct Vanetza_Security2_CaCertificateRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_CaCertificateRequest_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CaCertificateRequest = { + "CaCertificateRequest", + "CaCertificateRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CaCertificateRequest_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CaCertificateRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CaCertificateRequest.h b/vanetza/asn1/security/r2/CaCertificateRequest.h new file mode 100644 index 000000000..c63b45fac --- /dev/null +++ b/vanetza/asn1/security/r2/CaCertificateRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesCaManagement" + * found in "asn1/release2/TS102941v221/TypesCaManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CaCertificateRequest_H_ +#define _Vanetza_Security2_CaCertificateRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PublicKeys.h" +#include "CertificateSubjectAttributes.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CaCertificateRequest */ +typedef struct Vanetza_Security2_CaCertificateRequest { + Vanetza_Security2_PublicKeys_t publicKeys; + Vanetza_Security2_CertificateSubjectAttributes_t requestedSubjectAttributes; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CaCertificateRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CaCertificateRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CaCertificateRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CaCertificateRequest_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CaCertificateRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CaCertificateRequestMessage.c b/vanetza/asn1/security/r2/CaCertificateRequestMessage.c new file mode 100644 index 000000000..f0a972210 --- /dev/null +++ b/vanetza/asn1/security/r2/CaCertificateRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CaCertificateRequestMessage.h" + +int +Vanetza_Security2_CaCertificateRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CaCertificateRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CaCertificateRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CaCertificateRequestMessage = { + "CaCertificateRequestMessage", + "CaCertificateRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CaCertificateRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CaCertificateRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CaCertificateRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CaCertificateRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CaCertificateRequestMessage.h b/vanetza/asn1/security/r2/CaCertificateRequestMessage.h new file mode 100644 index 000000000..b298cd8ad --- /dev/null +++ b/vanetza/asn1/security/r2/CaCertificateRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CaCertificateRequestMessage_H_ +#define _Vanetza_Security2_CaCertificateRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CaCertificateRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_CaCertificateRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CaCertificateRequestMessage; +asn_struct_free_f Vanetza_Security2_CaCertificateRequestMessage_free; +asn_struct_print_f Vanetza_Security2_CaCertificateRequestMessage_print; +asn_constr_check_f Vanetza_Security2_CaCertificateRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_CaCertificateRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_CaCertificateRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_CaCertificateRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_CaCertificateRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_CaCertificateRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_CaCertificateRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_CaCertificateRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_CaCertificateRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_CaCertificateRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_CaCertificateRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_CaCertificateRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CaCertificateRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CamRaBatchResponse.c b/vanetza/asn1/security/r2/CamRaBatchResponse.c new file mode 100644 index 000000000..ee8b6f31e --- /dev/null +++ b/vanetza/asn1/security/r2/CamRaBatchResponse.c @@ -0,0 +1,210 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CamRaBatchResponse.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_batch_4[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Vanetza_Security2_BlindedKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_batch_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_batch_specs_4 = { + sizeof(struct Vanetza_Security2_CamRaBatchResponse__batch), + offsetof(struct Vanetza_Security2_CamRaBatchResponse__batch, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_batch_4 = { + "batch", + "batch", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_batch_tags_4, + sizeof(asn_DEF_Vanetza_Security2_batch_tags_4) + /sizeof(asn_DEF_Vanetza_Security2_batch_tags_4[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_batch_tags_4, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_batch_tags_4) + /sizeof(asn_DEF_Vanetza_Security2_batch_tags_4[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_batch_4, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_batch_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CamRaBatchResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CamRaBatchResponse, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CamRaBatchResponse, requestHash), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CamRaBatchResponse, batch), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_Vanetza_Security2_batch_4, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "batch" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CamRaBatchResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* batch */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CamRaBatchResponse_specs_1 = { + sizeof(struct Vanetza_Security2_CamRaBatchResponse), + offsetof(struct Vanetza_Security2_CamRaBatchResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_CamRaBatchResponse_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CamRaBatchResponse = { + "CamRaBatchResponse", + "CamRaBatchResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CamRaBatchResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CamRaBatchResponse_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_CamRaBatchResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CamRaBatchResponse.h b/vanetza/asn1/security/r2/CamRaBatchResponse.h new file mode 100644 index 000000000..b385d945b --- /dev/null +++ b/vanetza/asn1/security/r2/CamRaBatchResponse.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CamRaBatchResponse_H_ +#define _Vanetza_Security2_CamRaBatchResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "HashedId8.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_BlindedKey; + +/* Vanetza_Security2_CamRaBatchResponse */ +typedef struct Vanetza_Security2_CamRaBatchResponse { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_HashedId8_t requestHash; + struct Vanetza_Security2_CamRaBatchResponse__batch { + A_SEQUENCE_OF(struct Vanetza_Security2_BlindedKey) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } batch; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CamRaBatchResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CamRaBatchResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CamRaBatchResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CamRaBatchResponse_1[3]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "BlindedKey.h" + +#endif /* _Vanetza_Security2_CamRaBatchResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CamRaInterfacePdu.c b/vanetza/asn1/security/r2/CamRaInterfacePdu.c new file mode 100644 index 000000000..b126890da --- /dev/null +++ b/vanetza/asn1/security/r2/CamRaInterfacePdu.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CamRaInterfacePdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CamRaInterfacePdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CamRaInterfacePdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_CamRaInterfacePdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CamRaInterfacePdu, choice.raCamBatchRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaCamBatchRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "raCamBatchRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CamRaInterfacePdu, choice.camRaBatchResponse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CamRaBatchResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "camRaBatchResponse" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CamRaInterfacePdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* raCamBatchRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* camRaBatchResponse */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CamRaInterfacePdu_specs_1 = { + sizeof(struct Vanetza_Security2_CamRaInterfacePdu), + offsetof(struct Vanetza_Security2_CamRaInterfacePdu, _asn_ctx), + offsetof(struct Vanetza_Security2_CamRaInterfacePdu, present), + sizeof(((struct Vanetza_Security2_CamRaInterfacePdu *)0)->present), + asn_MAP_Vanetza_Security2_CamRaInterfacePdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CamRaInterfacePdu = { + "CamRaInterfacePdu", + "CamRaInterfacePdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CamRaInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CamRaInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_CamRaInterfacePdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CamRaInterfacePdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CamRaInterfacePdu.h b/vanetza/asn1/security/r2/CamRaInterfacePdu.h new file mode 100644 index 000000000..1be337ad9 --- /dev/null +++ b/vanetza/asn1/security/r2/CamRaInterfacePdu.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CamRaInterfacePdu_H_ +#define _Vanetza_Security2_CamRaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RaCamBatchRequest.h" +#include "CamRaBatchResponse.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CamRaInterfacePdu_PR { + Vanetza_Security2_CamRaInterfacePdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_CamRaInterfacePdu_PR_raCamBatchRequest, + Vanetza_Security2_CamRaInterfacePdu_PR_camRaBatchResponse + /* Extensions may appear below */ + +} Vanetza_Security2_CamRaInterfacePdu_PR; + +/* Vanetza_Security2_CamRaInterfacePdu */ +typedef struct Vanetza_Security2_CamRaInterfacePdu { + Vanetza_Security2_CamRaInterfacePdu_PR present; + union Vanetza_Security2_CamRaInterfacePdu_u { + Vanetza_Security2_RaCamBatchRequest_t raCamBatchRequest; + Vanetza_Security2_CamRaBatchResponse_t camRaBatchResponse; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CamRaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CamRaInterfacePdu; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CamRaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CamSsp.c b/vanetza/asn1/security/r2/CamSsp.c new file mode 100644 index 000000000..0d574ac00 --- /dev/null +++ b/vanetza/asn1/security/r2/CamSsp.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CamSsp.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CamSsp_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CamSsp_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CamSsp_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_AcpcTreeId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CamSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_CamSsp_specs_1 = { + sizeof(struct Vanetza_Security2_CamSsp), + offsetof(struct Vanetza_Security2_CamSsp, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CamSsp = { + "CamSsp", + "CamSsp", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_CamSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CamSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CamSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CamSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CamSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CamSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CamSsp_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CamSsp_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_CamSsp_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_CamSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CamSsp.h b/vanetza/asn1/security/r2/CamSsp.h new file mode 100644 index 000000000..048f73383 --- /dev/null +++ b/vanetza/asn1/security/r2/CamSsp.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CamSsp_H_ +#define _Vanetza_Security2_CamSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "AcpcTreeId.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CamSsp */ +typedef struct Vanetza_Security2_CamSsp { + A_SEQUENCE_OF(Vanetza_Security2_AcpcTreeId_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CamSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CamSsp; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_CamSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CamSsp_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CamSsp_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CamSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertIssueExtension.c b/vanetza/asn1/security/r2/CertIssueExtension.c new file mode 100644 index 000000000..ec95c175c --- /dev/null +++ b/vanetza/asn1/security/r2/CertIssueExtension.c @@ -0,0 +1,265 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertIssueExtension.h" + +static const long asn_VAL_2_Vanetza_Security2_certExtId_OperatingOrganization = 1; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_SetCertExtensions_1_rows[] = { + { "&id", aioc__value, &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, &asn_VAL_2_Vanetza_Security2_certExtId_OperatingOrganization }, + { "&App", aioc__type, &asn_DEF_Vanetza_Security2_OperatingOrganizationId }, + { "&Issue", aioc__type, &asn_DEF_NULL }, + { "&Req", aioc__type, &asn_DEF_NULL } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_SetCertExtensions_1[] = { + { 1, 4, asn_IOS_Vanetza_Security2_SetCertExtensions_1_rows } +}; +static int +memb_Vanetza_Security2_specific_constraint_3(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); +} + +static int +memb_Vanetza_Security2_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_specific_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_specific_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_permissions_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_permissions_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_permissions_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertIssueExtension__permissions, choice.specific), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ANY, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_specific_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_specific_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_specific_constraint_3 + }, + 0, 0, /* No default value */ + "specific" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertIssueExtension__permissions, choice.all), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "all" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_permissions_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* specific */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* all */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_permissions_specs_3 = { + sizeof(struct Vanetza_Security2_CertIssueExtension__permissions), + offsetof(struct Vanetza_Security2_CertIssueExtension__permissions, _asn_ctx), + offsetof(struct Vanetza_Security2_CertIssueExtension__permissions, present), + sizeof(((struct Vanetza_Security2_CertIssueExtension__permissions *)0)->present), + asn_MAP_Vanetza_Security2_permissions_tag2el_3, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_permissions_3 = { + "permissions", + "permissions", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_permissions_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_permissions_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_permissions_3, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_permissions_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertIssueExtension_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertIssueExtension, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_id_constraint_1 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertIssueExtension, permissions), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_permissions_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "permissions" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertIssueExtension_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* permissions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertIssueExtension_specs_1 = { + sizeof(struct Vanetza_Security2_CertIssueExtension), + offsetof(struct Vanetza_Security2_CertIssueExtension, _asn_ctx), + asn_MAP_Vanetza_Security2_CertIssueExtension_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_Vanetza_Security2_CertIssueExtension = { + "CertIssueExtension", + "CertIssueExtension", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertIssueExtension_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CertIssueExtension_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertIssueExtension_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertIssueExtension.h b/vanetza/asn1/security/r2/CertIssueExtension.h new file mode 100644 index 000000000..0cff83ecc --- /dev/null +++ b/vanetza/asn1/security/r2/CertIssueExtension.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertIssueExtension_H_ +#define _Vanetza_Security2_CertIssueExtension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2BaseTypes_ExtId.h" +#include "asn_ioc.h" +#include "OperatingOrganizationId.h" +#include "NULL.h" +#include "ANY.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CertIssueExtension__permissions_PR { + Vanetza_Security2_CertIssueExtension__permissions_PR_NOTHING, /* No components present */ + Vanetza_Security2_CertIssueExtension__permissions_PR_specific, + Vanetza_Security2_CertIssueExtension__permissions_PR_all +} Vanetza_Security2_CertIssueExtension__permissions_PR; + +/* Vanetza_Security2_CertIssueExtension */ +typedef struct Vanetza_Security2_CertIssueExtension { + Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t id; + struct Vanetza_Security2_CertIssueExtension__permissions { + Vanetza_Security2_CertIssueExtension__permissions_PR present; + union Vanetza_Security2_CertIssueExtension__Vanetza_Security2_permissions_u { + ANY_t specific; + NULL_t all; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } permissions; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertIssueExtension_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertIssueExtension; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertIssueExtension_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertIssueExtension_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertIssueExtension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertManagementPdu.c b/vanetza/asn1/security/r2/CertManagementPdu.c new file mode 100644 index 000000000..84d75bed1 --- /dev/null +++ b/vanetza/asn1/security/r2/CertManagementPdu.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertManagementPdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertManagementPdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertManagementPdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertManagementPdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertManagementPdu, choice.compositeCrl), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CompositeCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "compositeCrl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertManagementPdu, choice.certificateChain), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateChain, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateChain" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertManagementPdu, choice.multiSignedCtl), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_MultiSignedCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "multiSignedCtl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertManagementPdu, choice.tbsCtlSignature), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tbsCtlSignature" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertManagementPdu, choice.infoStatus), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "infoStatus" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertManagementPdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* compositeCrl */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* certificateChain */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* multiSignedCtl */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* tbsCtlSignature */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* infoStatus */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CertManagementPdu_specs_1 = { + sizeof(struct Vanetza_Security2_CertManagementPdu), + offsetof(struct Vanetza_Security2_CertManagementPdu, _asn_ctx), + offsetof(struct Vanetza_Security2_CertManagementPdu, present), + sizeof(((struct Vanetza_Security2_CertManagementPdu *)0)->present), + asn_MAP_Vanetza_Security2_CertManagementPdu_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 5 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertManagementPdu = { + "CertManagementPdu", + "CertManagementPdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertManagementPdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertManagementPdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_CertManagementPdu_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertManagementPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertManagementPdu.h b/vanetza/asn1/security/r2/CertManagementPdu.h new file mode 100644 index 000000000..31122c58c --- /dev/null +++ b/vanetza/asn1/security/r2/CertManagementPdu.h @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertManagementPdu_H_ +#define _Vanetza_Security2_CertManagementPdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CompositeCrl.h" +#include "CertificateChain.h" +#include "MultiSignedCtl.h" +#include "ToBeSignedCtlSignature.h" +#include "CertificateManagementInfoStatus.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CertManagementPdu_PR { + Vanetza_Security2_CertManagementPdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_CertManagementPdu_PR_compositeCrl, + Vanetza_Security2_CertManagementPdu_PR_certificateChain, + Vanetza_Security2_CertManagementPdu_PR_multiSignedCtl, + Vanetza_Security2_CertManagementPdu_PR_tbsCtlSignature, + Vanetza_Security2_CertManagementPdu_PR_infoStatus + /* Extensions may appear below */ + +} Vanetza_Security2_CertManagementPdu_PR; + +/* Vanetza_Security2_CertManagementPdu */ +typedef struct Vanetza_Security2_CertManagementPdu { + Vanetza_Security2_CertManagementPdu_PR present; + union Vanetza_Security2_CertManagementPdu_u { + Vanetza_Security2_CompositeCrl_t compositeCrl; + Vanetza_Security2_CertificateChain_t certificateChain; + Vanetza_Security2_MultiSignedCtl_t multiSignedCtl; + Vanetza_Security2_ToBeSignedCtlSignature_t tbsCtlSignature; + Vanetza_Security2_CertificateManagementInfoStatus_t infoStatus; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertManagementPdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertManagementPdu; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CertManagementPdu_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertManagementPdu_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertManagementPdu_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertManagementPdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertRequestExtension.c b/vanetza/asn1/security/r2/CertRequestExtension.c new file mode 100644 index 000000000..d436252fc --- /dev/null +++ b/vanetza/asn1/security/r2/CertRequestExtension.c @@ -0,0 +1,265 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertRequestExtension.h" + +static const long asn_VAL_2_Vanetza_Security2_certExtId_OperatingOrganization = 1; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_SetCertExtensions_1_rows[] = { + { "&id", aioc__value, &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, &asn_VAL_2_Vanetza_Security2_certExtId_OperatingOrganization }, + { "&App", aioc__type, &asn_DEF_Vanetza_Security2_OperatingOrganizationId }, + { "&Issue", aioc__type, &asn_DEF_NULL }, + { "&Req", aioc__type, &asn_DEF_NULL } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_SetCertExtensions_1[] = { + { 1, 4, asn_IOS_Vanetza_Security2_SetCertExtensions_1_rows } +}; +static int +memb_Vanetza_Security2_content_constraint_3(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); +} + +static int +memb_Vanetza_Security2_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_content_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_content_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_permissions_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_permissions_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_permissions_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertRequestExtension__permissions, choice.content), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ANY, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_content_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_content_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_content_constraint_3 + }, + 0, 0, /* No default value */ + "content" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertRequestExtension__permissions, choice.all), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "all" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_permissions_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* content */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* all */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_permissions_specs_3 = { + sizeof(struct Vanetza_Security2_CertRequestExtension__permissions), + offsetof(struct Vanetza_Security2_CertRequestExtension__permissions, _asn_ctx), + offsetof(struct Vanetza_Security2_CertRequestExtension__permissions, present), + sizeof(((struct Vanetza_Security2_CertRequestExtension__permissions *)0)->present), + asn_MAP_Vanetza_Security2_permissions_tag2el_3, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_permissions_3 = { + "permissions", + "permissions", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_permissions_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_permissions_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_permissions_3, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_permissions_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertRequestExtension_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertRequestExtension, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_id_constraint_1 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertRequestExtension, permissions), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_permissions_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "permissions" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertRequestExtension_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* permissions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertRequestExtension_specs_1 = { + sizeof(struct Vanetza_Security2_CertRequestExtension), + offsetof(struct Vanetza_Security2_CertRequestExtension, _asn_ctx), + asn_MAP_Vanetza_Security2_CertRequestExtension_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_Vanetza_Security2_CertRequestExtension = { + "CertRequestExtension", + "CertRequestExtension", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertRequestExtension_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CertRequestExtension_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertRequestExtension_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertRequestExtension.h b/vanetza/asn1/security/r2/CertRequestExtension.h new file mode 100644 index 000000000..d94041be6 --- /dev/null +++ b/vanetza/asn1/security/r2/CertRequestExtension.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertRequestExtension_H_ +#define _Vanetza_Security2_CertRequestExtension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2BaseTypes_ExtId.h" +#include "asn_ioc.h" +#include "OperatingOrganizationId.h" +#include "NULL.h" +#include "ANY.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CertRequestExtension__permissions_PR { + Vanetza_Security2_CertRequestExtension__permissions_PR_NOTHING, /* No components present */ + Vanetza_Security2_CertRequestExtension__permissions_PR_content, + Vanetza_Security2_CertRequestExtension__permissions_PR_all +} Vanetza_Security2_CertRequestExtension__permissions_PR; + +/* Vanetza_Security2_CertRequestExtension */ +typedef struct Vanetza_Security2_CertRequestExtension { + Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t id; + struct Vanetza_Security2_CertRequestExtension__permissions { + Vanetza_Security2_CertRequestExtension__permissions_PR present; + union Vanetza_Security2_CertRequestExtension__Vanetza_Security2_permissions_u { + ANY_t content; + NULL_t all; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } permissions; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertRequestExtension_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertRequestExtension; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertRequestExtension_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertRequestExtension_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertRequestExtension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Certificate.c b/vanetza/asn1/security/r2/Certificate.c new file mode 100644 index 000000000..8a11a77c3 --- /dev/null +++ b/vanetza/asn1/security/r2/Certificate.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Certificate.h" + +int +Vanetza_Security2_Certificate_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 Vanetza_Security2_CertificateBase, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Certificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Certificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Certificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Certificate = { + "Certificate", + "Certificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Certificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Certificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Certificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Certificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Certificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Certificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Certificate_constraint + }, + asn_MBR_Vanetza_Security2_CertificateBase_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateBase_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Certificate.h b/vanetza/asn1/security/r2/Certificate.h new file mode 100644 index 000000000..501efb919 --- /dev/null +++ b/vanetza/asn1/security/r2/Certificate.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Certificate_H_ +#define _Vanetza_Security2_Certificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CertificateBase.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Certificate */ +typedef Vanetza_Security2_CertificateBase_t Vanetza_Security2_Certificate_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Certificate_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Certificate; +asn_struct_free_f Vanetza_Security2_Certificate_free; +asn_struct_print_f Vanetza_Security2_Certificate_print; +asn_constr_check_f Vanetza_Security2_Certificate_constraint; +ber_type_decoder_f Vanetza_Security2_Certificate_decode_ber; +der_type_encoder_f Vanetza_Security2_Certificate_encode_der; +xer_type_decoder_f Vanetza_Security2_Certificate_decode_xer; +xer_type_encoder_f Vanetza_Security2_Certificate_encode_xer; +jer_type_encoder_f Vanetza_Security2_Certificate_encode_jer; +oer_type_decoder_f Vanetza_Security2_Certificate_decode_oer; +oer_type_encoder_f Vanetza_Security2_Certificate_encode_oer; +per_type_decoder_f Vanetza_Security2_Certificate_decode_uper; +per_type_encoder_f Vanetza_Security2_Certificate_encode_uper; +per_type_decoder_f Vanetza_Security2_Certificate_decode_aper; +per_type_encoder_f Vanetza_Security2_Certificate_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Certificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateBase.c b/vanetza/asn1/security/r2/CertificateBase.c new file mode 100644 index 000000000..06d21b6f4 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateBase.c @@ -0,0 +1,195 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateBase.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 3L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (3..3) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (3..3) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateBase_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateBase, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateBase, type), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "type" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateBase, issuer), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IssuerIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "issuer" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateBase, toBeSigned), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "toBeSigned" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_CertificateBase, signature), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signature" + }, +}; +static const int asn_MAP_Vanetza_Security2_CertificateBase_oms_1[] = { 4 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateBase_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertificateBase_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* type */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* issuer */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* toBeSigned */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* signature */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateBase_specs_1 = { + sizeof(struct Vanetza_Security2_CertificateBase), + offsetof(struct Vanetza_Security2_CertificateBase, _asn_ctx), + asn_MAP_Vanetza_Security2_CertificateBase_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_CertificateBase_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateBase = { + "CertificateBase", + "CertificateBase", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertificateBase_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateBase_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateBase_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateBase_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateBase_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateBase_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CertificateBase_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateBase_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateBase.h b/vanetza/asn1/security/r2/CertificateBase.h new file mode 100644 index 000000000..968f46c15 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateBase.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateBase_H_ +#define _Vanetza_Security2_CertificateBase_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "CertificateType.h" +#include "IssuerIdentifier.h" +#include "ToBeSignedCertificate.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_Signature; + +/* Vanetza_Security2_CertificateBase */ +typedef struct Vanetza_Security2_CertificateBase { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_CertificateType_t type; + Vanetza_Security2_IssuerIdentifier_t issuer; + Vanetza_Security2_ToBeSignedCertificate_t toBeSigned; + struct Vanetza_Security2_Signature *signature; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertificateBase_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateBase; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateBase_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateBase_1[5]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "Signature.h" + +#endif /* _Vanetza_Security2_CertificateBase_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateChain.c b/vanetza/asn1/security/r2/CertificateChain.c new file mode 100644 index 000000000..36aca6ec0 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateChain.c @@ -0,0 +1,195 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateChain.h" + +static int +memb_Vanetza_Security2_others_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_others_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_others_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_others_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_others_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_others_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_others_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_others_specs_3 = { + sizeof(struct Vanetza_Security2_CertificateChain__others), + offsetof(struct Vanetza_Security2_CertificateChain__others, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_others_3 = { + "others", + "others", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_others_tags_3, + sizeof(asn_DEF_Vanetza_Security2_others_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_others_tags_3[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_others_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_others_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_others_tags_3[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_others_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_others_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_others_3, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_others_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateChain_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateChain, homeCtl), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "homeCtl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateChain, others), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_Vanetza_Security2_others_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_others_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_others_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_others_constraint_1 + }, + 0, 0, /* No default value */ + "others" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateChain_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertificateChain_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* homeCtl */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* others */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateChain_specs_1 = { + sizeof(struct Vanetza_Security2_CertificateChain), + offsetof(struct Vanetza_Security2_CertificateChain, _asn_ctx), + asn_MAP_Vanetza_Security2_CertificateChain_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateChain = { + "CertificateChain", + "CertificateChain", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertificateChain_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateChain_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateChain_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateChain_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateChain_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateChain_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CertificateChain_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateChain_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateChain.h b/vanetza/asn1/security/r2/CertificateChain.h new file mode 100644 index 000000000..7cecf3c3d --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateChain.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateChain_H_ +#define _Vanetza_Security2_CertificateChain_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MultiSignedCtlSpdu.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_Certificate; + +/* Vanetza_Security2_CertificateChain */ +typedef struct Vanetza_Security2_CertificateChain { + Vanetza_Security2_MultiSignedCtlSpdu_t homeCtl; + struct Vanetza_Security2_CertificateChain__others { + A_SEQUENCE_OF(struct Vanetza_Security2_Certificate) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } others; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertificateChain_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateChain; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateChain_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateChain_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "Certificate.h" + +#endif /* _Vanetza_Security2_CertificateChain_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateChainSpdu.c b/vanetza/asn1/security/r2/CertificateChainSpdu.c new file mode 100644 index 000000000..6f1a6d71d --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateChainSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateChainSpdu.h" + +int +Vanetza_Security2_CertificateChainSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertificateChainSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateChainSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateChainSpdu = { + "CertificateChainSpdu", + "CertificateChainSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateChainSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertificateChainSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertificateChainSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CertificateChainSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateChainSpdu.h b/vanetza/asn1/security/r2/CertificateChainSpdu.h new file mode 100644 index 000000000..fd3274668 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateChainSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateChainSpdu_H_ +#define _Vanetza_Security2_CertificateChainSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CertificateChainSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t Vanetza_Security2_CertificateChainSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateChainSpdu; +asn_struct_free_f Vanetza_Security2_CertificateChainSpdu_free; +asn_struct_print_f Vanetza_Security2_CertificateChainSpdu_print; +asn_constr_check_f Vanetza_Security2_CertificateChainSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_CertificateChainSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_CertificateChainSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_CertificateChainSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_CertificateChainSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_CertificateChainSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_CertificateChainSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_CertificateChainSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_CertificateChainSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_CertificateChainSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_CertificateChainSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_CertificateChainSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertificateChainSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateFormat.c b/vanetza/asn1/security/r2/CertificateFormat.c new file mode 100644 index 000000000..8a0e580e2 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateFormat.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateFormat.h" + +int +Vanetza_Security2_CertificateFormat_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 1L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertificateFormat_constr_1 CC_NOTUSED = { + { 1, 1 } /* (1..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateFormat_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 1, 255 } /* (1..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateFormat_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateFormat = { + "CertificateFormat", + "CertificateFormat", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_CertificateFormat_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateFormat_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateFormat_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateFormat_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateFormat_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateFormat_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertificateFormat_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertificateFormat_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CertificateFormat_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateFormat.h b/vanetza/asn1/security/r2/CertificateFormat.h new file mode 100644 index 000000000..dcfa3fe6b --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateFormat.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateFormat_H_ +#define _Vanetza_Security2_CertificateFormat_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CertificateFormat { + Vanetza_Security2_CertificateFormat_ts103097v131 = 1 +} e_Vanetza_Security2_CertificateFormat; + +/* Vanetza_Security2_CertificateFormat */ +typedef long Vanetza_Security2_CertificateFormat_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateFormat_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateFormat; +asn_struct_free_f Vanetza_Security2_CertificateFormat_free; +asn_struct_print_f Vanetza_Security2_CertificateFormat_print; +asn_constr_check_f Vanetza_Security2_CertificateFormat_constraint; +ber_type_decoder_f Vanetza_Security2_CertificateFormat_decode_ber; +der_type_encoder_f Vanetza_Security2_CertificateFormat_encode_der; +xer_type_decoder_f Vanetza_Security2_CertificateFormat_decode_xer; +xer_type_encoder_f Vanetza_Security2_CertificateFormat_encode_xer; +jer_type_encoder_f Vanetza_Security2_CertificateFormat_encode_jer; +oer_type_decoder_f Vanetza_Security2_CertificateFormat_decode_oer; +oer_type_encoder_f Vanetza_Security2_CertificateFormat_encode_oer; +per_type_decoder_f Vanetza_Security2_CertificateFormat_decode_uper; +per_type_encoder_f Vanetza_Security2_CertificateFormat_encode_uper; +per_type_decoder_f Vanetza_Security2_CertificateFormat_decode_aper; +per_type_encoder_f Vanetza_Security2_CertificateFormat_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertificateFormat_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateId.c b/vanetza/asn1/security/r2/CertificateId.c new file mode 100644 index 000000000..ac6f7363a --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateId.c @@ -0,0 +1,182 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateId.h" + +static int +memb_Vanetza_Security2_binaryId_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 >= 1UL && size <= 64UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_binaryId_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..64)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_binaryId_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 6, 6, 1, 64 } /* (SIZE(1..64)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertificateId_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateId_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateId, choice.linkageData), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageData, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageData" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateId, choice.name), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Hostname, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "name" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateId, choice.binaryId), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_binaryId_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_binaryId_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_binaryId_constraint_1 + }, + 0, 0, /* No default value */ + "binaryId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateId, choice.none), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "none" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertificateId_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* linkageData */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* name */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* binaryId */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* none */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CertificateId_specs_1 = { + sizeof(struct Vanetza_Security2_CertificateId), + offsetof(struct Vanetza_Security2_CertificateId, _asn_ctx), + offsetof(struct Vanetza_Security2_CertificateId, present), + sizeof(((struct Vanetza_Security2_CertificateId *)0)->present), + asn_MAP_Vanetza_Security2_CertificateId_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateId = { + "CertificateId", + "CertificateId", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertificateId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertificateId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_CertificateId_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateId_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateId.h b/vanetza/asn1/security/r2/CertificateId.h new file mode 100644 index 000000000..a7c502bf8 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateId.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateId_H_ +#define _Vanetza_Security2_CertificateId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "LinkageData.h" +#include "Hostname.h" +#include "OCTET_STRING.h" +#include "NULL.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CertificateId_PR { + Vanetza_Security2_CertificateId_PR_NOTHING, /* No components present */ + Vanetza_Security2_CertificateId_PR_linkageData, + Vanetza_Security2_CertificateId_PR_name, + Vanetza_Security2_CertificateId_PR_binaryId, + Vanetza_Security2_CertificateId_PR_none + /* Extensions may appear below */ + +} Vanetza_Security2_CertificateId_PR; + +/* Vanetza_Security2_CertificateId */ +typedef struct Vanetza_Security2_CertificateId { + Vanetza_Security2_CertificateId_PR present; + union Vanetza_Security2_CertificateId_u { + Vanetza_Security2_LinkageData_t linkageData; + Vanetza_Security2_Hostname_t name; + OCTET_STRING_t binaryId; + NULL_t none; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertificateId_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateId; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CertificateId_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateId_1[4]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateId_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertificateId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateManagementInfoStatus.c b/vanetza/asn1/security/r2/CertificateManagementInfoStatus.c new file mode 100644 index 000000000..28e94b80f --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateManagementInfoStatus.c @@ -0,0 +1,158 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateManagementInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateManagementInfoStatus_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateManagementInfoStatus, crl), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateManagementInfoStatus, ctl), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ctl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateManagementInfoStatus, caCcf), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "caCcf" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CertificateManagementInfoStatus, ma), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ma" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_CertificateManagementInfoStatus, ra), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ra" + }, +}; +static const int asn_MAP_Vanetza_Security2_CertificateManagementInfoStatus_oms_1[] = { 4 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertificateManagementInfoStatus_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* crl */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ctl */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* caCcf */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ma */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ra */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateManagementInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_CertificateManagementInfoStatus), + offsetof(struct Vanetza_Security2_CertificateManagementInfoStatus, _asn_ctx), + asn_MAP_Vanetza_Security2_CertificateManagementInfoStatus_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_CertificateManagementInfoStatus_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus = { + "CertificateManagementInfoStatus", + "CertificateManagementInfoStatus", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CertificateManagementInfoStatus_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateManagementInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateManagementInfoStatus.h b/vanetza/asn1/security/r2/CertificateManagementInfoStatus.h new file mode 100644 index 000000000..80ea6a76a --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateManagementInfoStatus.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateManagementInfoStatus_H_ +#define _Vanetza_Security2_CertificateManagementInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SequenceOfCrlInfoStatus.h" +#include "SequenceOfCtlInfoStatus.h" +#include "Time32.h" +#include "SequenceOfMaInfoStatus.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CertificateManagementInfoStatus */ +typedef struct Vanetza_Security2_CertificateManagementInfoStatus { + Vanetza_Security2_SequenceOfCrlInfoStatus_t crl; + Vanetza_Security2_SequenceOfCtlInfoStatus_t ctl; + Vanetza_Security2_Time32_t caCcf; + Vanetza_Security2_SequenceOfMaInfoStatus_t ma; + Vanetza_Security2_Time32_t *ra; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertificateManagementInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateManagementInfoStatus; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateManagementInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateManagementInfoStatus_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertificateManagementInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateManagementInformationStatusSpdu.c b/vanetza/asn1/security/r2/CertificateManagementInformationStatusSpdu.c new file mode 100644 index 000000000..5567f5c27 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateManagementInformationStatusSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateManagementInformationStatusSpdu.h" + +int +Vanetza_Security2_CertificateManagementInformationStatusSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertificateManagementInformationStatusSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateManagementInformationStatusSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu = { + "CertificateManagementInformationStatusSpdu", + "CertificateManagementInformationStatusSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertificateManagementInformationStatusSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertificateManagementInformationStatusSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CertificateManagementInformationStatusSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateManagementInformationStatusSpdu.h b/vanetza/asn1/security/r2/CertificateManagementInformationStatusSpdu.h new file mode 100644 index 000000000..5996d44af --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateManagementInformationStatusSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateManagementInformationStatusSpdu_H_ +#define _Vanetza_Security2_CertificateManagementInformationStatusSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CertificateManagementInformationStatusSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_CertificateManagementInformationStatusSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateManagementInformationStatusSpdu; +asn_struct_free_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_free; +asn_struct_print_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_print; +asn_constr_check_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_CertificateManagementInformationStatusSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertificateManagementInformationStatusSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateSubjectAttributes.c b/vanetza/asn1/security/r2/CertificateSubjectAttributes.c new file mode 100644 index 000000000..28889e155 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateSubjectAttributes.c @@ -0,0 +1,191 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateSubjectAttributes.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertificateSubjectAttributes_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateSubjectAttributes_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateSubjectAttributes_1[] = { + { ATF_POINTER, 6, offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_POINTER, 5, offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, validityPeriod), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ValidityPeriod, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "validityPeriod" + }, + { ATF_POINTER, 4, offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, region), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_GeographicRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "region" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, assuranceLevel), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SubjectAssurance, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "assuranceLevel" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, appPermissions), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsidSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "appPermissions" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, certIssuePermissions), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certIssuePermissions" + }, +}; +static const int asn_MAP_Vanetza_Security2_CertificateSubjectAttributes_oms_1[] = { 0, 1, 2, 3, 4, 5 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CertificateSubjectAttributes_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* validityPeriod */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* region */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* assuranceLevel */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* appPermissions */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* certIssuePermissions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateSubjectAttributes_specs_1 = { + sizeof(struct Vanetza_Security2_CertificateSubjectAttributes), + offsetof(struct Vanetza_Security2_CertificateSubjectAttributes, _asn_ctx), + asn_MAP_Vanetza_Security2_CertificateSubjectAttributes_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_CertificateSubjectAttributes_oms_1, /* Optional members */ + 6, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateSubjectAttributes = { + "CertificateSubjectAttributes", + "CertificateSubjectAttributes", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateSubjectAttributes_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertificateSubjectAttributes_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertificateSubjectAttributes_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CertificateSubjectAttributes_1, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateSubjectAttributes_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateSubjectAttributes.h b/vanetza/asn1/security/r2/CertificateSubjectAttributes.h new file mode 100644 index 000000000..7376cb8f0 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateSubjectAttributes.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateSubjectAttributes_H_ +#define _Vanetza_Security2_CertificateSubjectAttributes_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SubjectAssurance.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CertificateId; +struct Vanetza_Security2_ValidityPeriod; +struct Vanetza_Security2_GeographicRegion; +struct Vanetza_Security2_SequenceOfPsidSsp; +struct Vanetza_Security2_SequenceOfPsidGroupPermissions; + +/* Vanetza_Security2_CertificateSubjectAttributes */ +typedef struct Vanetza_Security2_CertificateSubjectAttributes { + struct Vanetza_Security2_CertificateId *id; /* OPTIONAL */ + struct Vanetza_Security2_ValidityPeriod *validityPeriod; /* OPTIONAL */ + struct Vanetza_Security2_GeographicRegion *region; /* OPTIONAL */ + Vanetza_Security2_SubjectAssurance_t *assuranceLevel; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfPsidSsp *appPermissions; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfPsidGroupPermissions *certIssuePermissions; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CertificateSubjectAttributes_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateSubjectAttributes; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CertificateSubjectAttributes_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CertificateSubjectAttributes_1[6]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateSubjectAttributes_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CertificateId.h" +#include "ValidityPeriod.h" +#include "GeographicRegion.h" +#include "SequenceOfPsidSsp.h" +#include "SequenceOfPsidGroupPermissions.h" + +#endif /* _Vanetza_Security2_CertificateSubjectAttributes_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CertificateType.c b/vanetza/asn1/security/r2/CertificateType.c new file mode 100644 index 000000000..de62dbeb7 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateType.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CertificateType.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CertificateType_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_CertificateType_value2enum_1[] = { + { 0, 8, "explicit" }, + { 1, 8, "implicit" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_Vanetza_Security2_CertificateType_enum2value_1[] = { + 0, /* explicit(0) */ + 1 /* implicit(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_CertificateType_specs_1 = { + asn_MAP_Vanetza_Security2_CertificateType_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_CertificateType_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CertificateType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateType = { + "CertificateType", + "CertificateType", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_CertificateType_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CertificateType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateType_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CertificateType_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CertificateType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CertificateType_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CertificateType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CertificateType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_CertificateType_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CertificateType.h b/vanetza/asn1/security/r2/CertificateType.h new file mode 100644 index 000000000..2468d1bb9 --- /dev/null +++ b/vanetza/asn1/security/r2/CertificateType.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CertificateType_H_ +#define _Vanetza_Security2_CertificateType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CertificateType { + Vanetza_Security2_CertificateType_explicit = 0, + Vanetza_Security2_CertificateType_implicit = 1 + /* + * Enumeration is extensible + */ +} e_Vanetza_Security2_CertificateType; + +/* Vanetza_Security2_CertificateType */ +typedef long Vanetza_Security2_CertificateType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CertificateType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CertificateType; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_CertificateType_specs_1; +asn_struct_free_f Vanetza_Security2_CertificateType_free; +asn_struct_print_f Vanetza_Security2_CertificateType_print; +asn_constr_check_f Vanetza_Security2_CertificateType_constraint; +ber_type_decoder_f Vanetza_Security2_CertificateType_decode_ber; +der_type_encoder_f Vanetza_Security2_CertificateType_encode_der; +xer_type_decoder_f Vanetza_Security2_CertificateType_decode_xer; +xer_type_encoder_f Vanetza_Security2_CertificateType_encode_xer; +jer_type_encoder_f Vanetza_Security2_CertificateType_encode_jer; +oer_type_decoder_f Vanetza_Security2_CertificateType_decode_oer; +oer_type_encoder_f Vanetza_Security2_CertificateType_encode_oer; +per_type_decoder_f Vanetza_Security2_CertificateType_decode_uper; +per_type_encoder_f Vanetza_Security2_CertificateType_encode_uper; +per_type_decoder_f Vanetza_Security2_CertificateType_decode_aper; +per_type_encoder_f Vanetza_Security2_CertificateType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CertificateType_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CircularRegion.c b/vanetza/asn1/security/r2/CircularRegion.c new file mode 100644 index 000000000..6a0d5deb3 --- /dev/null +++ b/vanetza/asn1/security/r2/CircularRegion.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CircularRegion.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CircularRegion_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CircularRegion, center), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_TwoDLocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "center" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CircularRegion, radius), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "radius" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CircularRegion_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CircularRegion_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* center */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* radius */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CircularRegion_specs_1 = { + sizeof(struct Vanetza_Security2_CircularRegion), + offsetof(struct Vanetza_Security2_CircularRegion, _asn_ctx), + asn_MAP_Vanetza_Security2_CircularRegion_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_Vanetza_Security2_CircularRegion = { + "CircularRegion", + "CircularRegion", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CircularRegion_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CircularRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CircularRegion_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CircularRegion_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CircularRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CircularRegion_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CircularRegion_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CircularRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CircularRegion.h b/vanetza/asn1/security/r2/CircularRegion.h new file mode 100644 index 000000000..26dd700b8 --- /dev/null +++ b/vanetza/asn1/security/r2/CircularRegion.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CircularRegion_H_ +#define _Vanetza_Security2_CircularRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TwoDLocation.h" +#include "Uint16.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CircularRegion */ +typedef struct Vanetza_Security2_CircularRegion { + Vanetza_Security2_TwoDLocation_t center; + Vanetza_Security2_Uint16_t radius; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CircularRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CircularRegion; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CircularRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CircularRegion_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CircularRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CompositeCrl.c b/vanetza/asn1/security/r2/CompositeCrl.c new file mode 100644 index 000000000..d01894130 --- /dev/null +++ b/vanetza/asn1/security/r2/CompositeCrl.c @@ -0,0 +1,195 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CompositeCrl.h" + +static int +memb_Vanetza_Security2_crl_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_crl_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_crl_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_crl_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_crl_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_crl_2[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_SecuredCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_crl_tags_2[] = { + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_crl_specs_2 = { + sizeof(struct Vanetza_Security2_CompositeCrl__crl), + offsetof(struct Vanetza_Security2_CompositeCrl__crl, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_crl_2 = { + "crl", + "crl", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_crl_tags_2, + sizeof(asn_DEF_Vanetza_Security2_crl_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_crl_tags_2[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_crl_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_crl_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_crl_tags_2[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_crl_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_crl_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_crl_2, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_crl_specs_2 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CompositeCrl_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CompositeCrl, crl), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + 0, + &asn_DEF_Vanetza_Security2_crl_2, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_crl_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_crl_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_crl_constraint_1 + }, + 0, 0, /* No default value */ + "crl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CompositeCrl, homeCtl), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "homeCtl" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CompositeCrl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CompositeCrl_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* crl */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* homeCtl */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CompositeCrl_specs_1 = { + sizeof(struct Vanetza_Security2_CompositeCrl), + offsetof(struct Vanetza_Security2_CompositeCrl, _asn_ctx), + asn_MAP_Vanetza_Security2_CompositeCrl_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CompositeCrl = { + "CompositeCrl", + "CompositeCrl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CompositeCrl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CompositeCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CompositeCrl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CompositeCrl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CompositeCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CompositeCrl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CompositeCrl_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CompositeCrl_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CompositeCrl.h b/vanetza/asn1/security/r2/CompositeCrl.h new file mode 100644 index 000000000..2a3713806 --- /dev/null +++ b/vanetza/asn1/security/r2/CompositeCrl.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CompositeCrl_H_ +#define _Vanetza_Security2_CompositeCrl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "MultiSignedCtlSpdu.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_SecuredCrl; + +/* Vanetza_Security2_CompositeCrl */ +typedef struct Vanetza_Security2_CompositeCrl { + struct Vanetza_Security2_CompositeCrl__crl { + A_SEQUENCE_OF(struct Vanetza_Security2_SecuredCrl) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } crl; + Vanetza_Security2_MultiSignedCtlSpdu_t homeCtl; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CompositeCrl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CompositeCrl; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CompositeCrl_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CompositeCrl_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SecuredCrl.h" + +#endif /* _Vanetza_Security2_CompositeCrl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CompositeCrlSpdu.c b/vanetza/asn1/security/r2/CompositeCrlSpdu.c new file mode 100644 index 000000000..f8597be66 --- /dev/null +++ b/vanetza/asn1/security/r2/CompositeCrlSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CompositeCrlSpdu.h" + +int +Vanetza_Security2_CompositeCrlSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CompositeCrlSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CompositeCrlSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CompositeCrlSpdu = { + "CompositeCrlSpdu", + "CompositeCrlSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CompositeCrlSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CompositeCrlSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CompositeCrlSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CompositeCrlSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CompositeCrlSpdu.h b/vanetza/asn1/security/r2/CompositeCrlSpdu.h new file mode 100644 index 000000000..b418e07c2 --- /dev/null +++ b/vanetza/asn1/security/r2/CompositeCrlSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CompositeCrlSpdu_H_ +#define _Vanetza_Security2_CompositeCrlSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CompositeCrlSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t Vanetza_Security2_CompositeCrlSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CompositeCrlSpdu; +asn_struct_free_f Vanetza_Security2_CompositeCrlSpdu_free; +asn_struct_print_f Vanetza_Security2_CompositeCrlSpdu_print; +asn_constr_check_f Vanetza_Security2_CompositeCrlSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_CompositeCrlSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_CompositeCrlSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_CompositeCrlSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_CompositeCrlSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_CompositeCrlSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_CompositeCrlSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_CompositeCrlSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_CompositeCrlSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_CompositeCrlSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_CompositeCrlSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_CompositeCrlSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CompositeCrlSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ContributedExtensionBlock.c b/vanetza/asn1/security/r2/ContributedExtensionBlock.c new file mode 100644 index 000000000..f97a60167 --- /dev/null +++ b/vanetza/asn1/security/r2/ContributedExtensionBlock.c @@ -0,0 +1,281 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ContributedExtensionBlock.h" + +static const long asn_VAL_1_Vanetza_Security2_ieee1609HeaderInfoContributorId = 1; +static const long asn_VAL_2_Vanetza_Security2_etsiHeaderInfoContributorId = 2; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_Ieee1609Dot2HeaderInfoContributedExtensions_1_rows[] = { + { "&id", aioc__value, &asn_DEF_Vanetza_Security2_HeaderInfoContributorId, &asn_VAL_1_Vanetza_Security2_ieee1609HeaderInfoContributorId }, + { "&Extn", aioc__type, &asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension }, + { "&id", aioc__value, &asn_DEF_Vanetza_Security2_HeaderInfoContributorId, &asn_VAL_2_Vanetza_Security2_etsiHeaderInfoContributorId }, + { "&Extn", aioc__type, &asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_Ieee1609Dot2HeaderInfoContributedExtensions_1[] = { + { 2, 2, asn_IOS_Vanetza_Security2_Ieee1609Dot2HeaderInfoContributedExtensions_1_rows } +}; +static int +memb_ANY_constraint_3(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); +} + +static int +memb_Vanetza_Security2_contributorId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_extns_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1UL)) { + /* Perform validation of the inner elements */ + return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_Member_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_Member_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_extns_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_extns_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_contributorId_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_contributorId_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_extns_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_extns_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_extns_3[] = { + { ATF_ANY_TYPE | ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (ANY?) */, + 0, + &asn_DEF_ANY, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_Member_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_Member_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_ANY_constraint_3 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_extns_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_extns_specs_3 = { + sizeof(struct Vanetza_Security2_ContributedExtensionBlock__extns), + offsetof(struct Vanetza_Security2_ContributedExtensionBlock__extns, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_extns_3 = { + "extns", + "extns", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_extns_tags_3, + sizeof(asn_DEF_Vanetza_Security2_extns_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_extns_tags_3[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_extns_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_extns_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_extns_tags_3[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_extns_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_extns_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_extns_3, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_extns_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ContributedExtensionBlock_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ContributedExtensionBlock, contributorId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HeaderInfoContributorId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_contributorId_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_contributorId_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_contributorId_constraint_1 + }, + 0, 0, /* No default value */ + "contributorId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ContributedExtensionBlock, extns), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_Vanetza_Security2_extns_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_extns_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_extns_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_extns_constraint_1 + }, + 0, 0, /* No default value */ + "extns" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ContributedExtensionBlock_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* contributorId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* extns */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ContributedExtensionBlock_specs_1 = { + sizeof(struct Vanetza_Security2_ContributedExtensionBlock), + offsetof(struct Vanetza_Security2_ContributedExtensionBlock, _asn_ctx), + asn_MAP_Vanetza_Security2_ContributedExtensionBlock_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_Vanetza_Security2_ContributedExtensionBlock = { + "ContributedExtensionBlock", + "ContributedExtensionBlock", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlock_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ContributedExtensionBlock_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ContributedExtensionBlock_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ContributedExtensionBlock.h b/vanetza/asn1/security/r2/ContributedExtensionBlock.h new file mode 100644 index 000000000..d11e3b4e0 --- /dev/null +++ b/vanetza/asn1/security/r2/ContributedExtensionBlock.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ContributedExtensionBlock_H_ +#define _Vanetza_Security2_ContributedExtensionBlock_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HeaderInfoContributorId.h" +#include "asn_ioc.h" +#include "Ieee1609ContributedHeaderInfoExtension.h" +#include "EtsiOriginatingHeaderInfoExtension.h" +#include "ANY.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ContributedExtensionBlock */ +typedef struct Vanetza_Security2_ContributedExtensionBlock { + Vanetza_Security2_HeaderInfoContributorId_t contributorId; + struct Vanetza_Security2_ContributedExtensionBlock__extns { + A_SEQUENCE_OF(ANY_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } extns; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ContributedExtensionBlock_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ContributedExtensionBlock; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ContributedExtensionBlock_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ContributedExtensionBlock_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ContributedExtensionBlock_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ContributedExtensionBlocks.c b/vanetza/asn1/security/r2/ContributedExtensionBlocks.c new file mode 100644 index 000000000..5adc53085 --- /dev/null +++ b/vanetza/asn1/security/r2/ContributedExtensionBlocks.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ContributedExtensionBlocks.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ContributedExtensionBlocks_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ContributedExtensionBlocks_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ContributedExtensionBlocks_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_ContributedExtensionBlock, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_ContributedExtensionBlocks_specs_1 = { + sizeof(struct Vanetza_Security2_ContributedExtensionBlocks), + offsetof(struct Vanetza_Security2_ContributedExtensionBlocks, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ContributedExtensionBlocks = { + "ContributedExtensionBlocks", + "ContributedExtensionBlocks", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ContributedExtensionBlocks_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ContributedExtensionBlocks_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ContributedExtensionBlocks_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_ContributedExtensionBlocks_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_ContributedExtensionBlocks_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ContributedExtensionBlocks.h b/vanetza/asn1/security/r2/ContributedExtensionBlocks.h new file mode 100644 index 000000000..e910a2ce9 --- /dev/null +++ b/vanetza/asn1/security/r2/ContributedExtensionBlocks.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ContributedExtensionBlocks_H_ +#define _Vanetza_Security2_ContributedExtensionBlocks_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_ContributedExtensionBlock; + +/* Vanetza_Security2_ContributedExtensionBlocks */ +typedef struct Vanetza_Security2_ContributedExtensionBlocks { + A_SEQUENCE_OF(struct Vanetza_Security2_ContributedExtensionBlock) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ContributedExtensionBlocks_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ContributedExtensionBlocks; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_ContributedExtensionBlocks_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ContributedExtensionBlocks_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ContributedExtensionBlocks_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "ContributedExtensionBlock.h" + +#endif /* _Vanetza_Security2_ContributedExtensionBlocks_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Countersignature.c b/vanetza/asn1/security/r2/Countersignature.c new file mode 100644 index 000000000..f313cc8f4 --- /dev/null +++ b/vanetza/asn1/security/r2/Countersignature.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Countersignature.h" + +int +Vanetza_Security2_Countersignature_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Countersignature_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_Countersignature_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Countersignature_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Countersignature = { + "Countersignature", + "Countersignature", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Countersignature_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Countersignature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Countersignature_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Countersignature_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Countersignature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Countersignature_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Countersignature_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Countersignature_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Countersignature_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Countersignature.h b/vanetza/asn1/security/r2/Countersignature.h new file mode 100644 index 000000000..fc9d4a987 --- /dev/null +++ b/vanetza/asn1/security/r2/Countersignature.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Countersignature_H_ +#define _Vanetza_Security2_Countersignature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Countersignature */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Countersignature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Countersignature; +asn_struct_free_f Vanetza_Security2_Countersignature_free; +asn_struct_print_f Vanetza_Security2_Countersignature_print; +asn_constr_check_f Vanetza_Security2_Countersignature_constraint; +ber_type_decoder_f Vanetza_Security2_Countersignature_decode_ber; +der_type_encoder_f Vanetza_Security2_Countersignature_encode_der; +xer_type_decoder_f Vanetza_Security2_Countersignature_decode_xer; +xer_type_encoder_f Vanetza_Security2_Countersignature_encode_xer; +jer_type_encoder_f Vanetza_Security2_Countersignature_encode_jer; +oer_type_decoder_f Vanetza_Security2_Countersignature_decode_oer; +oer_type_encoder_f Vanetza_Security2_Countersignature_encode_oer; +per_type_decoder_f Vanetza_Security2_Countersignature_decode_uper; +per_type_encoder_f Vanetza_Security2_Countersignature_encode_uper; +per_type_decoder_f Vanetza_Security2_Countersignature_decode_aper; +per_type_encoder_f Vanetza_Security2_Countersignature_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Countersignature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CountryAndRegions.c b/vanetza/asn1/security/r2/CountryAndRegions.c new file mode 100644 index 000000000..8895e55e4 --- /dev/null +++ b/vanetza/asn1/security/r2/CountryAndRegions.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CountryAndRegions.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CountryAndRegions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CountryAndRegions, countryOnly), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_UnCountryId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "countryOnly" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CountryAndRegions, regions), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfUint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "regions" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CountryAndRegions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* countryOnly */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* regions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CountryAndRegions_specs_1 = { + sizeof(struct Vanetza_Security2_CountryAndRegions), + offsetof(struct Vanetza_Security2_CountryAndRegions, _asn_ctx), + asn_MAP_Vanetza_Security2_CountryAndRegions_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_Vanetza_Security2_CountryAndRegions = { + "CountryAndRegions", + "CountryAndRegions", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CountryAndRegions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CountryAndRegions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CountryAndRegions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CountryAndRegions.h b/vanetza/asn1/security/r2/CountryAndRegions.h new file mode 100644 index 000000000..5939dd40b --- /dev/null +++ b/vanetza/asn1/security/r2/CountryAndRegions.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CountryAndRegions_H_ +#define _Vanetza_Security2_CountryAndRegions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UnCountryId.h" +#include "SequenceOfUint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CountryAndRegions */ +typedef struct Vanetza_Security2_CountryAndRegions { + Vanetza_Security2_UnCountryId_t countryOnly; + Vanetza_Security2_SequenceOfUint8_t regions; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CountryAndRegions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CountryAndRegions; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CountryAndRegions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CountryAndRegions_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CountryAndRegions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CountryAndSubregions.c b/vanetza/asn1/security/r2/CountryAndSubregions.c new file mode 100644 index 000000000..8cfe6dfc2 --- /dev/null +++ b/vanetza/asn1/security/r2/CountryAndSubregions.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CountryAndSubregions.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CountryAndSubregions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CountryAndSubregions, countryOnly), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_UnCountryId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "countryOnly" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CountryAndSubregions, regionAndSubregions), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "regionAndSubregions" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CountryAndSubregions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* countryOnly */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* regionAndSubregions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CountryAndSubregions_specs_1 = { + sizeof(struct Vanetza_Security2_CountryAndSubregions), + offsetof(struct Vanetza_Security2_CountryAndSubregions, _asn_ctx), + asn_MAP_Vanetza_Security2_CountryAndSubregions_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_Vanetza_Security2_CountryAndSubregions = { + "CountryAndSubregions", + "CountryAndSubregions", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CountryAndSubregions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CountryAndSubregions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CountryAndSubregions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CountryAndSubregions.h b/vanetza/asn1/security/r2/CountryAndSubregions.h new file mode 100644 index 000000000..4eb893ea0 --- /dev/null +++ b/vanetza/asn1/security/r2/CountryAndSubregions.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CountryAndSubregions_H_ +#define _Vanetza_Security2_CountryAndSubregions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UnCountryId.h" +#include "SequenceOfRegionAndSubregions.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CountryAndSubregions */ +typedef struct Vanetza_Security2_CountryAndSubregions { + Vanetza_Security2_UnCountryId_t countryOnly; + Vanetza_Security2_SequenceOfRegionAndSubregions_t regionAndSubregions; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CountryAndSubregions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CountryAndSubregions; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CountryAndSubregions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CountryAndSubregions_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CountryAndSubregions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CountryOnly.c b/vanetza/asn1/security/r2/CountryOnly.c new file mode 100644 index 000000000..232bf2c89 --- /dev/null +++ b/vanetza/asn1/security/r2/CountryOnly.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CountryOnly.h" + +int +Vanetza_Security2_CountryOnly_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_UnCountryId, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CountryOnly_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CountryOnly_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CountryOnly_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CountryOnly = { + "CountryOnly", + "CountryOnly", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_CountryOnly_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CountryOnly_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CountryOnly_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CountryOnly_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CountryOnly_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CountryOnly_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CountryOnly_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CountryOnly_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CountryOnly_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/CountryOnly.h b/vanetza/asn1/security/r2/CountryOnly.h new file mode 100644 index 000000000..3e27f2c59 --- /dev/null +++ b/vanetza/asn1/security/r2/CountryOnly.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CountryOnly_H_ +#define _Vanetza_Security2_CountryOnly_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UnCountryId.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CountryOnly */ +typedef Vanetza_Security2_UnCountryId_t Vanetza_Security2_CountryOnly_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CountryOnly; +asn_struct_free_f Vanetza_Security2_CountryOnly_free; +asn_struct_print_f Vanetza_Security2_CountryOnly_print; +asn_constr_check_f Vanetza_Security2_CountryOnly_constraint; +ber_type_decoder_f Vanetza_Security2_CountryOnly_decode_ber; +der_type_encoder_f Vanetza_Security2_CountryOnly_encode_der; +xer_type_decoder_f Vanetza_Security2_CountryOnly_decode_xer; +xer_type_encoder_f Vanetza_Security2_CountryOnly_encode_xer; +jer_type_encoder_f Vanetza_Security2_CountryOnly_encode_jer; +oer_type_decoder_f Vanetza_Security2_CountryOnly_decode_oer; +oer_type_encoder_f Vanetza_Security2_CountryOnly_encode_oer; +per_type_decoder_f Vanetza_Security2_CountryOnly_decode_uper; +per_type_encoder_f Vanetza_Security2_CountryOnly_encode_uper; +per_type_decoder_f Vanetza_Security2_CountryOnly_decode_aper; +per_type_encoder_f Vanetza_Security2_CountryOnly_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CountryOnly_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlContents.c b/vanetza/asn1/security/r2/CrlContents.c new file mode 100644 index 000000000..8e0641f15 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlContents.c @@ -0,0 +1,235 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlContents.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (1..1) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (1..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlContents_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, crlSeries), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CrlSeries, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crlSeries" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, crlCraca), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crlCraca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, issueDate), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "issueDate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, nextCrl), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nextCrl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, priorityInfo), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CrlPriorityInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "priorityInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlContents, typeSpecific), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_TypeSpecificCrlContents, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "typeSpecific" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlContents_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CrlContents_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* crlSeries */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* crlCraca */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* issueDate */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* nextCrl */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* priorityInfo */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* typeSpecific */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlContents_specs_1 = { + sizeof(struct Vanetza_Security2_CrlContents), + offsetof(struct Vanetza_Security2_CrlContents, _asn_ctx), + asn_MAP_Vanetza_Security2_CrlContents_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlContents = { + "CrlContents", + "CrlContents", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CrlContents_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlContents_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlContents_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlContents_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlContents_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlContents_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CrlContents_1, + 7, /* Elements count */ + &asn_SPC_Vanetza_Security2_CrlContents_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CrlContents.h b/vanetza/asn1/security/r2/CrlContents.h new file mode 100644 index 000000000..726d9320d --- /dev/null +++ b/vanetza/asn1/security/r2/CrlContents.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlContents_H_ +#define _Vanetza_Security2_CrlContents_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "CrlSeries.h" +#include "HashedId8.h" +#include "Time32.h" +#include "CrlPriorityInfo.h" +#include "TypeSpecificCrlContents.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlContents */ +typedef struct Vanetza_Security2_CrlContents { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_CrlSeries_t crlSeries; + Vanetza_Security2_HashedId8_t crlCraca; + Vanetza_Security2_Time32_t issueDate; + Vanetza_Security2_Time32_t nextCrl; + Vanetza_Security2_CrlPriorityInfo_t priorityInfo; + Vanetza_Security2_TypeSpecificCrlContents_t typeSpecific; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CrlContents_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlContents; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlContents_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlEntry.c b/vanetza/asn1/security/r2/CrlEntry.c new file mode 100644 index 000000000..9f48f4177 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlEntry.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlEntry.h" + +int +Vanetza_Security2_CrlEntry_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const Vanetza_Security2_HashedId8_t *st = (const Vanetza_Security2_HashedId8_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 == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_HashedId8, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CrlEntry_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CrlEntry_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlEntry = { + "CrlEntry", + "CrlEntry", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_CrlEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CrlEntry_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CrlEntry_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CrlEntry_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CrlEntry.h b/vanetza/asn1/security/r2/CrlEntry.h new file mode 100644 index 000000000..af890cff5 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlEntry.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlEntry_H_ +#define _Vanetza_Security2_CrlEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlEntry */ +typedef Vanetza_Security2_HashedId8_t Vanetza_Security2_CrlEntry_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CrlEntry_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlEntry; +asn_struct_free_f Vanetza_Security2_CrlEntry_free; +asn_struct_print_f Vanetza_Security2_CrlEntry_print; +asn_constr_check_f Vanetza_Security2_CrlEntry_constraint; +ber_type_decoder_f Vanetza_Security2_CrlEntry_decode_ber; +der_type_encoder_f Vanetza_Security2_CrlEntry_encode_der; +xer_type_decoder_f Vanetza_Security2_CrlEntry_decode_xer; +xer_type_encoder_f Vanetza_Security2_CrlEntry_encode_xer; +jer_type_encoder_f Vanetza_Security2_CrlEntry_encode_jer; +oer_type_decoder_f Vanetza_Security2_CrlEntry_decode_oer; +oer_type_encoder_f Vanetza_Security2_CrlEntry_encode_oer; +per_type_decoder_f Vanetza_Security2_CrlEntry_decode_uper; +per_type_encoder_f Vanetza_Security2_CrlEntry_encode_uper; +per_type_decoder_f Vanetza_Security2_CrlEntry_decode_aper; +per_type_encoder_f Vanetza_Security2_CrlEntry_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlInfoStatus.c b/vanetza/asn1/security/r2/CrlInfoStatus.c new file mode 100644 index 000000000..743de5854 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlInfoStatus.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlInfoStatus_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlInfoStatus, cracaId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cracaId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlInfoStatus, series), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CrlSeries, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "series" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlInfoStatus, issueDate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "issueDate" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CrlInfoStatus_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cracaId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* series */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* issueDate */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_CrlInfoStatus), + offsetof(struct Vanetza_Security2_CrlInfoStatus, _asn_ctx), + asn_MAP_Vanetza_Security2_CrlInfoStatus_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlInfoStatus = { + "CrlInfoStatus", + "CrlInfoStatus", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CrlInfoStatus_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_CrlInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CrlInfoStatus.h b/vanetza/asn1/security/r2/CrlInfoStatus.h new file mode 100644 index 000000000..c5079a6ef --- /dev/null +++ b/vanetza/asn1/security/r2/CrlInfoStatus.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlInfoStatus_H_ +#define _Vanetza_Security2_CrlInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "CrlSeries.h" +#include "Time32.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlInfoStatus */ +typedef struct Vanetza_Security2_CrlInfoStatus { + Vanetza_Security2_HashedId8_t cracaId; + Vanetza_Security2_CrlSeries_t series; + Vanetza_Security2_Time32_t issueDate; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CrlInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlInfoStatus; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlInfoStatus_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlPriorityInfo.c b/vanetza/asn1/security/r2/CrlPriorityInfo.c new file mode 100644 index 000000000..0d231ed4e --- /dev/null +++ b/vanetza/asn1/security/r2/CrlPriorityInfo.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlPriorityInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlPriorityInfo_1[] = { + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_CrlPriorityInfo, priority), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "priority" + }, +}; +static const int asn_MAP_Vanetza_Security2_CrlPriorityInfo_oms_1[] = { 0 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CrlPriorityInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* priority */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlPriorityInfo_specs_1 = { + sizeof(struct Vanetza_Security2_CrlPriorityInfo), + offsetof(struct Vanetza_Security2_CrlPriorityInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_CrlPriorityInfo_tag2el_1, + 1, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_CrlPriorityInfo_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlPriorityInfo = { + "CrlPriorityInfo", + "CrlPriorityInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlPriorityInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CrlPriorityInfo_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_CrlPriorityInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CrlPriorityInfo.h b/vanetza/asn1/security/r2/CrlPriorityInfo.h new file mode 100644 index 000000000..dbf9cc6d8 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlPriorityInfo.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlPriorityInfo_H_ +#define _Vanetza_Security2_CrlPriorityInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlPriorityInfo */ +typedef struct Vanetza_Security2_CrlPriorityInfo { + Vanetza_Security2_Uint8_t *priority; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CrlPriorityInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlPriorityInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlPriorityInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlPriorityInfo_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlPriorityInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlPsid.c b/vanetza/asn1/security/r2/CrlPsid.c new file mode 100644 index 000000000..2c195ed2d --- /dev/null +++ b/vanetza/asn1/security/r2/CrlPsid.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Crl" + * found in "build.asn1/ieee/IEEE1609dot2crl.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlPsid.h" + +int +Vanetza_Security2_CrlPsid_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value == 256L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Psid, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CrlPsid_constr_1 CC_NOTUSED = { + { 2, 1 } /* (256..256) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_CrlPsid_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 256, 256 } /* (256..256) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlPsid_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlPsid = { + "CrlPsid", + "CrlPsid", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_CrlPsid_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlPsid_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlPsid_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlPsid_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CrlPsid_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CrlPsid_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CrlPsid_constraint + }, + 0, 0, /* No members */ + &asn_SPC_Vanetza_Security2_Psid_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CrlPsid.h b/vanetza/asn1/security/r2/CrlPsid.h new file mode 100644 index 000000000..b58d6a658 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlPsid.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Crl" + * found in "build.asn1/ieee/IEEE1609dot2crl.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlPsid_H_ +#define _Vanetza_Security2_CrlPsid_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlPsid */ +typedef Vanetza_Security2_Psid_t Vanetza_Security2_CrlPsid_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlPsid; +asn_struct_free_f Vanetza_Security2_CrlPsid_free; +asn_struct_print_f Vanetza_Security2_CrlPsid_print; +asn_constr_check_f Vanetza_Security2_CrlPsid_constraint; +ber_type_decoder_f Vanetza_Security2_CrlPsid_decode_ber; +der_type_encoder_f Vanetza_Security2_CrlPsid_encode_der; +xer_type_decoder_f Vanetza_Security2_CrlPsid_decode_xer; +xer_type_encoder_f Vanetza_Security2_CrlPsid_encode_xer; +jer_type_encoder_f Vanetza_Security2_CrlPsid_encode_jer; +oer_type_decoder_f Vanetza_Security2_CrlPsid_decode_oer; +oer_type_encoder_f Vanetza_Security2_CrlPsid_encode_oer; +per_type_decoder_f Vanetza_Security2_CrlPsid_decode_uper; +per_type_encoder_f Vanetza_Security2_CrlPsid_encode_uper; +per_type_decoder_f Vanetza_Security2_CrlPsid_decode_aper; +per_type_encoder_f Vanetza_Security2_CrlPsid_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlPsid_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlSeries.c b/vanetza/asn1/security/r2/CrlSeries.c new file mode 100644 index 000000000..fae537483 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlSeries.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlSeries.h" + +int +Vanetza_Security2_CrlSeries_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Uint16, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CrlSeries_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CrlSeries_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlSeries_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlSeries = { + "CrlSeries", + "CrlSeries", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_CrlSeries_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlSeries_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlSeries_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlSeries_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlSeries_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlSeries_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CrlSeries_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CrlSeries_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CrlSeries_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/CrlSeries.h b/vanetza/asn1/security/r2/CrlSeries.h new file mode 100644 index 000000000..84ef43ecc --- /dev/null +++ b/vanetza/asn1/security/r2/CrlSeries.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlSeries_H_ +#define _Vanetza_Security2_CrlSeries_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlSeries */ +typedef Vanetza_Security2_Uint16_t Vanetza_Security2_CrlSeries_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CrlSeries_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlSeries; +asn_struct_free_f Vanetza_Security2_CrlSeries_free; +asn_struct_print_f Vanetza_Security2_CrlSeries_print; +asn_constr_check_f Vanetza_Security2_CrlSeries_constraint; +ber_type_decoder_f Vanetza_Security2_CrlSeries_decode_ber; +der_type_encoder_f Vanetza_Security2_CrlSeries_encode_der; +xer_type_decoder_f Vanetza_Security2_CrlSeries_decode_xer; +xer_type_encoder_f Vanetza_Security2_CrlSeries_encode_xer; +jer_type_encoder_f Vanetza_Security2_CrlSeries_encode_jer; +oer_type_decoder_f Vanetza_Security2_CrlSeries_decode_oer; +oer_type_encoder_f Vanetza_Security2_CrlSeries_encode_oer; +per_type_decoder_f Vanetza_Security2_CrlSeries_decode_uper; +per_type_encoder_f Vanetza_Security2_CrlSeries_encode_uper; +per_type_decoder_f Vanetza_Security2_CrlSeries_decode_aper; +per_type_encoder_f Vanetza_Security2_CrlSeries_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlSeries_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CrlSignerSsp.c b/vanetza/asn1/security/r2/CrlSignerSsp.c new file mode 100644 index 000000000..28f128285 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlSignerSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CrlSignerSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlSignerSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CrlSignerSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CrlSignerSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlSignerSsp_specs_1 = { + sizeof(struct Vanetza_Security2_CrlSignerSsp), + offsetof(struct Vanetza_Security2_CrlSignerSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_CrlSignerSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlSignerSsp = { + "CrlSignerSsp", + "CrlSignerSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CrlSignerSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CrlSignerSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_CrlSignerSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CrlSignerSsp.h b/vanetza/asn1/security/r2/CrlSignerSsp.h new file mode 100644 index 000000000..65bf1b722 --- /dev/null +++ b/vanetza/asn1/security/r2/CrlSignerSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CrlSignerSsp_H_ +#define _Vanetza_Security2_CrlSignerSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CrlSignerSsp */ +typedef struct Vanetza_Security2_CrlSignerSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CrlSignerSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CrlSignerSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CrlSignerSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CrlSignerSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CrlSignerSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlCommand.c b/vanetza/asn1/security/r2/CtlCommand.c new file mode 100644 index 000000000..63736e182 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlCommand.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlCommand.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlCommand_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlCommand_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlCommand_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlCommand, choice.add), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "add" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlCommand, choice.Delete), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlDelete, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "delete" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CtlCommand_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* add */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* delete */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CtlCommand_specs_1 = { + sizeof(struct Vanetza_Security2_CtlCommand), + offsetof(struct Vanetza_Security2_CtlCommand, _asn_ctx), + offsetof(struct Vanetza_Security2_CtlCommand, present), + sizeof(((struct Vanetza_Security2_CtlCommand *)0)->present), + asn_MAP_Vanetza_Security2_CtlCommand_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlCommand = { + "CtlCommand", + "CtlCommand", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlCommand_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlCommand_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_CtlCommand_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlCommand_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlCommand.h b/vanetza/asn1/security/r2/CtlCommand.h new file mode 100644 index 000000000..47e57adc6 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlCommand.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlCommand_H_ +#define _Vanetza_Security2_CtlCommand_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlEntry.h" +#include "CtlDelete.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CtlCommand_PR { + Vanetza_Security2_CtlCommand_PR_NOTHING, /* No components present */ + Vanetza_Security2_CtlCommand_PR_add, + Vanetza_Security2_CtlCommand_PR_delete + /* Extensions may appear below */ + +} Vanetza_Security2_CtlCommand_PR; + +/* Vanetza_Security2_CtlCommand */ +typedef struct Vanetza_Security2_CtlCommand { + Vanetza_Security2_CtlCommand_PR present; + union Vanetza_Security2_CtlCommand_u { + Vanetza_Security2_CtlEntry_t add; + Vanetza_Security2_CtlDelete_t Delete; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CtlCommand_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlCommand; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CtlCommand_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlCommand_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlCommand_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlCommand_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlDelete.c b/vanetza/asn1/security/r2/CtlDelete.c new file mode 100644 index 000000000..2cafdbcba --- /dev/null +++ b/vanetza/asn1/security/r2/CtlDelete.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlDelete.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlDelete_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlDelete_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlDelete_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlDelete, choice.cert), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cert" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlDelete, choice.dc), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_DcDelete, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "dc" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CtlDelete_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cert */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* dc */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CtlDelete_specs_1 = { + sizeof(struct Vanetza_Security2_CtlDelete), + offsetof(struct Vanetza_Security2_CtlDelete, _asn_ctx), + offsetof(struct Vanetza_Security2_CtlDelete, present), + sizeof(((struct Vanetza_Security2_CtlDelete *)0)->present), + asn_MAP_Vanetza_Security2_CtlDelete_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlDelete = { + "CtlDelete", + "CtlDelete", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlDelete_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlDelete_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_CtlDelete_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlDelete_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlDelete.h b/vanetza/asn1/security/r2/CtlDelete.h new file mode 100644 index 000000000..79284ce76 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlDelete.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlDelete_H_ +#define _Vanetza_Security2_CtlDelete_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "DcDelete.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CtlDelete_PR { + Vanetza_Security2_CtlDelete_PR_NOTHING, /* No components present */ + Vanetza_Security2_CtlDelete_PR_cert, + Vanetza_Security2_CtlDelete_PR_dc + /* Extensions may appear below */ + +} Vanetza_Security2_CtlDelete_PR; + +/* Vanetza_Security2_CtlDelete */ +typedef struct Vanetza_Security2_CtlDelete { + Vanetza_Security2_CtlDelete_PR present; + union Vanetza_Security2_CtlDelete_u { + Vanetza_Security2_HashedId8_t cert; + Vanetza_Security2_DcDelete_t dc; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CtlDelete_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlDelete; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CtlDelete_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlDelete_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlDelete_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlDelete_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlElectorEntry.c b/vanetza/asn1/security/r2/CtlElectorEntry.c new file mode 100644 index 000000000..ea70860cc --- /dev/null +++ b/vanetza/asn1/security/r2/CtlElectorEntry.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlElectorEntry.h" + +int +Vanetza_Security2_CtlElectorEntry_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const Vanetza_Security2_HashedId48_t *st = (const Vanetza_Security2_HashedId48_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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_HashedId48, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlElectorEntry_constr_1 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlElectorEntry_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlElectorEntry = { + "CtlElectorEntry", + "CtlElectorEntry", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlElectorEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlElectorEntry_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlElectorEntry_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CtlElectorEntry_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlElectorEntry.h b/vanetza/asn1/security/r2/CtlElectorEntry.h new file mode 100644 index 000000000..1f49df25e --- /dev/null +++ b/vanetza/asn1/security/r2/CtlElectorEntry.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlElectorEntry_H_ +#define _Vanetza_Security2_CtlElectorEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId48.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CtlElectorEntry */ +typedef Vanetza_Security2_HashedId48_t Vanetza_Security2_CtlElectorEntry_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlElectorEntry_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlElectorEntry; +asn_struct_free_f Vanetza_Security2_CtlElectorEntry_free; +asn_struct_print_f Vanetza_Security2_CtlElectorEntry_print; +asn_constr_check_f Vanetza_Security2_CtlElectorEntry_constraint; +ber_type_decoder_f Vanetza_Security2_CtlElectorEntry_decode_ber; +der_type_encoder_f Vanetza_Security2_CtlElectorEntry_encode_der; +xer_type_decoder_f Vanetza_Security2_CtlElectorEntry_decode_xer; +xer_type_encoder_f Vanetza_Security2_CtlElectorEntry_encode_xer; +jer_type_encoder_f Vanetza_Security2_CtlElectorEntry_encode_jer; +oer_type_decoder_f Vanetza_Security2_CtlElectorEntry_decode_oer; +oer_type_encoder_f Vanetza_Security2_CtlElectorEntry_encode_oer; +per_type_decoder_f Vanetza_Security2_CtlElectorEntry_decode_uper; +per_type_encoder_f Vanetza_Security2_CtlElectorEntry_encode_uper; +per_type_decoder_f Vanetza_Security2_CtlElectorEntry_decode_aper; +per_type_encoder_f Vanetza_Security2_CtlElectorEntry_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlElectorEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlEntry.c b/vanetza/asn1/security/r2/CtlEntry.c new file mode 100644 index 000000000..8c64b07da --- /dev/null +++ b/vanetza/asn1/security/r2/CtlEntry.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlEntry.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlEntry_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlEntry_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlEntry, choice.rca), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RootCaEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlEntry, choice.ea), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EaEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ea" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlEntry, choice.aa), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AaEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aa" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlEntry, choice.dc), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_DcEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "dc" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlEntry, choice.tlm), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_TlmEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tlm" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CtlEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rca */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ea */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* aa */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* dc */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* tlm */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CtlEntry_specs_1 = { + sizeof(struct Vanetza_Security2_CtlEntry), + offsetof(struct Vanetza_Security2_CtlEntry, _asn_ctx), + offsetof(struct Vanetza_Security2_CtlEntry, present), + sizeof(((struct Vanetza_Security2_CtlEntry *)0)->present), + asn_MAP_Vanetza_Security2_CtlEntry_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 5 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlEntry = { + "CtlEntry", + "CtlEntry", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlEntry_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlEntry_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_CtlEntry_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlEntry.h b/vanetza/asn1/security/r2/CtlEntry.h new file mode 100644 index 000000000..12331d420 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlEntry.h @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlEntry_H_ +#define _Vanetza_Security2_CtlEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "RootCaEntry.h" +#include "EaEntry.h" +#include "AaEntry.h" +#include "DcEntry.h" +#include "TlmEntry.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_CtlEntry_PR { + Vanetza_Security2_CtlEntry_PR_NOTHING, /* No components present */ + Vanetza_Security2_CtlEntry_PR_rca, + Vanetza_Security2_CtlEntry_PR_ea, + Vanetza_Security2_CtlEntry_PR_aa, + Vanetza_Security2_CtlEntry_PR_dc, + Vanetza_Security2_CtlEntry_PR_tlm + /* Extensions may appear below */ + +} Vanetza_Security2_CtlEntry_PR; + +/* Vanetza_Security2_CtlEntry */ +typedef struct Vanetza_Security2_CtlEntry { + Vanetza_Security2_CtlEntry_PR present; + union Vanetza_Security2_CtlEntry_u { + Vanetza_Security2_RootCaEntry_t rca; + Vanetza_Security2_EaEntry_t ea; + Vanetza_Security2_AaEntry_t aa; + Vanetza_Security2_DcEntry_t dc; + Vanetza_Security2_TlmEntry_t tlm; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CtlEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlEntry; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_CtlEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlEntry_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlEntry_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlFormat.c b/vanetza/asn1/security/r2/CtlFormat.c new file mode 100644 index 000000000..c2ee50f8f --- /dev/null +++ b/vanetza/asn1/security/r2/CtlFormat.c @@ -0,0 +1,252 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlFormat.h" + +static int +memb_Vanetza_Security2_ctlSequence_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_ctlSequence_constr_5 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_ctlSequence_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_ctlCommands_6[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Vanetza_Security2_CtlCommand, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ctlCommands_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_ctlCommands_specs_6 = { + sizeof(struct Vanetza_Security2_CtlFormat__ctlCommands), + offsetof(struct Vanetza_Security2_CtlFormat__ctlCommands, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ctlCommands_6 = { + "ctlCommands", + "ctlCommands", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_ctlCommands_tags_6, + sizeof(asn_DEF_Vanetza_Security2_ctlCommands_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_ctlCommands_tags_6[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_ctlCommands_tags_6, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ctlCommands_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_ctlCommands_tags_6[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_ctlCommands_6, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_ctlCommands_specs_6 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlFormat_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlFormat, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Version, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlFormat, nextUpdate), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nextUpdate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlFormat, isFullCtl), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BOOLEAN, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "isFullCtl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlFormat, ctlSequence), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_ctlSequence_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_ctlSequence_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_ctlSequence_constraint_1 + }, + 0, 0, /* No default value */ + "ctlSequence" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlFormat, ctlCommands), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_ctlCommands_6, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ctlCommands" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlFormat_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CtlFormat_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nextUpdate */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* isFullCtl */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ctlSequence */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ctlCommands */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CtlFormat_specs_1 = { + sizeof(struct Vanetza_Security2_CtlFormat), + offsetof(struct Vanetza_Security2_CtlFormat, _asn_ctx), + asn_MAP_Vanetza_Security2_CtlFormat_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlFormat = { + "CtlFormat", + "CtlFormat", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CtlFormat_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlFormat_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlFormat_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlFormat_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlFormat_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlFormat_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CtlFormat_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlFormat_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlFormat.h b/vanetza/asn1/security/r2/CtlFormat.h new file mode 100644 index 000000000..58c03f55a --- /dev/null +++ b/vanetza/asn1/security/r2/CtlFormat.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlFormat_H_ +#define _Vanetza_Security2_CtlFormat_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Version.h" +#include "Time32.h" +#include "BOOLEAN.h" +#include "NativeInteger.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CtlCommand; + +/* Vanetza_Security2_CtlFormat */ +typedef struct Vanetza_Security2_CtlFormat { + Vanetza_Security2_Version_t version; + Vanetza_Security2_Time32_t nextUpdate; + BOOLEAN_t isFullCtl; + long ctlSequence; + struct Vanetza_Security2_CtlFormat__ctlCommands { + A_SEQUENCE_OF(struct Vanetza_Security2_CtlCommand) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } ctlCommands; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CtlFormat_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlFormat; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CtlFormat_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlFormat_1[5]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CtlCommand.h" + +#endif /* _Vanetza_Security2_CtlFormat_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlInfoStatus.c b/vanetza/asn1/security/r2/CtlInfoStatus.c new file mode 100644 index 000000000..36f561c44 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlInfoStatus.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlInfoStatus_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlInfoStatus, ctlSeriesId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlSeriesId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ctlSeriesId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlInfoStatus, sequenceNumber), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlSequenceNumber, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sequenceNumber" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_CtlInfoStatus, lastUpdate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "lastUpdate" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_CtlInfoStatus_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ctlSeriesId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sequenceNumber */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* lastUpdate */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CtlInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_CtlInfoStatus), + offsetof(struct Vanetza_Security2_CtlInfoStatus, _asn_ctx), + asn_MAP_Vanetza_Security2_CtlInfoStatus_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlInfoStatus = { + "CtlInfoStatus", + "CtlInfoStatus", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_CtlInfoStatus_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlInfoStatus.h b/vanetza/asn1/security/r2/CtlInfoStatus.h new file mode 100644 index 000000000..cb1018e5c --- /dev/null +++ b/vanetza/asn1/security/r2/CtlInfoStatus.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlInfoStatus_H_ +#define _Vanetza_Security2_CtlInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlSeriesId.h" +#include "CtlSequenceNumber.h" +#include "Time32.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CtlInfoStatus */ +typedef struct Vanetza_Security2_CtlInfoStatus { + Vanetza_Security2_CtlSeriesId_t ctlSeriesId; + Vanetza_Security2_CtlSequenceNumber_t sequenceNumber; + Vanetza_Security2_Time32_t lastUpdate; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_CtlInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlInfoStatus; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_CtlInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_CtlInfoStatus_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlRootCaEntry.c b/vanetza/asn1/security/r2/CtlRootCaEntry.c new file mode 100644 index 000000000..a937dd27c --- /dev/null +++ b/vanetza/asn1/security/r2/CtlRootCaEntry.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlRootCaEntry.h" + +int +Vanetza_Security2_CtlRootCaEntry_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const Vanetza_Security2_HashedId32_t *st = (const Vanetza_Security2_HashedId32_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_HashedId32, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlRootCaEntry_constr_1 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlRootCaEntry_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlRootCaEntry = { + "CtlRootCaEntry", + "CtlRootCaEntry", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlRootCaEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlRootCaEntry_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlRootCaEntry_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CtlRootCaEntry_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlRootCaEntry.h b/vanetza/asn1/security/r2/CtlRootCaEntry.h new file mode 100644 index 000000000..5623cc7b7 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlRootCaEntry.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlRootCaEntry_H_ +#define _Vanetza_Security2_CtlRootCaEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId32.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CtlRootCaEntry */ +typedef Vanetza_Security2_HashedId32_t Vanetza_Security2_CtlRootCaEntry_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlRootCaEntry_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlRootCaEntry; +asn_struct_free_f Vanetza_Security2_CtlRootCaEntry_free; +asn_struct_print_f Vanetza_Security2_CtlRootCaEntry_print; +asn_constr_check_f Vanetza_Security2_CtlRootCaEntry_constraint; +ber_type_decoder_f Vanetza_Security2_CtlRootCaEntry_decode_ber; +der_type_encoder_f Vanetza_Security2_CtlRootCaEntry_encode_der; +xer_type_decoder_f Vanetza_Security2_CtlRootCaEntry_decode_xer; +xer_type_encoder_f Vanetza_Security2_CtlRootCaEntry_encode_xer; +jer_type_encoder_f Vanetza_Security2_CtlRootCaEntry_encode_jer; +oer_type_decoder_f Vanetza_Security2_CtlRootCaEntry_decode_oer; +oer_type_encoder_f Vanetza_Security2_CtlRootCaEntry_encode_oer; +per_type_decoder_f Vanetza_Security2_CtlRootCaEntry_decode_uper; +per_type_encoder_f Vanetza_Security2_CtlRootCaEntry_encode_uper; +per_type_decoder_f Vanetza_Security2_CtlRootCaEntry_decode_aper; +per_type_encoder_f Vanetza_Security2_CtlRootCaEntry_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlRootCaEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlSequenceNumber.c b/vanetza/asn1/security/r2/CtlSequenceNumber.c new file mode 100644 index 000000000..ec9113a27 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlSequenceNumber.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlSequenceNumber.h" + +int +Vanetza_Security2_CtlSequenceNumber_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlSequenceNumber_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlSequenceNumber_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlSequenceNumber = { + "CtlSequenceNumber", + "CtlSequenceNumber", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlSequenceNumber_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlSequenceNumber_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlSequenceNumber_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CtlSequenceNumber_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/CtlSequenceNumber.h b/vanetza/asn1/security/r2/CtlSequenceNumber.h new file mode 100644 index 000000000..1bdde01ee --- /dev/null +++ b/vanetza/asn1/security/r2/CtlSequenceNumber.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlSequenceNumber_H_ +#define _Vanetza_Security2_CtlSequenceNumber_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CtlSequenceNumber */ +typedef long Vanetza_Security2_CtlSequenceNumber_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlSequenceNumber_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlSequenceNumber; +asn_struct_free_f Vanetza_Security2_CtlSequenceNumber_free; +asn_struct_print_f Vanetza_Security2_CtlSequenceNumber_print; +asn_constr_check_f Vanetza_Security2_CtlSequenceNumber_constraint; +ber_type_decoder_f Vanetza_Security2_CtlSequenceNumber_decode_ber; +der_type_encoder_f Vanetza_Security2_CtlSequenceNumber_encode_der; +xer_type_decoder_f Vanetza_Security2_CtlSequenceNumber_decode_xer; +xer_type_encoder_f Vanetza_Security2_CtlSequenceNumber_encode_xer; +jer_type_encoder_f Vanetza_Security2_CtlSequenceNumber_encode_jer; +oer_type_decoder_f Vanetza_Security2_CtlSequenceNumber_decode_oer; +oer_type_encoder_f Vanetza_Security2_CtlSequenceNumber_encode_oer; +per_type_decoder_f Vanetza_Security2_CtlSequenceNumber_decode_uper; +per_type_encoder_f Vanetza_Security2_CtlSequenceNumber_encode_uper; +per_type_decoder_f Vanetza_Security2_CtlSequenceNumber_decode_aper; +per_type_encoder_f Vanetza_Security2_CtlSequenceNumber_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlSequenceNumber_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlSeriesId.c b/vanetza/asn1/security/r2/CtlSeriesId.c new file mode 100644 index 000000000..08fb7ec87 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlSeriesId.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlSeriesId.h" + +int +Vanetza_Security2_CtlSeriesId_constraint(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 == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlSeriesId_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlSeriesId_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlSeriesId = { + "CtlSeriesId", + "CtlSeriesId", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlSeriesId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlSeriesId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlSeriesId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CtlSeriesId_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlSeriesId.h b/vanetza/asn1/security/r2/CtlSeriesId.h new file mode 100644 index 000000000..9cbc696b2 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlSeriesId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlSeriesId_H_ +#define _Vanetza_Security2_CtlSeriesId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CtlSeriesId */ +typedef OCTET_STRING_t Vanetza_Security2_CtlSeriesId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlSeriesId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlSeriesId; +asn_struct_free_f Vanetza_Security2_CtlSeriesId_free; +asn_struct_print_f Vanetza_Security2_CtlSeriesId_print; +asn_constr_check_f Vanetza_Security2_CtlSeriesId_constraint; +ber_type_decoder_f Vanetza_Security2_CtlSeriesId_decode_ber; +der_type_encoder_f Vanetza_Security2_CtlSeriesId_encode_der; +xer_type_decoder_f Vanetza_Security2_CtlSeriesId_decode_xer; +xer_type_encoder_f Vanetza_Security2_CtlSeriesId_encode_xer; +jer_type_encoder_f Vanetza_Security2_CtlSeriesId_encode_jer; +oer_type_decoder_f Vanetza_Security2_CtlSeriesId_decode_oer; +oer_type_encoder_f Vanetza_Security2_CtlSeriesId_encode_oer; +per_type_decoder_f Vanetza_Security2_CtlSeriesId_decode_uper; +per_type_encoder_f Vanetza_Security2_CtlSeriesId_encode_uper; +per_type_decoder_f Vanetza_Security2_CtlSeriesId_decode_aper; +per_type_encoder_f Vanetza_Security2_CtlSeriesId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlSeriesId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/CtlSignatureSpdu.c b/vanetza/asn1/security/r2/CtlSignatureSpdu.c new file mode 100644 index 000000000..a82b3a662 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlSignatureSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "CtlSignatureSpdu.h" + +int +Vanetza_Security2_CtlSignatureSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_CtlSignatureSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlSignatureSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlSignatureSpdu = { + "CtlSignatureSpdu", + "CtlSignatureSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_CtlSignatureSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_CtlSignatureSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_CtlSignatureSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_CtlSignatureSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/CtlSignatureSpdu.h b/vanetza/asn1/security/r2/CtlSignatureSpdu.h new file mode 100644 index 000000000..8b9a62969 --- /dev/null +++ b/vanetza/asn1/security/r2/CtlSignatureSpdu.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_CtlSignatureSpdu_H_ +#define _Vanetza_Security2_CtlSignatureSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_CtlSignatureSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_CtlSignatureSpdu_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_CtlSignatureSpdu_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_CtlSignatureSpdu; +asn_struct_free_f Vanetza_Security2_CtlSignatureSpdu_free; +asn_struct_print_f Vanetza_Security2_CtlSignatureSpdu_print; +asn_constr_check_f Vanetza_Security2_CtlSignatureSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_CtlSignatureSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_CtlSignatureSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_CtlSignatureSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_CtlSignatureSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_CtlSignatureSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_CtlSignatureSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_CtlSignatureSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_CtlSignatureSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_CtlSignatureSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_CtlSignatureSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_CtlSignatureSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_CtlSignatureSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/DcDelete.c b/vanetza/asn1/security/r2/DcDelete.c new file mode 100644 index 000000000..d8a4e7c1a --- /dev/null +++ b/vanetza/asn1/security/r2/DcDelete.c @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "DcDelete.h" + +/* + * This type is implemented using Vanetza_Security2_Url, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_DcDelete_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER character map necessary */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_DcDelete_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcDelete = { + "DcDelete", + "DcDelete", + &asn_OP_IA5String, + asn_DEF_Vanetza_Security2_DcDelete_tags_1, + sizeof(asn_DEF_Vanetza_Security2_DcDelete_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcDelete_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_DcDelete_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_DcDelete_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcDelete_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + IA5String_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/DcDelete.h b/vanetza/asn1/security/r2/DcDelete.h new file mode 100644 index 000000000..e9962f64b --- /dev/null +++ b/vanetza/asn1/security/r2/DcDelete.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_DcDelete_H_ +#define _Vanetza_Security2_DcDelete_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Url.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_DcDelete */ +typedef Vanetza_Security2_Url_t Vanetza_Security2_DcDelete_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_DcDelete_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcDelete; +asn_struct_free_f Vanetza_Security2_DcDelete_free; +asn_struct_print_f Vanetza_Security2_DcDelete_print; +asn_constr_check_f Vanetza_Security2_DcDelete_constraint; +ber_type_decoder_f Vanetza_Security2_DcDelete_decode_ber; +der_type_encoder_f Vanetza_Security2_DcDelete_encode_der; +xer_type_decoder_f Vanetza_Security2_DcDelete_decode_xer; +xer_type_encoder_f Vanetza_Security2_DcDelete_encode_xer; +jer_type_encoder_f Vanetza_Security2_DcDelete_encode_jer; +oer_type_decoder_f Vanetza_Security2_DcDelete_decode_oer; +oer_type_encoder_f Vanetza_Security2_DcDelete_encode_oer; +per_type_decoder_f Vanetza_Security2_DcDelete_decode_uper; +per_type_encoder_f Vanetza_Security2_DcDelete_encode_uper; +per_type_decoder_f Vanetza_Security2_DcDelete_decode_aper; +per_type_encoder_f Vanetza_Security2_DcDelete_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_DcDelete_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/DcEntry.c b/vanetza/asn1/security/r2/DcEntry.c new file mode 100644 index 000000000..426f78779 --- /dev/null +++ b/vanetza/asn1/security/r2/DcEntry.c @@ -0,0 +1,152 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "DcEntry.h" + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_cert_3[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_cert_tags_3[] = { + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_cert_specs_3 = { + sizeof(struct Vanetza_Security2_DcEntry__cert), + offsetof(struct Vanetza_Security2_DcEntry__cert, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_cert_3 = { + "cert", + "cert", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_cert_tags_3, + sizeof(asn_DEF_Vanetza_Security2_cert_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_cert_tags_3[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_cert_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_cert_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_cert_tags_3[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_cert_3, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_cert_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_DcEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_DcEntry, url), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Url, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "url" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_DcEntry, cert), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + 0, + &asn_DEF_Vanetza_Security2_cert_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cert" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_DcEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_DcEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* url */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* cert */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_DcEntry_specs_1 = { + sizeof(struct Vanetza_Security2_DcEntry), + offsetof(struct Vanetza_Security2_DcEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_DcEntry_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_Vanetza_Security2_DcEntry = { + "DcEntry", + "DcEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_DcEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_DcEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_DcEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_DcEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_DcEntry_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_DcEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/DcEntry.h b/vanetza/asn1/security/r2/DcEntry.h new file mode 100644 index 000000000..3a9295b56 --- /dev/null +++ b/vanetza/asn1/security/r2/DcEntry.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_DcEntry_H_ +#define _Vanetza_Security2_DcEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Url.h" +#include "HashedId8.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_DcEntry */ +typedef struct Vanetza_Security2_DcEntry { + Vanetza_Security2_Url_t url; + struct Vanetza_Security2_DcEntry__cert { + A_SEQUENCE_OF(Vanetza_Security2_HashedId8_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } cert; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_DcEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_DcEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_DcEntry_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_DcEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/DcSsp.c b/vanetza/asn1/security/r2/DcSsp.c new file mode 100644 index 000000000..047e26fca --- /dev/null +++ b/vanetza/asn1/security/r2/DcSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "DcSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_DcSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_DcSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_DcSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_DcSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_DcSsp_specs_1 = { + sizeof(struct Vanetza_Security2_DcSsp), + offsetof(struct Vanetza_Security2_DcSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_DcSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcSsp = { + "DcSsp", + "DcSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_DcSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_DcSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_DcSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_DcSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_DcSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_DcSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/DcSsp.h b/vanetza/asn1/security/r2/DcSsp.h new file mode 100644 index 000000000..df990ec85 --- /dev/null +++ b/vanetza/asn1/security/r2/DcSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_DcSsp_H_ +#define _Vanetza_Security2_DcSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_DcSsp */ +typedef struct Vanetza_Security2_DcSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_DcSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_DcSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_DcSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_DcSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/DcmSsp.c b/vanetza/asn1/security/r2/DcmSsp.c new file mode 100644 index 000000000..b1eb946d5 --- /dev/null +++ b/vanetza/asn1/security/r2/DcmSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "DcmSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_DcmSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_DcmSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_DcmSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_DcmSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_DcmSsp_specs_1 = { + sizeof(struct Vanetza_Security2_DcmSsp), + offsetof(struct Vanetza_Security2_DcmSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_DcmSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcmSsp = { + "DcmSsp", + "DcmSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_DcmSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_DcmSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcmSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_DcmSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_DcmSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DcmSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_DcmSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_DcmSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/DcmSsp.h b/vanetza/asn1/security/r2/DcmSsp.h new file mode 100644 index 000000000..ef62d4f4e --- /dev/null +++ b/vanetza/asn1/security/r2/DcmSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_DcmSsp_H_ +#define _Vanetza_Security2_DcmSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_DcmSsp */ +typedef struct Vanetza_Security2_DcmSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_DcmSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DcmSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_DcmSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_DcmSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_DcmSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/DeltaCtl.c b/vanetza/asn1/security/r2/DeltaCtl.c new file mode 100644 index 000000000..f5ae5a673 --- /dev/null +++ b/vanetza/asn1/security/r2/DeltaCtl.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "DeltaCtl.h" + +int +Vanetza_Security2_DeltaCtl_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 Vanetza_Security2_CtlFormat, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_DeltaCtl_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_DeltaCtl_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_DeltaCtl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DeltaCtl = { + "DeltaCtl", + "DeltaCtl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_DeltaCtl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_DeltaCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DeltaCtl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_DeltaCtl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_DeltaCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_DeltaCtl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_DeltaCtl_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_DeltaCtl_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_DeltaCtl_constraint + }, + asn_MBR_Vanetza_Security2_CtlFormat_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlFormat_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/DeltaCtl.h b/vanetza/asn1/security/r2/DeltaCtl.h new file mode 100644 index 000000000..6398e4043 --- /dev/null +++ b/vanetza/asn1/security/r2/DeltaCtl.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_DeltaCtl_H_ +#define _Vanetza_Security2_DeltaCtl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlFormat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_DeltaCtl */ +typedef Vanetza_Security2_CtlFormat_t Vanetza_Security2_DeltaCtl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_DeltaCtl; +asn_struct_free_f Vanetza_Security2_DeltaCtl_free; +asn_struct_print_f Vanetza_Security2_DeltaCtl_print; +asn_constr_check_f Vanetza_Security2_DeltaCtl_constraint; +ber_type_decoder_f Vanetza_Security2_DeltaCtl_decode_ber; +der_type_encoder_f Vanetza_Security2_DeltaCtl_encode_der; +xer_type_decoder_f Vanetza_Security2_DeltaCtl_decode_xer; +xer_type_encoder_f Vanetza_Security2_DeltaCtl_encode_xer; +jer_type_encoder_f Vanetza_Security2_DeltaCtl_encode_jer; +oer_type_decoder_f Vanetza_Security2_DeltaCtl_decode_oer; +oer_type_encoder_f Vanetza_Security2_DeltaCtl_encode_oer; +per_type_decoder_f Vanetza_Security2_DeltaCtl_decode_uper; +per_type_encoder_f Vanetza_Security2_DeltaCtl_encode_uper; +per_type_decoder_f Vanetza_Security2_DeltaCtl_decode_aper; +per_type_encoder_f Vanetza_Security2_DeltaCtl_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_DeltaCtl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Duration.c b/vanetza/asn1/security/r2/Duration.c new file mode 100644 index 000000000..2eec7029e --- /dev/null +++ b/vanetza/asn1/security/r2/Duration.c @@ -0,0 +1,207 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Duration.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Duration_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Duration_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 3, 3, 0, 6 } /* (0..6) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_Duration_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.microseconds), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "microseconds" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.milliseconds), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "milliseconds" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.seconds), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "seconds" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.minutes), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "minutes" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.hours), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "hours" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.sixtyHours), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sixtyHours" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Duration, choice.years), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "years" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_Duration_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* microseconds */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* milliseconds */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* seconds */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* minutes */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* hours */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* sixtyHours */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* years */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_Duration_specs_1 = { + sizeof(struct Vanetza_Security2_Duration), + offsetof(struct Vanetza_Security2_Duration, _asn_ctx), + offsetof(struct Vanetza_Security2_Duration, present), + sizeof(((struct Vanetza_Security2_Duration *)0)->present), + asn_MAP_Vanetza_Security2_Duration_tag2el_1, + 7, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Duration = { + "Duration", + "Duration", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Duration_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Duration_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_Duration_1, + 7, /* Elements count */ + &asn_SPC_Vanetza_Security2_Duration_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Duration.h b/vanetza/asn1/security/r2/Duration.h new file mode 100644 index 000000000..43ab3e445 --- /dev/null +++ b/vanetza/asn1/security/r2/Duration.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Duration_H_ +#define _Vanetza_Security2_Duration_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_Duration_PR { + Vanetza_Security2_Duration_PR_NOTHING, /* No components present */ + Vanetza_Security2_Duration_PR_microseconds, + Vanetza_Security2_Duration_PR_milliseconds, + Vanetza_Security2_Duration_PR_seconds, + Vanetza_Security2_Duration_PR_minutes, + Vanetza_Security2_Duration_PR_hours, + Vanetza_Security2_Duration_PR_sixtyHours, + Vanetza_Security2_Duration_PR_years +} Vanetza_Security2_Duration_PR; + +/* Vanetza_Security2_Duration */ +typedef struct Vanetza_Security2_Duration { + Vanetza_Security2_Duration_PR present; + union Vanetza_Security2_Duration_u { + Vanetza_Security2_Uint16_t microseconds; + Vanetza_Security2_Uint16_t milliseconds; + Vanetza_Security2_Uint16_t seconds; + Vanetza_Security2_Uint16_t minutes; + Vanetza_Security2_Uint16_t hours; + Vanetza_Security2_Uint16_t sixtyHours; + Vanetza_Security2_Uint16_t years; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_Duration_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Duration; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_Duration_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_Duration_1[7]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Duration_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Duration_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EXTERNAL.c b/vanetza/asn1/security/r2/EXTERNAL.c new file mode 100644 index 000000000..041d6390b --- /dev/null +++ b/vanetza/asn1/security/r2/EXTERNAL.c @@ -0,0 +1,255 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "ASN1C-UsefulInformationObjectClasses" + * found in "/usr/local/share/asn1c/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EXTERNAL.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_encoding_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_encoding_constr_5 CC_NOTUSED = { + { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_encoding_5[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EXTERNAL__encoding, choice.single_ASN1_type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_ANY, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "single-ASN1-type" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EXTERNAL__encoding, choice.octet_aligned), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "octet-aligned" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EXTERNAL__encoding, choice.arbitrary), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "arbitrary" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_encoding_tag2el_5[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* single-ASN1-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* octet-aligned */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* arbitrary */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_encoding_specs_5 = { + sizeof(struct Vanetza_Security2_EXTERNAL__encoding), + offsetof(struct Vanetza_Security2_EXTERNAL__encoding, _asn_ctx), + offsetof(struct Vanetza_Security2_EXTERNAL__encoding, present), + sizeof(((struct Vanetza_Security2_EXTERNAL__encoding *)0)->present), + asn_MAP_Vanetza_Security2_encoding_tag2el_5, + 3, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_encoding_5 = { + "encoding", + "encoding", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_encoding_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_encoding_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_encoding_5, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_encoding_specs_5 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_EXTERNAL_1[] = { + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_EXTERNAL, direct_reference), + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), + 0, + &asn_DEF_OBJECT_IDENTIFIER, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "direct-reference" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_EXTERNAL, indirect_reference), + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "indirect-reference" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EXTERNAL, data_value_descriptor), + (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), + 0, + &asn_DEF_ObjectDescriptor, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "data-value-descriptor" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EXTERNAL, encoding), + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Vanetza_Security2_encoding_5, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encoding" + }, +}; +static const int asn_MAP_Vanetza_Security2_EXTERNAL_oms_1[] = { 0, 1, 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EXTERNAL_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (8 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EXTERNAL_tag2el_1[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, 0, 0 }, /* indirect-reference */ + { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)), 0, 0, 0 }, /* direct-reference */ + { (ASN_TAG_CLASS_UNIVERSAL | (7 << 2)), 2, 0, 0 }, /* data-value-descriptor */ + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* single-ASN1-type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* octet-aligned */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 } /* arbitrary */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EXTERNAL_specs_1 = { + sizeof(struct Vanetza_Security2_EXTERNAL), + offsetof(struct Vanetza_Security2_EXTERNAL, _asn_ctx), + asn_MAP_Vanetza_Security2_EXTERNAL_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EXTERNAL_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EXTERNAL = { + "EXTERNAL", + "EXTERNAL", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EXTERNAL_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EXTERNAL_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EXTERNAL_tags_1[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_EXTERNAL_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EXTERNAL_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EXTERNAL_tags_1[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EXTERNAL_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_EXTERNAL_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EXTERNAL.h b/vanetza/asn1/security/r2/EXTERNAL.h new file mode 100644 index 000000000..276d6b46b --- /dev/null +++ b/vanetza/asn1/security/r2/EXTERNAL.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "ASN1C-UsefulInformationObjectClasses" + * found in "/usr/local/share/asn1c/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EXTERNAL_H_ +#define _Vanetza_Security2_EXTERNAL_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OBJECT_IDENTIFIER.h" +#include "NativeInteger.h" +#include "ObjectDescriptor.h" +#include "ANY.h" +#include "OCTET_STRING.h" +#include "BIT_STRING.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EXTERNAL__encoding_PR { + Vanetza_Security2_EXTERNAL__encoding_PR_NOTHING, /* No components present */ + Vanetza_Security2_EXTERNAL__encoding_PR_single_ASN1_type, + Vanetza_Security2_EXTERNAL__encoding_PR_octet_aligned, + Vanetza_Security2_EXTERNAL__encoding_PR_arbitrary +} Vanetza_Security2_EXTERNAL__encoding_PR; + +/* Vanetza_Security2_EXTERNAL */ +typedef struct Vanetza_Security2_EXTERNAL { + OBJECT_IDENTIFIER_t *direct_reference; /* OPTIONAL */ + long *indirect_reference; /* OPTIONAL */ + ObjectDescriptor_t *data_value_descriptor; /* OPTIONAL */ + struct Vanetza_Security2_EXTERNAL__encoding { + Vanetza_Security2_EXTERNAL__encoding_PR present; + union Vanetza_Security2_EXTERNAL__Vanetza_Security2_encoding_u { + ANY_t single_ASN1_type; + OCTET_STRING_t octet_aligned; + BIT_STRING_t arbitrary; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } encoding; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EXTERNAL_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EXTERNAL; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EXTERNAL_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EaEntry.c b/vanetza/asn1/security/r2/EaEntry.c new file mode 100644 index 000000000..3aa96cd16 --- /dev/null +++ b/vanetza/asn1/security/r2/EaEntry.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EaEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EaEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EaEntry, eaCertificate), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eaCertificate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EaEntry, aaAccessPoint), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Url, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aaAccessPoint" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EaEntry, itsAccessPoint), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Url, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "itsAccessPoint" + }, +}; +static const int asn_MAP_Vanetza_Security2_EaEntry_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EaEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EaEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eaCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aaAccessPoint */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* itsAccessPoint */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EaEntry_specs_1 = { + sizeof(struct Vanetza_Security2_EaEntry), + offsetof(struct Vanetza_Security2_EaEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_EaEntry_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EaEntry_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EaEntry = { + "EaEntry", + "EaEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EaEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EaEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EaEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EaEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EaEntry_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_EaEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EaEntry.h b/vanetza/asn1/security/r2/EaEntry.h new file mode 100644 index 000000000..d9682b62e --- /dev/null +++ b/vanetza/asn1/security/r2/EaEntry.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EaEntry_H_ +#define _Vanetza_Security2_EaEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Certificate.h" +#include "Url.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EaEntry */ +typedef struct Vanetza_Security2_EaEntry { + Vanetza_Security2_EtsiTs103097Certificate_t eaCertificate; + Vanetza_Security2_Url_t aaAccessPoint; + Vanetza_Security2_Url_t *itsAccessPoint; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EaEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EaEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EaEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EaEntry_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EaEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcSignature.c b/vanetza/asn1/security/r2/EcSignature.c new file mode 100644 index 000000000..2936580b1 --- /dev/null +++ b/vanetza/asn1/security/r2/EcSignature.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcSignature.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EcSignature_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EcSignature_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcSignature_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcSignature, choice.encryptedEcSignature), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptedEcSignature" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcSignature, choice.ecSignature), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecSignature" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcSignature_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* encryptedEcSignature */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ecSignature */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EcSignature_specs_1 = { + sizeof(struct Vanetza_Security2_EcSignature), + offsetof(struct Vanetza_Security2_EcSignature, _asn_ctx), + offsetof(struct Vanetza_Security2_EcSignature, present), + sizeof(((struct Vanetza_Security2_EcSignature *)0)->present), + asn_MAP_Vanetza_Security2_EcSignature_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcSignature = { + "EcSignature", + "EcSignature", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EcSignature_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EcSignature_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EcSignature_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcSignature_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcSignature.h b/vanetza/asn1/security/r2/EcSignature.h new file mode 100644 index 000000000..c70c1c376 --- /dev/null +++ b/vanetza/asn1/security/r2/EcSignature.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcSignature_H_ +#define _Vanetza_Security2_EcSignature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted.h" +#include "EtsiTs103097Data-SignedExternalPayload.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EcSignature_PR { + Vanetza_Security2_EcSignature_PR_NOTHING, /* No components present */ + Vanetza_Security2_EcSignature_PR_encryptedEcSignature, + Vanetza_Security2_EcSignature_PR_ecSignature +} Vanetza_Security2_EcSignature_PR; + +/* Vanetza_Security2_EcSignature */ +typedef struct Vanetza_Security2_EcSignature { + Vanetza_Security2_EcSignature_PR present; + union Vanetza_Security2_EcSignature_u { + Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_t encryptedEcSignature; + Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_t ecSignature; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcSignature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcSignature; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EcSignature_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcSignature_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EcSignature_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcSignature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcaEeCertResponse.c b/vanetza/asn1/security/r2/EcaEeCertResponse.c new file mode 100644 index 000000000..6a44824ea --- /dev/null +++ b/vanetza/asn1/security/r2/EcaEeCertResponse.c @@ -0,0 +1,254 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcaEeCertResponse.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_privateKeyInfo_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_privateKeyInfo_constr_7 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_privateKeyInfo_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcaEeCertResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeCertResponse, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeCertResponse, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeCertResponse, requestHash), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeCertResponse, ecaCertChain), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecaCertChain" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeCertResponse, certificate), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificate" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EcaEeCertResponse, privateKeyInfo), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_privateKeyInfo_constr_7, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_privateKeyInfo_constr_7, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_privateKeyInfo_constraint_1 + }, + 0, 0, /* No default value */ + "privateKeyInfo" + }, +}; +static const int asn_MAP_Vanetza_Security2_EcaEeCertResponse_oms_1[] = { 5 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcaEeCertResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ecaCertChain */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* certificate */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* privateKeyInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcaEeCertResponse_specs_1 = { + sizeof(struct Vanetza_Security2_EcaEeCertResponse), + offsetof(struct Vanetza_Security2_EcaEeCertResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_EcaEeCertResponse_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EcaEeCertResponse_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaEeCertResponse = { + "EcaEeCertResponse", + "EcaEeCertResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EcaEeCertResponse_1, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcaEeCertResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcaEeCertResponse.h b/vanetza/asn1/security/r2/EcaEeCertResponse.h new file mode 100644 index 000000000..4d13c0d23 --- /dev/null +++ b/vanetza/asn1/security/r2/EcaEeCertResponse.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcaEeCertResponse_H_ +#define _Vanetza_Security2_EcaEeCertResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "HashedId8.h" +#include "SequenceOfCertificate.h" +#include "Certificate.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcaEeCertResponse */ +typedef struct Vanetza_Security2_EcaEeCertResponse { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_HashedId8_t requestHash; + Vanetza_Security2_SequenceOfCertificate_t ecaCertChain; + Vanetza_Security2_Certificate_t certificate; + OCTET_STRING_t *privateKeyInfo; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcaEeCertResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaEeCertResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcaEeCertResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcaEeCertResponse_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcaEeCertResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcaEeCertResponseSpdu.c b/vanetza/asn1/security/r2/EcaEeCertResponseSpdu.c new file mode 100644 index 000000000..1b98c2eb4 --- /dev/null +++ b/vanetza/asn1/security/r2/EcaEeCertResponseSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcaEeCertResponseSpdu.h" + +int +Vanetza_Security2_EcaEeCertResponseSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EcaEeCertResponseSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EcaEeCertResponseSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu = { + "EcaEeCertResponseSpdu", + "EcaEeCertResponseSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EcaEeCertResponseSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EcaEeCertResponseSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EcaEeCertResponseSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcaEeCertResponseSpdu.h b/vanetza/asn1/security/r2/EcaEeCertResponseSpdu.h new file mode 100644 index 000000000..21410cac9 --- /dev/null +++ b/vanetza/asn1/security/r2/EcaEeCertResponseSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcaEeCertResponseSpdu_H_ +#define _Vanetza_Security2_EcaEeCertResponseSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcaEeCertResponseSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_EcaEeCertResponseSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaEeCertResponseSpdu; +asn_struct_free_f Vanetza_Security2_EcaEeCertResponseSpdu_free; +asn_struct_print_f Vanetza_Security2_EcaEeCertResponseSpdu_print; +asn_constr_check_f Vanetza_Security2_EcaEeCertResponseSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EcaEeCertResponseSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EcaEeCertResponseSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EcaEeCertResponseSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EcaEeCertResponseSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EcaEeCertResponseSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EcaEeCertResponseSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EcaEeCertResponseSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EcaEeCertResponseSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EcaEeCertResponseSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EcaEeCertResponseSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EcaEeCertResponseSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcaEeCertResponseSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcaEeInterfacePdu.c b/vanetza/asn1/security/r2/EcaEeInterfacePdu.c new file mode 100644 index 000000000..5c66c8a2f --- /dev/null +++ b/vanetza/asn1/security/r2/EcaEeInterfacePdu.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcaEeInterfacePdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EcaEeInterfacePdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EcaEeInterfacePdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcaEeInterfacePdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeInterfacePdu, choice.eeEcaCertRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeEcaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eeEcaCertRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaEeInterfacePdu, choice.ecaEeCertResponse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcaEeCertResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecaEeCertResponse" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcaEeInterfacePdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eeEcaCertRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ecaEeCertResponse */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EcaEeInterfacePdu_specs_1 = { + sizeof(struct Vanetza_Security2_EcaEeInterfacePdu), + offsetof(struct Vanetza_Security2_EcaEeInterfacePdu, _asn_ctx), + offsetof(struct Vanetza_Security2_EcaEeInterfacePdu, present), + sizeof(((struct Vanetza_Security2_EcaEeInterfacePdu *)0)->present), + asn_MAP_Vanetza_Security2_EcaEeInterfacePdu_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaEeInterfacePdu = { + "EcaEeInterfacePdu", + "EcaEeInterfacePdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EcaEeInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EcaEeInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EcaEeInterfacePdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcaEeInterfacePdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcaEeInterfacePdu.h b/vanetza/asn1/security/r2/EcaEeInterfacePdu.h new file mode 100644 index 000000000..fcb1c4091 --- /dev/null +++ b/vanetza/asn1/security/r2/EcaEeInterfacePdu.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcaEeInterfacePdu_H_ +#define _Vanetza_Security2_EcaEeInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EeEcaCertRequest.h" +#include "EcaEeCertResponse.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EcaEeInterfacePdu_PR { + Vanetza_Security2_EcaEeInterfacePdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_EcaEeInterfacePdu_PR_eeEcaCertRequest, + Vanetza_Security2_EcaEeInterfacePdu_PR_ecaEeCertResponse + /* Extensions may appear below */ + +} Vanetza_Security2_EcaEeInterfacePdu_PR; + +/* Vanetza_Security2_EcaEeInterfacePdu */ +typedef struct Vanetza_Security2_EcaEeInterfacePdu { + Vanetza_Security2_EcaEeInterfacePdu_PR present; + union Vanetza_Security2_EcaEeInterfacePdu_u { + Vanetza_Security2_EeEcaCertRequest_t eeEcaCertRequest; + Vanetza_Security2_EcaEeCertResponse_t ecaEeCertResponse; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcaEeInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaEeInterfacePdu; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EcaEeInterfacePdu_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcaEeInterfacePdu_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EcaEeInterfacePdu_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcaEeInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcaSsp.c b/vanetza/asn1/security/r2/EcaSsp.c new file mode 100644 index 000000000..f452decec --- /dev/null +++ b/vanetza/asn1/security/r2/EcaSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_EcaSsp), + offsetof(struct Vanetza_Security2_EcaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_EcaSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaSsp = { + "EcaSsp", + "EcaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EcaSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcaSsp.h b/vanetza/asn1/security/r2/EcaSsp.h new file mode 100644 index 000000000..8c4322830 --- /dev/null +++ b/vanetza/asn1/security/r2/EcaSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcaSsp_H_ +#define _Vanetza_Security2_EcaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcaSsp */ +typedef struct Vanetza_Security2_EcaSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcaSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EccP256CurvePoint.c b/vanetza/asn1/security/r2/EccP256CurvePoint.c new file mode 100644 index 000000000..d0b4a7314 --- /dev/null +++ b/vanetza/asn1/security/r2/EccP256CurvePoint.c @@ -0,0 +1,441 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EccP256CurvePoint.h" + +static int +memb_Vanetza_Security2_x_constraint_6(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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_y_constraint_6(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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_x_only_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_compressed_y_0_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_compressed_y_1_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_x_constr_7 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_x_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_y_constr_8 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_y_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_x_only_constr_2 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_x_only_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_compressed_y_0_constr_4 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_compressed_y_0_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_compressed_y_1_constr_5 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_compressed_y_1_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EccP256CurvePoint_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EccP256CurvePoint_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_uncompressedP256_6[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint__uncompressedP256, x), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_x_constr_7, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_x_constr_7, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_x_constraint_6 + }, + 0, 0, /* No default value */ + "x" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint__uncompressedP256, y), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_y_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_y_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_y_constraint_6 + }, + 0, 0, /* No default value */ + "y" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_uncompressedP256_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_uncompressedP256_tag2el_6[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* y */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_uncompressedP256_specs_6 = { + sizeof(struct Vanetza_Security2_EccP256CurvePoint__uncompressedP256), + offsetof(struct Vanetza_Security2_EccP256CurvePoint__uncompressedP256, _asn_ctx), + asn_MAP_Vanetza_Security2_uncompressedP256_tag2el_6, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_uncompressedP256_6 = { + "uncompressedP256", + "uncompressedP256", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_uncompressedP256_tags_6, + sizeof(asn_DEF_Vanetza_Security2_uncompressedP256_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_uncompressedP256_tags_6[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_uncompressedP256_tags_6, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_uncompressedP256_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_uncompressedP256_tags_6[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_uncompressedP256_6, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_uncompressedP256_specs_6 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EccP256CurvePoint_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint, choice.x_only), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_x_only_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_x_only_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_x_only_constraint_1 + }, + 0, 0, /* No default value */ + "x-only" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint, choice.fill), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "fill" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint, choice.compressed_y_0), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_compressed_y_0_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_compressed_y_0_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_compressed_y_0_constraint_1 + }, + 0, 0, /* No default value */ + "compressed-y-0" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint, choice.compressed_y_1), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_compressed_y_1_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_compressed_y_1_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_compressed_y_1_constraint_1 + }, + 0, 0, /* No default value */ + "compressed-y-1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP256CurvePoint, choice.uncompressedP256), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_uncompressedP256_6, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "uncompressedP256" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EccP256CurvePoint_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x-only */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* fill */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* compressed-y-0 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* compressed-y-1 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* uncompressedP256 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EccP256CurvePoint_specs_1 = { + sizeof(struct Vanetza_Security2_EccP256CurvePoint), + offsetof(struct Vanetza_Security2_EccP256CurvePoint, _asn_ctx), + offsetof(struct Vanetza_Security2_EccP256CurvePoint, present), + sizeof(((struct Vanetza_Security2_EccP256CurvePoint *)0)->present), + asn_MAP_Vanetza_Security2_EccP256CurvePoint_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EccP256CurvePoint = { + "EccP256CurvePoint", + "EccP256CurvePoint", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EccP256CurvePoint_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EccP256CurvePoint_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EccP256CurvePoint_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_EccP256CurvePoint_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EccP256CurvePoint.h b/vanetza/asn1/security/r2/EccP256CurvePoint.h new file mode 100644 index 000000000..3496c3d68 --- /dev/null +++ b/vanetza/asn1/security/r2/EccP256CurvePoint.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EccP256CurvePoint_H_ +#define _Vanetza_Security2_EccP256CurvePoint_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "NULL.h" +#include "constr_SEQUENCE.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EccP256CurvePoint_PR { + Vanetza_Security2_EccP256CurvePoint_PR_NOTHING, /* No components present */ + Vanetza_Security2_EccP256CurvePoint_PR_x_only, + Vanetza_Security2_EccP256CurvePoint_PR_fill, + Vanetza_Security2_EccP256CurvePoint_PR_compressed_y_0, + Vanetza_Security2_EccP256CurvePoint_PR_compressed_y_1, + Vanetza_Security2_EccP256CurvePoint_PR_uncompressedP256 +} Vanetza_Security2_EccP256CurvePoint_PR; + +/* Vanetza_Security2_EccP256CurvePoint */ +typedef struct Vanetza_Security2_EccP256CurvePoint { + Vanetza_Security2_EccP256CurvePoint_PR present; + union Vanetza_Security2_EccP256CurvePoint_u { + OCTET_STRING_t x_only; + NULL_t fill; + OCTET_STRING_t compressed_y_0; + OCTET_STRING_t compressed_y_1; + struct Vanetza_Security2_EccP256CurvePoint__uncompressedP256 { + OCTET_STRING_t x; + OCTET_STRING_t y; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } uncompressedP256; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EccP256CurvePoint_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EccP256CurvePoint; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EccP256CurvePoint_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EccP256CurvePoint_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EccP256CurvePoint_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EccP256CurvePoint_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EccP384CurvePoint.c b/vanetza/asn1/security/r2/EccP384CurvePoint.c new file mode 100644 index 000000000..52b8bf902 --- /dev/null +++ b/vanetza/asn1/security/r2/EccP384CurvePoint.c @@ -0,0 +1,441 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EccP384CurvePoint.h" + +static int +memb_Vanetza_Security2_x_constraint_6(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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_y_constraint_6(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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_x_only_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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_compressed_y_0_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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_compressed_y_1_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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_x_constr_7 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_x_constr_7 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_y_constr_8 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_y_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_x_only_constr_2 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_x_only_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_compressed_y_0_constr_4 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_compressed_y_0_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_compressed_y_1_constr_5 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_compressed_y_1_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EccP384CurvePoint_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EccP384CurvePoint_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_uncompressedP384_6[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint__uncompressedP384, x), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_x_constr_7, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_x_constr_7, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_x_constraint_6 + }, + 0, 0, /* No default value */ + "x" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint__uncompressedP384, y), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_y_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_y_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_y_constraint_6 + }, + 0, 0, /* No default value */ + "y" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_uncompressedP384_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_uncompressedP384_tag2el_6[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* y */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_uncompressedP384_specs_6 = { + sizeof(struct Vanetza_Security2_EccP384CurvePoint__uncompressedP384), + offsetof(struct Vanetza_Security2_EccP384CurvePoint__uncompressedP384, _asn_ctx), + asn_MAP_Vanetza_Security2_uncompressedP384_tag2el_6, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_uncompressedP384_6 = { + "uncompressedP384", + "uncompressedP384", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_uncompressedP384_tags_6, + sizeof(asn_DEF_Vanetza_Security2_uncompressedP384_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_uncompressedP384_tags_6[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_uncompressedP384_tags_6, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_uncompressedP384_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_uncompressedP384_tags_6[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_uncompressedP384_6, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_uncompressedP384_specs_6 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EccP384CurvePoint_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint, choice.x_only), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_x_only_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_x_only_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_x_only_constraint_1 + }, + 0, 0, /* No default value */ + "x-only" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint, choice.fill), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "fill" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint, choice.compressed_y_0), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_compressed_y_0_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_compressed_y_0_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_compressed_y_0_constraint_1 + }, + 0, 0, /* No default value */ + "compressed-y-0" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint, choice.compressed_y_1), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_compressed_y_1_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_compressed_y_1_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_compressed_y_1_constraint_1 + }, + 0, 0, /* No default value */ + "compressed-y-1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EccP384CurvePoint, choice.uncompressedP384), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_uncompressedP384_6, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "uncompressedP384" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EccP384CurvePoint_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x-only */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* fill */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* compressed-y-0 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* compressed-y-1 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* uncompressedP384 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EccP384CurvePoint_specs_1 = { + sizeof(struct Vanetza_Security2_EccP384CurvePoint), + offsetof(struct Vanetza_Security2_EccP384CurvePoint, _asn_ctx), + offsetof(struct Vanetza_Security2_EccP384CurvePoint, present), + sizeof(((struct Vanetza_Security2_EccP384CurvePoint *)0)->present), + asn_MAP_Vanetza_Security2_EccP384CurvePoint_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EccP384CurvePoint = { + "EccP384CurvePoint", + "EccP384CurvePoint", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EccP384CurvePoint_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EccP384CurvePoint_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EccP384CurvePoint_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_EccP384CurvePoint_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EccP384CurvePoint.h b/vanetza/asn1/security/r2/EccP384CurvePoint.h new file mode 100644 index 000000000..5a6e7fa83 --- /dev/null +++ b/vanetza/asn1/security/r2/EccP384CurvePoint.h @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EccP384CurvePoint_H_ +#define _Vanetza_Security2_EccP384CurvePoint_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "NULL.h" +#include "constr_SEQUENCE.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EccP384CurvePoint_PR { + Vanetza_Security2_EccP384CurvePoint_PR_NOTHING, /* No components present */ + Vanetza_Security2_EccP384CurvePoint_PR_x_only, + Vanetza_Security2_EccP384CurvePoint_PR_fill, + Vanetza_Security2_EccP384CurvePoint_PR_compressed_y_0, + Vanetza_Security2_EccP384CurvePoint_PR_compressed_y_1, + Vanetza_Security2_EccP384CurvePoint_PR_uncompressedP384 +} Vanetza_Security2_EccP384CurvePoint_PR; + +/* Vanetza_Security2_EccP384CurvePoint */ +typedef struct Vanetza_Security2_EccP384CurvePoint { + Vanetza_Security2_EccP384CurvePoint_PR present; + union Vanetza_Security2_EccP384CurvePoint_u { + OCTET_STRING_t x_only; + NULL_t fill; + OCTET_STRING_t compressed_y_0; + OCTET_STRING_t compressed_y_1; + struct Vanetza_Security2_EccP384CurvePoint__uncompressedP384 { + OCTET_STRING_t x; + OCTET_STRING_t y; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } uncompressedP384; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EccP384CurvePoint_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EccP384CurvePoint; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EccP384CurvePoint_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EccP384CurvePoint_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EccP384CurvePoint_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EccP384CurvePoint_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcdsaP256Signature.c b/vanetza/asn1/security/r2/EcdsaP256Signature.c new file mode 100644 index 000000000..811c4693e --- /dev/null +++ b/vanetza/asn1/security/r2/EcdsaP256Signature.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcdsaP256Signature.h" + +static int +memb_Vanetza_Security2_sSig_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_sSig_constr_3 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_sSig_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcdsaP256Signature_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcdsaP256Signature, rSig), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rSig" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcdsaP256Signature, sSig), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_sSig_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_sSig_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_sSig_constraint_1 + }, + 0, 0, /* No default value */ + "sSig" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcdsaP256Signature_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rSig */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sSig */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcdsaP256Signature_specs_1 = { + sizeof(struct Vanetza_Security2_EcdsaP256Signature), + offsetof(struct Vanetza_Security2_EcdsaP256Signature, _asn_ctx), + asn_MAP_Vanetza_Security2_EcdsaP256Signature_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_Vanetza_Security2_EcdsaP256Signature = { + "EcdsaP256Signature", + "EcdsaP256Signature", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcdsaP256Signature_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EcdsaP256Signature_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcdsaP256Signature_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcdsaP256Signature.h b/vanetza/asn1/security/r2/EcdsaP256Signature.h new file mode 100644 index 000000000..737b37d77 --- /dev/null +++ b/vanetza/asn1/security/r2/EcdsaP256Signature.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcdsaP256Signature_H_ +#define _Vanetza_Security2_EcdsaP256Signature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP256CurvePoint.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcdsaP256Signature */ +typedef struct Vanetza_Security2_EcdsaP256Signature { + Vanetza_Security2_EccP256CurvePoint_t rSig; + OCTET_STRING_t sSig; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcdsaP256Signature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcdsaP256Signature; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcdsaP256Signature_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcdsaP256Signature_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcdsaP256Signature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcdsaP384Signature.c b/vanetza/asn1/security/r2/EcdsaP384Signature.c new file mode 100644 index 000000000..7b538bc3a --- /dev/null +++ b/vanetza/asn1/security/r2/EcdsaP384Signature.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcdsaP384Signature.h" + +static int +memb_Vanetza_Security2_sSig_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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_sSig_constr_3 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_sSig_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcdsaP384Signature_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcdsaP384Signature, rSig), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP384CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rSig" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcdsaP384Signature, sSig), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_sSig_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_sSig_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_sSig_constraint_1 + }, + 0, 0, /* No default value */ + "sSig" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcdsaP384Signature_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rSig */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sSig */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcdsaP384Signature_specs_1 = { + sizeof(struct Vanetza_Security2_EcdsaP384Signature), + offsetof(struct Vanetza_Security2_EcdsaP384Signature, _asn_ctx), + asn_MAP_Vanetza_Security2_EcdsaP384Signature_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_Vanetza_Security2_EcdsaP384Signature = { + "EcdsaP384Signature", + "EcdsaP384Signature", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcdsaP384Signature_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EcdsaP384Signature_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcdsaP384Signature_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcdsaP384Signature.h b/vanetza/asn1/security/r2/EcdsaP384Signature.h new file mode 100644 index 000000000..238296b3d --- /dev/null +++ b/vanetza/asn1/security/r2/EcdsaP384Signature.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcdsaP384Signature_H_ +#define _Vanetza_Security2_EcdsaP384Signature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP384CurvePoint.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcdsaP384Signature */ +typedef struct Vanetza_Security2_EcdsaP384Signature { + Vanetza_Security2_EccP384CurvePoint_t rSig; + OCTET_STRING_t sSig; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcdsaP384Signature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcdsaP384Signature; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcdsaP384Signature_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcdsaP384Signature_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcdsaP384Signature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcencP256EncryptedKey.c b/vanetza/asn1/security/r2/EcencP256EncryptedKey.c new file mode 100644 index 000000000..42b9b114f --- /dev/null +++ b/vanetza/asn1/security/r2/EcencP256EncryptedKey.c @@ -0,0 +1,190 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcencP256EncryptedKey.h" + +static int +memb_Vanetza_Security2_c_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_t_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_c_constr_3 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_c_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_t_constr_4 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_t_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcencP256EncryptedKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcencP256EncryptedKey, v), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "v" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcencP256EncryptedKey, c), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_c_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_c_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_c_constraint_1 + }, + 0, 0, /* No default value */ + "c" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcencP256EncryptedKey, t), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_t_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_t_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_t_constraint_1 + }, + 0, 0, /* No default value */ + "t" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcencP256EncryptedKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* v */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* c */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* t */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcencP256EncryptedKey_specs_1 = { + sizeof(struct Vanetza_Security2_EcencP256EncryptedKey), + offsetof(struct Vanetza_Security2_EcencP256EncryptedKey, _asn_ctx), + asn_MAP_Vanetza_Security2_EcencP256EncryptedKey_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcencP256EncryptedKey = { + "EcencP256EncryptedKey", + "EcencP256EncryptedKey", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcencP256EncryptedKey_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EcencP256EncryptedKey_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcencP256EncryptedKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcencP256EncryptedKey.h b/vanetza/asn1/security/r2/EcencP256EncryptedKey.h new file mode 100644 index 000000000..19577b2c2 --- /dev/null +++ b/vanetza/asn1/security/r2/EcencP256EncryptedKey.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcencP256EncryptedKey_H_ +#define _Vanetza_Security2_EcencP256EncryptedKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP256CurvePoint.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcencP256EncryptedKey */ +typedef struct Vanetza_Security2_EcencP256EncryptedKey { + Vanetza_Security2_EccP256CurvePoint_t v; + OCTET_STRING_t c; + OCTET_STRING_t t; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcencP256EncryptedKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcencP256EncryptedKey; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcencP256EncryptedKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcencP256EncryptedKey_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcencP256EncryptedKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EciesP256EncryptedKey.c b/vanetza/asn1/security/r2/EciesP256EncryptedKey.c new file mode 100644 index 000000000..9798789ea --- /dev/null +++ b/vanetza/asn1/security/r2/EciesP256EncryptedKey.c @@ -0,0 +1,190 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EciesP256EncryptedKey.h" + +static int +memb_Vanetza_Security2_c_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_t_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_c_constr_3 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_c_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_t_constr_4 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_t_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EciesP256EncryptedKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EciesP256EncryptedKey, v), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "v" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EciesP256EncryptedKey, c), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_c_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_c_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_c_constraint_1 + }, + 0, 0, /* No default value */ + "c" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EciesP256EncryptedKey, t), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_t_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_t_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_t_constraint_1 + }, + 0, 0, /* No default value */ + "t" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EciesP256EncryptedKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* v */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* c */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* t */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EciesP256EncryptedKey_specs_1 = { + sizeof(struct Vanetza_Security2_EciesP256EncryptedKey), + offsetof(struct Vanetza_Security2_EciesP256EncryptedKey, _asn_ctx), + asn_MAP_Vanetza_Security2_EciesP256EncryptedKey_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EciesP256EncryptedKey = { + "EciesP256EncryptedKey", + "EciesP256EncryptedKey", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EciesP256EncryptedKey_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EciesP256EncryptedKey_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_EciesP256EncryptedKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EciesP256EncryptedKey.h b/vanetza/asn1/security/r2/EciesP256EncryptedKey.h new file mode 100644 index 000000000..d1f925ba3 --- /dev/null +++ b/vanetza/asn1/security/r2/EciesP256EncryptedKey.h @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EciesP256EncryptedKey_H_ +#define _Vanetza_Security2_EciesP256EncryptedKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP256CurvePoint.h" +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EciesP256EncryptedKey */ +typedef struct Vanetza_Security2_EciesP256EncryptedKey { + Vanetza_Security2_EccP256CurvePoint_t v; + OCTET_STRING_t c; + OCTET_STRING_t t; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EciesP256EncryptedKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EciesP256EncryptedKey; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EciesP256EncryptedKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EciesP256EncryptedKey_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EciesP256EncryptedKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EcsigP256Signature.c b/vanetza/asn1/security/r2/EcsigP256Signature.c new file mode 100644 index 000000000..dceaa23f7 --- /dev/null +++ b/vanetza/asn1/security/r2/EcsigP256Signature.c @@ -0,0 +1,169 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EcsigP256Signature.h" + +static int +memb_Vanetza_Security2_rSig_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_sSig_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_rSig_constr_2 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_rSig_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_sSig_constr_3 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_sSig_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcsigP256Signature_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcsigP256Signature, rSig), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_rSig_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_rSig_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_rSig_constraint_1 + }, + 0, 0, /* No default value */ + "rSig" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EcsigP256Signature, sSig), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_sSig_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_sSig_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_sSig_constraint_1 + }, + 0, 0, /* No default value */ + "sSig" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EcsigP256Signature_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rSig */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sSig */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcsigP256Signature_specs_1 = { + sizeof(struct Vanetza_Security2_EcsigP256Signature), + offsetof(struct Vanetza_Security2_EcsigP256Signature, _asn_ctx), + asn_MAP_Vanetza_Security2_EcsigP256Signature_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_Vanetza_Security2_EcsigP256Signature = { + "EcsigP256Signature", + "EcsigP256Signature", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EcsigP256Signature_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EcsigP256Signature_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EcsigP256Signature_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EcsigP256Signature.h b/vanetza/asn1/security/r2/EcsigP256Signature.h new file mode 100644 index 000000000..9438d5310 --- /dev/null +++ b/vanetza/asn1/security/r2/EcsigP256Signature.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EcsigP256Signature_H_ +#define _Vanetza_Security2_EcsigP256Signature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EcsigP256Signature */ +typedef struct Vanetza_Security2_EcsigP256Signature { + OCTET_STRING_t rSig; + OCTET_STRING_t sSig; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EcsigP256Signature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EcsigP256Signature; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EcsigP256Signature_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EcsigP256Signature_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EcsigP256Signature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeEcaCertRequest.c b/vanetza/asn1/security/r2/EeEcaCertRequest.c new file mode 100644 index 000000000..c65f7cf0c --- /dev/null +++ b/vanetza/asn1/security/r2/EeEcaCertRequest.c @@ -0,0 +1,226 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeEcaCertRequest.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_tbsCert_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_tbsCert_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_tbsCert_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeEcaCertRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeEcaCertRequest, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeEcaCertRequest, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeEcaCertRequest, type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "type" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeEcaCertRequest, tbsCert), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_tbsCert_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_tbsCert_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_tbsCert_constraint_1 + }, + 0, 0, /* No default value */ + "tbsCert" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EeEcaCertRequest, canonicalId), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_IA5String, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "canonicalId" + }, +}; +static const int asn_MAP_Vanetza_Security2_EeEcaCertRequest_oms_1[] = { 4 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EeEcaCertRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* tbsCert */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* canonicalId */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeEcaCertRequest_specs_1 = { + sizeof(struct Vanetza_Security2_EeEcaCertRequest), + offsetof(struct Vanetza_Security2_EeEcaCertRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_EeEcaCertRequest_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EeEcaCertRequest_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeEcaCertRequest = { + "EeEcaCertRequest", + "EeEcaCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EeEcaCertRequest_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_EeEcaCertRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeEcaCertRequest.h b/vanetza/asn1/security/r2/EeEcaCertRequest.h new file mode 100644 index 000000000..41cb92d6d --- /dev/null +++ b/vanetza/asn1/security/r2/EeEcaCertRequest.h @@ -0,0 +1,52 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EcaEeInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EcaEeInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeEcaCertRequest_H_ +#define _Vanetza_Security2_EeEcaCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "CertificateType.h" +#include "ToBeSignedCertificate.h" +#include "IA5String.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeEcaCertRequest */ +typedef struct Vanetza_Security2_EeEcaCertRequest { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_CertificateType_t type; + Vanetza_Security2_ToBeSignedCertificate_t tbsCert; + IA5String_t *canonicalId; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EeEcaCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeEcaCertRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeEcaCertRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeEcaCertRequest_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeEcaCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeEcaCertRequestSpdu.c b/vanetza/asn1/security/r2/EeEcaCertRequestSpdu.c new file mode 100644 index 000000000..f633f327f --- /dev/null +++ b/vanetza/asn1/security/r2/EeEcaCertRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeEcaCertRequestSpdu.h" + +int +Vanetza_Security2_EeEcaCertRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeEcaCertRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeEcaCertRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu = { + "EeEcaCertRequestSpdu", + "EeEcaCertRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeEcaCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeEcaCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeEcaCertRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeEcaCertRequestSpdu.h b/vanetza/asn1/security/r2/EeEcaCertRequestSpdu.h new file mode 100644 index 000000000..7e1b39f34 --- /dev/null +++ b/vanetza/asn1/security/r2/EeEcaCertRequestSpdu.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeEcaCertRequestSpdu_H_ +#define _Vanetza_Security2_EeEcaCertRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-SignedCertRequest.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeEcaCertRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_t Vanetza_Security2_EeEcaCertRequestSpdu_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeEcaCertRequestSpdu_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu; +asn_struct_free_f Vanetza_Security2_EeEcaCertRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_EeEcaCertRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_EeEcaCertRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeEcaCertRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeEcaCertRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeEcaCertRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeEcaCertRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeEcaCertRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeEcaCertRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeEcaCertRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeEcaCertRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeEcaCertRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeEcaCertRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeEcaCertRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeEcaCertRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeMaInterfacePdu.c b/vanetza/asn1/security/r2/EeMaInterfacePdu.c new file mode 100644 index 000000000..b33dd6894 --- /dev/null +++ b/vanetza/asn1/security/r2/EeMaInterfacePdu.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeMaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeMaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeMaInterfacePdu.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeMaInterfacePdu = { + "EeMaInterfacePdu", + "EeMaInterfacePdu", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeMaInterfacePdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/EeMaInterfacePdu.h b/vanetza/asn1/security/r2/EeMaInterfacePdu.h new file mode 100644 index 000000000..0d65aed19 --- /dev/null +++ b/vanetza/asn1/security/r2/EeMaInterfacePdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeMaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeMaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeMaInterfacePdu_H_ +#define _Vanetza_Security2_EeMaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeMaInterfacePdu */ +typedef NULL_t Vanetza_Security2_EeMaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeMaInterfacePdu; +asn_struct_free_f Vanetza_Security2_EeMaInterfacePdu_free; +asn_struct_print_f Vanetza_Security2_EeMaInterfacePdu_print; +asn_constr_check_f Vanetza_Security2_EeMaInterfacePdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeMaInterfacePdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeMaInterfacePdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeMaInterfacePdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeMaInterfacePdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeMaInterfacePdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeMaInterfacePdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeMaInterfacePdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeMaInterfacePdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeMaInterfacePdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeMaInterfacePdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeMaInterfacePdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeMaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.c b/vanetza/asn1/security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.c new file mode 100644 index 000000000..80f8c29b1 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRa1609Dot2AuthenticatedCertRequestSpdu.h" + +int +Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu = { + "EeRa1609Dot2AuthenticatedCertRequestSpdu", + "EeRa1609Dot2AuthenticatedCertRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.h b/vanetza/asn1/security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.h new file mode 100644 index 000000000..c42d21011 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRa1609Dot2AuthenticatedCertRequestSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_H_ +#define _Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-SignedEncryptedCertRequest.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_t Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu; +asn_struct_free_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRa1609Dot2AuthenticatedCertRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaCertRequest.c b/vanetza/asn1/security/r2/EeRaCertRequest.c new file mode 100644 index 000000000..7c22c3305 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaCertRequest.c @@ -0,0 +1,226 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaCertRequest.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_tbsCert_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_tbsCert_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_tbsCert_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeRaCertRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaCertRequest, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaCertRequest, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaCertRequest, type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "type" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaCertRequest, tbsCert), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_tbsCert_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_tbsCert_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_tbsCert_constraint_1 + }, + 0, 0, /* No default value */ + "tbsCert" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EeRaCertRequest, additionalParams), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AdditionalParams, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "additionalParams" + }, +}; +static const int asn_MAP_Vanetza_Security2_EeRaCertRequest_oms_1[] = { 4 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EeRaCertRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* tbsCert */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* additionalParams */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeRaCertRequest_specs_1 = { + sizeof(struct Vanetza_Security2_EeRaCertRequest), + offsetof(struct Vanetza_Security2_EeRaCertRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_EeRaCertRequest_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EeRaCertRequest_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaCertRequest = { + "EeRaCertRequest", + "EeRaCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EeRaCertRequest_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_EeRaCertRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaCertRequest.h b/vanetza/asn1/security/r2/EeRaCertRequest.h new file mode 100644 index 000000000..ef27193a7 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaCertRequest.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaCertRequest_H_ +#define _Vanetza_Security2_EeRaCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "CertificateType.h" +#include "ToBeSignedCertificate.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_AdditionalParams; + +/* Vanetza_Security2_EeRaCertRequest */ +typedef struct Vanetza_Security2_EeRaCertRequest { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_CertificateType_t type; + Vanetza_Security2_ToBeSignedCertificate_t tbsCert; + struct Vanetza_Security2_AdditionalParams *additionalParams; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EeRaCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaCertRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeRaCertRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeRaCertRequest_1[5]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "AdditionalParams.h" + +#endif /* _Vanetza_Security2_EeRaCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaCertRequestSpdu.c b/vanetza/asn1/security/r2/EeRaCertRequestSpdu.c new file mode 100644 index 000000000..75c3a856f --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaCertRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaCertRequestSpdu.h" + +int +Vanetza_Security2_EeRaCertRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRaCertRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaCertRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu = { + "EeRaCertRequestSpdu", + "EeRaCertRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRaCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRaCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeRaCertRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaCertRequestSpdu.h b/vanetza/asn1/security/r2/EeRaCertRequestSpdu.h new file mode 100644 index 000000000..46aa359f0 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaCertRequestSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaCertRequestSpdu_H_ +#define _Vanetza_Security2_EeRaCertRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRaCertRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_EeRaCertRequestSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaCertRequestSpdu; +asn_struct_free_f Vanetza_Security2_EeRaCertRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_EeRaCertRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_EeRaCertRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeRaCertRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeRaCertRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeRaCertRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeRaCertRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeRaCertRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeRaCertRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeRaCertRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeRaCertRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeRaCertRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeRaCertRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeRaCertRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaCertRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaDownloadRequest.c b/vanetza/asn1/security/r2/EeRaDownloadRequest.c new file mode 100644 index 000000000..ff93c8861 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaDownloadRequest.c @@ -0,0 +1,137 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaDownloadRequest.h" + +static int +memb_Vanetza_Security2_filename_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_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 = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 255UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_filename_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_filename_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeRaDownloadRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaDownloadRequest, generationTime), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaDownloadRequest, filename), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_UTF8String, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_filename_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_filename_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_filename_constraint_1 + }, + 0, 0, /* No default value */ + "filename" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EeRaDownloadRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* filename */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeRaDownloadRequest_specs_1 = { + sizeof(struct Vanetza_Security2_EeRaDownloadRequest), + offsetof(struct Vanetza_Security2_EeRaDownloadRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_EeRaDownloadRequest_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaDownloadRequest = { + "EeRaDownloadRequest", + "EeRaDownloadRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EeRaDownloadRequest_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EeRaDownloadRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaDownloadRequest.h b/vanetza/asn1/security/r2/EeRaDownloadRequest.h new file mode 100644 index 000000000..db39b728c --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaDownloadRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaDownloadRequest_H_ +#define _Vanetza_Security2_EeRaDownloadRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Time32.h" +#include "UTF8String.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRaDownloadRequest */ +typedef struct Vanetza_Security2_EeRaDownloadRequest { + Vanetza_Security2_Time32_t generationTime; + UTF8String_t filename; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EeRaDownloadRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaDownloadRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeRaDownloadRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeRaDownloadRequest_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaDownloadRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaDownloadRequestPlainSpdu.c b/vanetza/asn1/security/r2/EeRaDownloadRequestPlainSpdu.c new file mode 100644 index 000000000..60692fdc1 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaDownloadRequestPlainSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaDownloadRequestPlainSpdu.h" + +int +Vanetza_Security2_EeRaDownloadRequestPlainSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu = { + "EeRaDownloadRequestPlainSpdu", + "EeRaDownloadRequestPlainSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRaDownloadRequestPlainSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeRaDownloadRequestPlainSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaDownloadRequestPlainSpdu.h b/vanetza/asn1/security/r2/EeRaDownloadRequestPlainSpdu.h new file mode 100644 index 000000000..ad76a48f6 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaDownloadRequestPlainSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaDownloadRequestPlainSpdu_H_ +#define _Vanetza_Security2_EeRaDownloadRequestPlainSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRaDownloadRequestPlainSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t Vanetza_Security2_EeRaDownloadRequestPlainSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaDownloadRequestPlainSpdu; +asn_struct_free_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_free; +asn_struct_print_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_print; +asn_constr_check_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeRaDownloadRequestPlainSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaDownloadRequestPlainSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaDownloadRequestSpdu.c b/vanetza/asn1/security/r2/EeRaDownloadRequestSpdu.c new file mode 100644 index 000000000..9cb162976 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaDownloadRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaDownloadRequestSpdu.h" + +int +Vanetza_Security2_EeRaDownloadRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRaDownloadRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaDownloadRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu = { + "EeRaDownloadRequestSpdu", + "EeRaDownloadRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRaDownloadRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRaDownloadRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeRaDownloadRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaDownloadRequestSpdu.h b/vanetza/asn1/security/r2/EeRaDownloadRequestSpdu.h new file mode 100644 index 000000000..2797ae40c --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaDownloadRequestSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaDownloadRequestSpdu_H_ +#define _Vanetza_Security2_EeRaDownloadRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-SignedEncrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRaDownloadRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_t Vanetza_Security2_EeRaDownloadRequestSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaDownloadRequestSpdu; +asn_struct_free_f Vanetza_Security2_EeRaDownloadRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_EeRaDownloadRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_EeRaDownloadRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeRaDownloadRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaDownloadRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaInterfacePdu.c b/vanetza/asn1/security/r2/EeRaInterfacePdu.c new file mode 100644 index 000000000..c69c1456a --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaInterfacePdu.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaInterfacePdu.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRaInterfacePdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaInterfacePdu_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeRaInterfacePdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaInterfacePdu, choice.eeRaCertRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eeRaCertRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaInterfacePdu, choice.raEeCertAck), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaEeCertAck, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "raEeCertAck" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaInterfacePdu, choice.raEeCertInfo), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaEeCertInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "raEeCertInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaInterfacePdu, choice.eeRaDownloadRequest), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaDownloadRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eeRaDownloadRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeRaInterfacePdu, choice.eeRaSuccessorEnrollmentCertRequest), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeEcaCertRequestSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eeRaSuccessorEnrollmentCertRequest" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EeRaInterfacePdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eeRaCertRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* raEeCertAck */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* raEeCertInfo */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* eeRaDownloadRequest */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* eeRaSuccessorEnrollmentCertRequest */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EeRaInterfacePdu_specs_1 = { + sizeof(struct Vanetza_Security2_EeRaInterfacePdu), + offsetof(struct Vanetza_Security2_EeRaInterfacePdu, _asn_ctx), + offsetof(struct Vanetza_Security2_EeRaInterfacePdu, present), + sizeof(((struct Vanetza_Security2_EeRaInterfacePdu *)0)->present), + asn_MAP_Vanetza_Security2_EeRaInterfacePdu_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 5 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaInterfacePdu = { + "EeRaInterfacePdu", + "EeRaInterfacePdu", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRaInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRaInterfacePdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EeRaInterfacePdu_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_EeRaInterfacePdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaInterfacePdu.h b/vanetza/asn1/security/r2/EeRaInterfacePdu.h new file mode 100644 index 000000000..ec8726b7d --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaInterfacePdu.h @@ -0,0 +1,68 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaInterfacePdu_H_ +#define _Vanetza_Security2_EeRaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EeRaCertRequest.h" +#include "RaEeCertAck.h" +#include "RaEeCertInfo.h" +#include "EeRaDownloadRequest.h" +#include "EeEcaCertRequestSpdu.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EeRaInterfacePdu_PR { + Vanetza_Security2_EeRaInterfacePdu_PR_NOTHING, /* No components present */ + Vanetza_Security2_EeRaInterfacePdu_PR_eeRaCertRequest, + Vanetza_Security2_EeRaInterfacePdu_PR_raEeCertAck, + Vanetza_Security2_EeRaInterfacePdu_PR_raEeCertInfo, + Vanetza_Security2_EeRaInterfacePdu_PR_eeRaDownloadRequest, + Vanetza_Security2_EeRaInterfacePdu_PR_eeRaSuccessorEnrollmentCertRequest + /* Extensions may appear below */ + +} Vanetza_Security2_EeRaInterfacePdu_PR; + +/* Vanetza_Security2_EeRaInterfacePdu */ +typedef struct Vanetza_Security2_EeRaInterfacePdu { + Vanetza_Security2_EeRaInterfacePdu_PR present; + union Vanetza_Security2_EeRaInterfacePdu_u { + Vanetza_Security2_EeRaCertRequest_t eeRaCertRequest; + Vanetza_Security2_RaEeCertAck_t raEeCertAck; + Vanetza_Security2_RaEeCertInfo_t raEeCertInfo; + Vanetza_Security2_EeRaDownloadRequest_t eeRaDownloadRequest; + Vanetza_Security2_EeEcaCertRequestSpdu_t eeRaSuccessorEnrollmentCertRequest; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EeRaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaInterfacePdu; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EeRaInterfacePdu_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeRaInterfacePdu_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaInterfacePdu_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.c b/vanetza/asn1/security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.c new file mode 100644 index 000000000..faa8e7328 --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaSuccessorEnrollmentCertRequestSpdu.h" + +int +Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu = { + "EeRaSuccessorEnrollmentCertRequestSpdu", + "EeRaSuccessorEnrollmentCertRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.h b/vanetza/asn1/security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.h new file mode 100644 index 000000000..e7025b46c --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaSuccessorEnrollmentCertRequestSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_H_ +#define _Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-SignedEncryptedCertRequest.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_t Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu; +asn_struct_free_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaSuccessorEnrollmentCertRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeRaX509AuthenticatedCertRequestSpdu.c b/vanetza/asn1/security/r2/EeRaX509AuthenticatedCertRequestSpdu.c new file mode 100644 index 000000000..358821b2f --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaX509AuthenticatedCertRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeRaX509AuthenticatedCertRequestSpdu.h" + +int +Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu = { + "EeRaX509AuthenticatedCertRequestSpdu", + "EeRaX509AuthenticatedCertRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeRaX509AuthenticatedCertRequestSpdu.h b/vanetza/asn1/security/r2/EeRaX509AuthenticatedCertRequestSpdu.h new file mode 100644 index 000000000..6372f722d --- /dev/null +++ b/vanetza/asn1/security/r2/EeRaX509AuthenticatedCertRequestSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_H_ +#define _Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Encrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_t Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu; +asn_struct_free_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeRaX509AuthenticatedCertRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EeSsp.c b/vanetza/asn1/security/r2/EeSsp.c new file mode 100644 index 000000000..0aa71948e --- /dev/null +++ b/vanetza/asn1/security/r2/EeSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EeSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EeSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EeSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EeSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeSsp_specs_1 = { + sizeof(struct Vanetza_Security2_EeSsp), + offsetof(struct Vanetza_Security2_EeSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_EeSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeSsp = { + "EeSsp", + "EeSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EeSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EeSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EeSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EeSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EeSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EeSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_EeSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EeSsp.h b/vanetza/asn1/security/r2/EeSsp.h new file mode 100644 index 000000000..4d46a80ff --- /dev/null +++ b/vanetza/asn1/security/r2/EeSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EeSsp_H_ +#define _Vanetza_Security2_EeSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EeSsp */ +typedef struct Vanetza_Security2_EeSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EeSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EeSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EeSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EeSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EeSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ElectorSsp.c b/vanetza/asn1/security/r2/ElectorSsp.c new file mode 100644 index 000000000..e199a3b90 --- /dev/null +++ b/vanetza/asn1/security/r2/ElectorSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ElectorSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ElectorSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ElectorSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ElectorSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ElectorSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ElectorSsp_specs_1 = { + sizeof(struct Vanetza_Security2_ElectorSsp), + offsetof(struct Vanetza_Security2_ElectorSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_ElectorSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ElectorSsp = { + "ElectorSsp", + "ElectorSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ElectorSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ElectorSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ElectorSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ElectorSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ElectorSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ElectorSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ElectorSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_ElectorSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ElectorSsp.h b/vanetza/asn1/security/r2/ElectorSsp.h new file mode 100644 index 000000000..a7499c026 --- /dev/null +++ b/vanetza/asn1/security/r2/ElectorSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ElectorSsp_H_ +#define _Vanetza_Security2_ElectorSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ElectorSsp */ +typedef struct Vanetza_Security2_ElectorSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ElectorSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ElectorSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ElectorSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ElectorSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ElectorSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Elevation.c b/vanetza/asn1/security/r2/Elevation.c new file mode 100644 index 000000000..8a1e2d1a9 --- /dev/null +++ b/vanetza/asn1/security/r2/Elevation.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Elevation.h" + +int +Vanetza_Security2_Elevation_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Uint16, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Elevation_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Elevation_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Elevation_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Elevation = { + "Elevation", + "Elevation", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Elevation_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Elevation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Elevation_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Elevation_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Elevation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Elevation_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Elevation_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Elevation_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Elevation_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Elevation.h b/vanetza/asn1/security/r2/Elevation.h new file mode 100644 index 000000000..ca21a20f8 --- /dev/null +++ b/vanetza/asn1/security/r2/Elevation.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Elevation_H_ +#define _Vanetza_Security2_Elevation_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Elevation */ +typedef Vanetza_Security2_Uint16_t Vanetza_Security2_Elevation_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Elevation_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Elevation; +asn_struct_free_f Vanetza_Security2_Elevation_free; +asn_struct_print_f Vanetza_Security2_Elevation_print; +asn_constr_check_f Vanetza_Security2_Elevation_constraint; +ber_type_decoder_f Vanetza_Security2_Elevation_decode_ber; +der_type_encoder_f Vanetza_Security2_Elevation_encode_der; +xer_type_decoder_f Vanetza_Security2_Elevation_decode_xer; +xer_type_encoder_f Vanetza_Security2_Elevation_encode_xer; +jer_type_encoder_f Vanetza_Security2_Elevation_encode_jer; +oer_type_decoder_f Vanetza_Security2_Elevation_decode_oer; +oer_type_encoder_f Vanetza_Security2_Elevation_encode_oer; +per_type_decoder_f Vanetza_Security2_Elevation_decode_uper; +per_type_encoder_f Vanetza_Security2_Elevation_encode_uper; +per_type_decoder_f Vanetza_Security2_Elevation_decode_aper; +per_type_encoder_f Vanetza_Security2_Elevation_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Elevation_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EncryptedData.c b/vanetza/asn1/security/r2/EncryptedData.c new file mode 100644 index 000000000..ca0ff5edb --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptedData.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EncryptedData.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptedData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedData, recipients), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "recipients" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedData, ciphertext), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SymmetricCiphertext, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ciphertext" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EncryptedData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EncryptedData_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recipients */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ciphertext */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EncryptedData_specs_1 = { + sizeof(struct Vanetza_Security2_EncryptedData), + offsetof(struct Vanetza_Security2_EncryptedData, _asn_ctx), + asn_MAP_Vanetza_Security2_EncryptedData_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_Vanetza_Security2_EncryptedData = { + "EncryptedData", + "EncryptedData", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EncryptedData_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EncryptedData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EncryptedData_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EncryptedData_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EncryptedData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EncryptedData_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EncryptedData_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EncryptedData_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EncryptedData.h b/vanetza/asn1/security/r2/EncryptedData.h new file mode 100644 index 000000000..89d3690a7 --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptedData.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EncryptedData_H_ +#define _Vanetza_Security2_EncryptedData_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SequenceOfRecipientInfo.h" +#include "SymmetricCiphertext.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EncryptedData */ +typedef struct Vanetza_Security2_EncryptedData { + Vanetza_Security2_SequenceOfRecipientInfo_t recipients; + Vanetza_Security2_SymmetricCiphertext_t ciphertext; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EncryptedData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptedData; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EncryptedData_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptedData_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EncryptedData_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EncryptedDataEncryptionKey.c b/vanetza/asn1/security/r2/EncryptedDataEncryptionKey.c new file mode 100644 index 000000000..1d2ca7c28 --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptedDataEncryptionKey.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EncryptedDataEncryptionKey.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EncryptedDataEncryptionKey_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EncryptedDataEncryptionKey_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptedDataEncryptionKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedDataEncryptionKey, choice.eciesNistP256), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EciesP256EncryptedKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eciesNistP256" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedDataEncryptionKey, choice.eciesBrainpoolP256r1), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EciesP256EncryptedKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eciesBrainpoolP256r1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedDataEncryptionKey, choice.ecencSm2256), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcencP256EncryptedKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecencSm2256" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EncryptedDataEncryptionKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eciesNistP256 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eciesBrainpoolP256r1 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ecencSm2256 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EncryptedDataEncryptionKey_specs_1 = { + sizeof(struct Vanetza_Security2_EncryptedDataEncryptionKey), + offsetof(struct Vanetza_Security2_EncryptedDataEncryptionKey, _asn_ctx), + offsetof(struct Vanetza_Security2_EncryptedDataEncryptionKey, present), + sizeof(((struct Vanetza_Security2_EncryptedDataEncryptionKey *)0)->present), + asn_MAP_Vanetza_Security2_EncryptedDataEncryptionKey_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptedDataEncryptionKey = { + "EncryptedDataEncryptionKey", + "EncryptedDataEncryptionKey", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EncryptedDataEncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EncryptedDataEncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EncryptedDataEncryptionKey_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_EncryptedDataEncryptionKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EncryptedDataEncryptionKey.h b/vanetza/asn1/security/r2/EncryptedDataEncryptionKey.h new file mode 100644 index 000000000..273d0a9ff --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptedDataEncryptionKey.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EncryptedDataEncryptionKey_H_ +#define _Vanetza_Security2_EncryptedDataEncryptionKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EciesP256EncryptedKey.h" +#include "EcencP256EncryptedKey.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EncryptedDataEncryptionKey_PR { + Vanetza_Security2_EncryptedDataEncryptionKey_PR_NOTHING, /* No components present */ + Vanetza_Security2_EncryptedDataEncryptionKey_PR_eciesNistP256, + Vanetza_Security2_EncryptedDataEncryptionKey_PR_eciesBrainpoolP256r1, + /* Extensions may appear below */ + Vanetza_Security2_EncryptedDataEncryptionKey_PR_ecencSm2256 +} Vanetza_Security2_EncryptedDataEncryptionKey_PR; + +/* Vanetza_Security2_EncryptedDataEncryptionKey */ +typedef struct Vanetza_Security2_EncryptedDataEncryptionKey { + Vanetza_Security2_EncryptedDataEncryptionKey_PR present; + union Vanetza_Security2_EncryptedDataEncryptionKey_u { + Vanetza_Security2_EciesP256EncryptedKey_t eciesNistP256; + Vanetza_Security2_EciesP256EncryptedKey_t eciesBrainpoolP256r1; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_EcencP256EncryptedKey_t ecencSm2256; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EncryptedDataEncryptionKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptedDataEncryptionKey; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EncryptedDataEncryptionKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptedDataEncryptionKey_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EncryptedDataEncryptionKey_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EncryptedDataEncryptionKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EncryptedIndividualPLV.c b/vanetza/asn1/security/r2/EncryptedIndividualPLV.c new file mode 100644 index 000000000..47dfb4623 --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptedIndividualPLV.c @@ -0,0 +1,151 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EncryptedIndividualPLV.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptedIndividualPLV_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedIndividualPLV, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedIndividualPLV, laId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "laId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptedIndividualPLV, encPlv), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encPlv" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EncryptedIndividualPLV_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* laId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* encPlv */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EncryptedIndividualPLV_specs_1 = { + sizeof(struct Vanetza_Security2_EncryptedIndividualPLV), + offsetof(struct Vanetza_Security2_EncryptedIndividualPLV, _asn_ctx), + asn_MAP_Vanetza_Security2_EncryptedIndividualPLV_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptedIndividualPLV = { + "EncryptedIndividualPLV", + "EncryptedIndividualPLV", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EncryptedIndividualPLV_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EncryptedIndividualPLV_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_EncryptedIndividualPLV_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EncryptedIndividualPLV.h b/vanetza/asn1/security/r2/EncryptedIndividualPLV.h new file mode 100644 index 000000000..6dd506f4b --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptedIndividualPLV.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EncryptedIndividualPLV_H_ +#define _Vanetza_Security2_EncryptedIndividualPLV_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "LaId.h" +#include "Ieee1609Dot2Data-SymmEncryptedSingleRecipient.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EncryptedIndividualPLV */ +typedef struct Vanetza_Security2_EncryptedIndividualPLV { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_LaId_t laId; + Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_t encPlv; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EncryptedIndividualPLV_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptedIndividualPLV; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EncryptedIndividualPLV_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptedIndividualPLV_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EncryptedIndividualPLV_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EncryptionKey.c b/vanetza/asn1/security/r2/EncryptionKey.c new file mode 100644 index 000000000..770aa8679 --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptionKey.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EncryptionKey.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EncryptionKey_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EncryptionKey_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptionKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptionKey, choice.Public), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "public" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EncryptionKey, choice.symmetric), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SymmetricEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "symmetric" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EncryptionKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* public */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* symmetric */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EncryptionKey_specs_1 = { + sizeof(struct Vanetza_Security2_EncryptionKey), + offsetof(struct Vanetza_Security2_EncryptionKey, _asn_ctx), + offsetof(struct Vanetza_Security2_EncryptionKey, present), + sizeof(((struct Vanetza_Security2_EncryptionKey *)0)->present), + asn_MAP_Vanetza_Security2_EncryptionKey_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptionKey = { + "EncryptionKey", + "EncryptionKey", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EncryptionKey_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EncryptionKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EncryptionKey.h b/vanetza/asn1/security/r2/EncryptionKey.h new file mode 100644 index 000000000..99cc0257c --- /dev/null +++ b/vanetza/asn1/security/r2/EncryptionKey.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EncryptionKey_H_ +#define _Vanetza_Security2_EncryptionKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PublicEncryptionKey.h" +#include "SymmetricEncryptionKey.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EncryptionKey_PR { + Vanetza_Security2_EncryptionKey_PR_NOTHING, /* No components present */ + Vanetza_Security2_EncryptionKey_PR_public, + Vanetza_Security2_EncryptionKey_PR_symmetric +} Vanetza_Security2_EncryptionKey_PR; + +/* Vanetza_Security2_EncryptionKey */ +typedef struct Vanetza_Security2_EncryptionKey { + Vanetza_Security2_EncryptionKey_PR present; + union Vanetza_Security2_EncryptionKey_u { + Vanetza_Security2_PublicEncryptionKey_t Public; + Vanetza_Security2_SymmetricEncryptionKey_t symmetric; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EncryptionKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EncryptionKey; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EncryptionKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EncryptionKey_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EncryptionKey_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EncryptionKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EndEntityType.c b/vanetza/asn1/security/r2/EndEntityType.c new file mode 100644 index 000000000..2f7769c42 --- /dev/null +++ b/vanetza/asn1/security/r2/EndEntityType.c @@ -0,0 +1,89 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EndEntityType.h" + +int +Vanetza_Security2_EndEntityType_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_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; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EndEntityType_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EndEntityType_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) +static asn_jer_constraints_t asn_JER_type_Vanetza_Security2_EndEntityType_constr_1 CC_NOTUSED = { + 8}; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EndEntityType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EndEntityType = { + "EndEntityType", + "EndEntityType", + &asn_OP_BIT_STRING, + asn_DEF_Vanetza_Security2_EndEntityType_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EndEntityType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EndEntityType_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EndEntityType_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EndEntityType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EndEntityType_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EndEntityType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EndEntityType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + &asn_JER_type_Vanetza_Security2_EndEntityType_constr_1, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EndEntityType_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EndEntityType.h b/vanetza/asn1/security/r2/EndEntityType.h new file mode 100644 index 000000000..e1a717a90 --- /dev/null +++ b/vanetza/asn1/security/r2/EndEntityType.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EndEntityType_H_ +#define _Vanetza_Security2_EndEntityType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EndEntityType { + Vanetza_Security2_EndEntityType_app = 0, + Vanetza_Security2_EndEntityType_enrol = 1 +} e_Vanetza_Security2_EndEntityType; + +/* Vanetza_Security2_EndEntityType */ +typedef BIT_STRING_t Vanetza_Security2_EndEntityType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EndEntityType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EndEntityType; +asn_struct_free_f Vanetza_Security2_EndEntityType_free; +asn_struct_print_f Vanetza_Security2_EndEntityType_print; +asn_constr_check_f Vanetza_Security2_EndEntityType_constraint; +ber_type_decoder_f Vanetza_Security2_EndEntityType_decode_ber; +der_type_encoder_f Vanetza_Security2_EndEntityType_encode_der; +xer_type_decoder_f Vanetza_Security2_EndEntityType_decode_xer; +xer_type_encoder_f Vanetza_Security2_EndEntityType_encode_xer; +jer_type_encoder_f Vanetza_Security2_EndEntityType_encode_jer; +oer_type_decoder_f Vanetza_Security2_EndEntityType_decode_oer; +oer_type_encoder_f Vanetza_Security2_EndEntityType_encode_oer; +per_type_decoder_f Vanetza_Security2_EndEntityType_decode_uper; +per_type_encoder_f Vanetza_Security2_EndEntityType_encode_uper; +per_type_decoder_f Vanetza_Security2_EndEntityType_decode_aper; +per_type_encoder_f Vanetza_Security2_EndEntityType_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EndEntityType_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EnrolmentResponseCode.c b/vanetza/asn1/security/r2/EnrolmentResponseCode.c new file mode 100644 index 000000000..6ddccd443 --- /dev/null +++ b/vanetza/asn1/security/r2/EnrolmentResponseCode.c @@ -0,0 +1,97 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EnrolmentResponseCode.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EnrolmentResponseCode_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EnrolmentResponseCode_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 13 } /* (0..13,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_EnrolmentResponseCode_value2enum_1[] = { + { 0, 2, "ok" }, + { 1, 9, "cantparse" }, + { 2, 14, "badcontenttype" }, + { 3, 17, "imnottherecipient" }, + { 4, 26, "unknownencryptionalgorithm" }, + { 5, 16, "decryptionfailed" }, + { 6, 10, "unknownits" }, + { 7, 16, "invalidsignature" }, + { 8, 20, "invalidencryptionkey" }, + { 9, 12, "baditsstatus" }, + { 10, 17, "incompleterequest" }, + { 11, 17, "deniedpermissions" }, + { 12, 11, "invalidkeys" }, + { 13, 13, "deniedrequest" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_Vanetza_Security2_EnrolmentResponseCode_enum2value_1[] = { + 2, /* badcontenttype(2) */ + 9, /* baditsstatus(9) */ + 1, /* cantparse(1) */ + 5, /* decryptionfailed(5) */ + 11, /* deniedpermissions(11) */ + 13, /* deniedrequest(13) */ + 3, /* imnottherecipient(3) */ + 10, /* incompleterequest(10) */ + 8, /* invalidencryptionkey(8) */ + 12, /* invalidkeys(12) */ + 7, /* invalidsignature(7) */ + 0, /* ok(0) */ + 4, /* unknownencryptionalgorithm(4) */ + 6 /* unknownits(6) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_EnrolmentResponseCode_specs_1 = { + asn_MAP_Vanetza_Security2_EnrolmentResponseCode_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_EnrolmentResponseCode_enum2value_1, /* N => "tag"; sorted by N */ + 14, /* Number of elements in the maps */ + 15, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EnrolmentResponseCode = { + "EnrolmentResponseCode", + "EnrolmentResponseCode", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EnrolmentResponseCode_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EnrolmentResponseCode_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EnrolmentResponseCode_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_EnrolmentResponseCode_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EnrolmentResponseCode.h b/vanetza/asn1/security/r2/EnrolmentResponseCode.h new file mode 100644 index 000000000..9e921955b --- /dev/null +++ b/vanetza/asn1/security/r2/EnrolmentResponseCode.h @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EnrolmentResponseCode_H_ +#define _Vanetza_Security2_EnrolmentResponseCode_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EnrolmentResponseCode { + Vanetza_Security2_EnrolmentResponseCode_ok = 0, + Vanetza_Security2_EnrolmentResponseCode_cantparse = 1, + Vanetza_Security2_EnrolmentResponseCode_badcontenttype = 2, + Vanetza_Security2_EnrolmentResponseCode_imnottherecipient = 3, + Vanetza_Security2_EnrolmentResponseCode_unknownencryptionalgorithm = 4, + Vanetza_Security2_EnrolmentResponseCode_decryptionfailed = 5, + Vanetza_Security2_EnrolmentResponseCode_unknownits = 6, + Vanetza_Security2_EnrolmentResponseCode_invalidsignature = 7, + Vanetza_Security2_EnrolmentResponseCode_invalidencryptionkey = 8, + Vanetza_Security2_EnrolmentResponseCode_baditsstatus = 9, + Vanetza_Security2_EnrolmentResponseCode_incompleterequest = 10, + Vanetza_Security2_EnrolmentResponseCode_deniedpermissions = 11, + Vanetza_Security2_EnrolmentResponseCode_invalidkeys = 12, + Vanetza_Security2_EnrolmentResponseCode_deniedrequest = 13 + /* + * Enumeration is extensible + */ +} e_Vanetza_Security2_EnrolmentResponseCode; + +/* Vanetza_Security2_EnrolmentResponseCode */ +typedef long Vanetza_Security2_EnrolmentResponseCode_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EnrolmentResponseCode_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EnrolmentResponseCode; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_EnrolmentResponseCode_specs_1; +asn_struct_free_f Vanetza_Security2_EnrolmentResponseCode_free; +asn_struct_print_f Vanetza_Security2_EnrolmentResponseCode_print; +asn_constr_check_f Vanetza_Security2_EnrolmentResponseCode_constraint; +ber_type_decoder_f Vanetza_Security2_EnrolmentResponseCode_decode_ber; +der_type_encoder_f Vanetza_Security2_EnrolmentResponseCode_encode_der; +xer_type_decoder_f Vanetza_Security2_EnrolmentResponseCode_decode_xer; +xer_type_encoder_f Vanetza_Security2_EnrolmentResponseCode_encode_xer; +jer_type_encoder_f Vanetza_Security2_EnrolmentResponseCode_encode_jer; +oer_type_decoder_f Vanetza_Security2_EnrolmentResponseCode_decode_oer; +oer_type_encoder_f Vanetza_Security2_EnrolmentResponseCode_encode_oer; +per_type_decoder_f Vanetza_Security2_EnrolmentResponseCode_decode_uper; +per_type_encoder_f Vanetza_Security2_EnrolmentResponseCode_encode_uper; +per_type_decoder_f Vanetza_Security2_EnrolmentResponseCode_decode_aper; +per_type_encoder_f Vanetza_Security2_EnrolmentResponseCode_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EnrolmentResponseCode_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiOriginatingHeaderInfoExtension.c b/vanetza/asn1/security/r2/EtsiOriginatingHeaderInfoExtension.c new file mode 100644 index 000000000..96310a11e --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiOriginatingHeaderInfoExtension.c @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiOriginatingHeaderInfoExtension.h" + +/* + * This type is implemented using Vanetza_Security2_EtsiTs103097HeaderInfoExtensions, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension = { + "EtsiOriginatingHeaderInfoExtension", + "EtsiOriginatingHeaderInfoExtension", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiOriginatingHeaderInfoExtension.h b/vanetza/asn1/security/r2/EtsiOriginatingHeaderInfoExtension.h new file mode 100644 index 000000000..a49164f83 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiOriginatingHeaderInfoExtension.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_H_ +#define _Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Extension.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiOriginatingHeaderInfoExtension */ +typedef Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_t Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiOriginatingHeaderInfoExtension; +asn_struct_free_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_free; +asn_struct_print_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_print; +asn_constr_check_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiOriginatingHeaderInfoExtension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.c b/vanetza/asn1/security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.c new file mode 100644 index 000000000..a9d4a63d2 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h" + +int +Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_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 Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed = { + "EtsiTs102941ButterflyAuthorizationRequest-X509Signed", + "EtsiTs102941ButterflyAuthorizationRequest-X509Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h b/vanetza/asn1/security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h new file mode 100644 index 000000000..eff8da30a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_H_ +#define _Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest-X509Signed */ +typedef Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_t Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed; +asn_struct_free_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941CrlRequest.c b/vanetza/asn1/security/r2/EtsiTs102941CrlRequest.c new file mode 100644 index 000000000..bfba668eb --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941CrlRequest.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941CrlRequest.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941CrlRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941CrlRequest, issuerId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "issuerId" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EtsiTs102941CrlRequest, lastKnownUpdate), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "lastKnownUpdate" + }, +}; +static const int asn_MAP_Vanetza_Security2_EtsiTs102941CrlRequest_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941CrlRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* issuerId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* lastKnownUpdate */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941CrlRequest_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941CrlRequest), + offsetof(struct Vanetza_Security2_EtsiTs102941CrlRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_EtsiTs102941CrlRequest_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EtsiTs102941CrlRequest_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest = { + "EtsiTs102941CrlRequest", + "EtsiTs102941CrlRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941CrlRequest_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941CrlRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941CrlRequest.h b/vanetza/asn1/security/r2/EtsiTs102941CrlRequest.h new file mode 100644 index 000000000..56713b84c --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941CrlRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941CrlRequest_H_ +#define _Vanetza_Security2_EtsiTs102941CrlRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "Time32.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941CrlRequest */ +typedef struct Vanetza_Security2_EtsiTs102941CrlRequest { + Vanetza_Security2_HashedId8_t issuerId; + Vanetza_Security2_Time32_t *lastKnownUpdate; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941CrlRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941CrlRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941CrlRequest_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941CrlRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941CtlRequest.c b/vanetza/asn1/security/r2/EtsiTs102941CtlRequest.c new file mode 100644 index 000000000..f45271428 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941CtlRequest.c @@ -0,0 +1,132 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941CtlRequest.h" + +static int +memb_Vanetza_Security2_lastKnownCtlSequence_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_lastKnownCtlSequence_constr_3 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_lastKnownCtlSequence_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941CtlRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941CtlRequest, issuerId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "issuerId" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EtsiTs102941CtlRequest, lastKnownCtlSequence), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_lastKnownCtlSequence_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_lastKnownCtlSequence_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_lastKnownCtlSequence_constraint_1 + }, + 0, 0, /* No default value */ + "lastKnownCtlSequence" + }, +}; +static const int asn_MAP_Vanetza_Security2_EtsiTs102941CtlRequest_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941CtlRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* issuerId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* lastKnownCtlSequence */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941CtlRequest_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941CtlRequest), + offsetof(struct Vanetza_Security2_EtsiTs102941CtlRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_EtsiTs102941CtlRequest_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_EtsiTs102941CtlRequest_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest = { + "EtsiTs102941CtlRequest", + "EtsiTs102941CtlRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941CtlRequest_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941CtlRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941CtlRequest.h b/vanetza/asn1/security/r2/EtsiTs102941CtlRequest.h new file mode 100644 index 000000000..f96fad883 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941CtlRequest.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941CtlRequest_H_ +#define _Vanetza_Security2_EtsiTs102941CtlRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "NativeInteger.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941CtlRequest */ +typedef struct Vanetza_Security2_EtsiTs102941CtlRequest { + Vanetza_Security2_HashedId8_t issuerId; + long *lastKnownCtlSequence; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941CtlRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941CtlRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941CtlRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941CtlRequest_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941CtlRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941DeltaCtlRequest.c b/vanetza/asn1/security/r2/EtsiTs102941DeltaCtlRequest.c new file mode 100644 index 000000000..f2028fff9 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941DeltaCtlRequest.c @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941DeltaCtlRequest.h" + +/* + * This type is implemented using Vanetza_Security2_EtsiTs102941CtlRequest, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest = { + "EtsiTs102941DeltaCtlRequest", + "EtsiTs102941DeltaCtlRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941CtlRequest_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941CtlRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941DeltaCtlRequest.h b/vanetza/asn1/security/r2/EtsiTs102941DeltaCtlRequest.h new file mode 100644 index 000000000..c6e458b82 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941DeltaCtlRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941DeltaCtlRequest_H_ +#define _Vanetza_Security2_EtsiTs102941DeltaCtlRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs102941CtlRequest.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941DeltaCtlRequest */ +typedef Vanetza_Security2_EtsiTs102941CtlRequest_t Vanetza_Security2_EtsiTs102941DeltaCtlRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest; +asn_struct_free_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941DeltaCtlRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941DeltaCtlRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.c new file mode 100644 index 000000000..13db90635 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_AuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage = { + "AuthorizationRequestMessage", + "AuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.h new file mode 100644 index 000000000..b4f8f84bc --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.c new file mode 100644 index 000000000..585e8ee14 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop = { + "AuthorizationRequestMessageWithPop", + "AuthorizationRequestMessageWithPop", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.h new file mode 100644 index 000000000..bb8a63afe --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationRequestMessageWithPop_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.c new file mode 100644 index 000000000..d268545bc --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_AuthorizationResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage = { + "AuthorizationResponseMessage", + "AuthorizationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.h new file mode 100644 index 000000000..190e9ecd9 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_AuthorizationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_AuthorizationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.c new file mode 100644 index 000000000..abd38cc2e --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage = { + "ButterflyAtDownloadRequestMessage", + "ButterflyAtDownloadRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.h new file mode 100644 index 000000000..af503c928 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAtDownloadRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.c new file mode 100644 index 000000000..bd8d697e5 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage = { + "ButterflyAuthorizationRequestMessage", + "ButterflyAuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.h new file mode 100644 index 000000000..341f93be3 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.c new file mode 100644 index 000000000..4656b844f --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage = { + "ButterflyAuthorizationResponseMessage", + "ButterflyAuthorizationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.h new file mode 100644 index 000000000..e2c3eed49 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_ButterflyAuthorizationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.c new file mode 100644 index 000000000..f624f6fae --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_CertificateRevocationListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage = { + "CertificateRevocationListMessage", + "CertificateRevocationListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.h new file mode 100644 index 000000000..72262578d --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_CertificateRevocationListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_CertificateRevocationListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.c new file mode 100644 index 000000000..93558f7f1 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_EnrolmentRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage = { + "EnrolmentRequestMessage", + "EnrolmentRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.h new file mode 100644 index 000000000..594056aec --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.c new file mode 100644 index 000000000..7cd3c68d4 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_EnrolmentResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage = { + "EnrolmentResponseMessage", + "EnrolmentResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.h new file mode 100644 index 000000000..8af24ebdc --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EnrolmentResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_EnrolmentResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.c new file mode 100644 index 000000000..1c1d8a98a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_EtsiTs102941Data.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (1..1) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (1..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Version, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data, _asn_ctx), + asn_MAP_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_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_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data = { + "EtsiTs102941Data", + "EtsiTs102941Data", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.h new file mode 100644 index 000000000..e0b6f4fab --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941Data.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Version.h" +#include "EtsiTs102941MessagesCa_EtsiTs102941DataContent.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data */ +typedef struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data { + Vanetza_Security2_Version_t version; + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_t content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941Data_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.c new file mode 100644 index 000000000..01ae50e9d --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.c @@ -0,0 +1,524 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_EtsiTs102941DataContent.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 9 } /* (0..9,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_ext1_16[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, butterflyAuthorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAuthorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, x509SignedbutterflyAuthorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "x509SignedbutterflyAuthorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, butterflyAuthorizationResponse), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaEeCertInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAuthorizationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, butterflyCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaAcaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, butterflyCertificateResponse), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaRaCertResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyCertificateResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, butterflyAtDownloadRequest), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaDownloadRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAtDownloadRequest" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ext1_tags_16[] = { + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ext1_tag2el_16[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* butterflyAuthorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* x509SignedbutterflyAuthorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* butterflyAuthorizationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* butterflyCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* butterflyCertificateResponse */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* butterflyAtDownloadRequest */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ext1_specs_16 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1, _asn_ctx), + asn_MAP_Vanetza_Security2_ext1_tag2el_16, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ext1_16 = { + "ext1", + "ext1", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ext1_tags_16, + sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16) + /sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_ext1_tags_16, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16) + /sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ext1_16, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_ext1_specs_16 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.enrolmentRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "enrolmentRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.enrolmentResponse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerEcResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "enrolmentResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.authorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerAtRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.authorizationResponse), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerAtResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.certificateRevocationList), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateRevocationList" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.certificateTrustListTlm), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateTrustListTlm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.certificateTrustListRca), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateTrustListRca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.authorizationValidationRequest), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AuthorizationValidationRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationValidationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.authorizationValidationResponse), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AuthorizationValidationResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationValidationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.caCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CaCertificateRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "caCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.linkCertificateTlm), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkCertificateTlm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.singleSignedLinkCertificateRca), + (ASN_TAG_CLASS_CONTEXT | (11 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "singleSignedLinkCertificateRca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.doubleSignedlinkCertificateRca), + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "doubleSignedlinkCertificateRca" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, choice.ext1), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + 0, + &asn_DEF_Vanetza_Security2_ext1_16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ext1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enrolmentRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enrolmentResponse */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* authorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* authorizationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* certificateRevocationList */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* certificateTrustListTlm */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* certificateTrustListRca */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* authorizationValidationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* authorizationValidationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* caCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* linkCertificateTlm */ + { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* singleSignedLinkCertificateRca */ + { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* doubleSignedlinkCertificateRca */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 } /* ext1 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, _asn_ctx), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent, present), + sizeof(((struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent *)0)->present), + asn_MAP_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_tag2el_1, + 14, /* Count of tags in the map */ + 0, 0, + 10 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent = { + "EtsiTs102941DataContent", + "EtsiTs102941DataContent", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_1, + 14, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.h new file mode 100644 index 000000000..d38d8540e --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_EtsiTs102941DataContent.h @@ -0,0 +1,110 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "InnerEcRequestSignedForPop.h" +#include "InnerEcResponse.h" +#include "InnerAtRequest.h" +#include "InnerAtResponse.h" +#include "ToBeSignedCrl.h" +#include "ToBeSignedTlmCtl.h" +#include "ToBeSignedRcaCtl.h" +#include "AuthorizationValidationRequest.h" +#include "AuthorizationValidationResponse.h" +#include "CaCertificateRequest.h" +#include "ToBeSignedLinkCertificateTlm.h" +#include "ToBeSignedLinkCertificateRca.h" +#include "RcaSingleSignedLinkCertificateMessage.h" +#include "EeRaCertRequest.h" +#include "EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h" +#include "RaEeCertInfo.h" +#include "RaAcaCertRequest.h" +#include "AcaRaCertResponse.h" +#include "EeRaDownloadRequest.h" +#include "constr_SEQUENCE.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR { + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_NOTHING, /* No components present */ + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_enrolmentRequest, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_enrolmentResponse, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_authorizationRequest, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_authorizationResponse, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_certificateRevocationList, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_certificateTrustListTlm, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_certificateTrustListRca, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_authorizationValidationRequest, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_authorizationValidationResponse, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_caCertificateRequest, + /* Extensions may appear below */ + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_linkCertificateTlm, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_singleSignedLinkCertificateRca, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_doubleSignedlinkCertificateRca, + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR_ext1 +} Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR; + +/* Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent */ +typedef struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent { + Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_PR present; + union Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_u { + Vanetza_Security2_InnerEcRequestSignedForPop_t enrolmentRequest; + Vanetza_Security2_InnerEcResponse_t enrolmentResponse; + Vanetza_Security2_InnerAtRequest_t authorizationRequest; + Vanetza_Security2_InnerAtResponse_t authorizationResponse; + Vanetza_Security2_ToBeSignedCrl_t certificateRevocationList; + Vanetza_Security2_ToBeSignedTlmCtl_t certificateTrustListTlm; + Vanetza_Security2_ToBeSignedRcaCtl_t certificateTrustListRca; + Vanetza_Security2_AuthorizationValidationRequest_t authorizationValidationRequest; + Vanetza_Security2_AuthorizationValidationResponse_t authorizationValidationResponse; + Vanetza_Security2_CaCertificateRequest_t caCertificateRequest; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_ToBeSignedLinkCertificateTlm_t linkCertificateTlm; + Vanetza_Security2_ToBeSignedLinkCertificateRca_t singleSignedLinkCertificateRca; + Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_t doubleSignedlinkCertificateRca; + struct Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent__ext1 { + Vanetza_Security2_EeRaCertRequest_t butterflyAuthorizationRequest; + Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_t x509SignedbutterflyAuthorizationRequest; + Vanetza_Security2_RaEeCertInfo_t butterflyAuthorizationResponse; + Vanetza_Security2_RaAcaCertRequest_t butterflyCertificateRequest; + Vanetza_Security2_AcaRaCertResponse_t butterflyCertificateResponse; + Vanetza_Security2_EeRaDownloadRequest_t butterflyAtDownloadRequest; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ext1; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_1[14]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_EtsiTs102941DataContent_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.c new file mode 100644 index 000000000..d617d162a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage = { + "RcaCertificateTrustListMessage", + "RcaCertificateTrustListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.h new file mode 100644 index 000000000..f3e67ee6d --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_RcaCertificateTrustListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_RcaCertificateTrustListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.c new file mode 100644 index 000000000..61aa55f85 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage = { + "TlmCertificateTrustListMessage", + "TlmCertificateTrustListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.h new file mode 100644 index 000000000..f2abdcbfe --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmCertificateTrustListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_TlmCertificateTrustListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.c new file mode 100644 index 000000000..fdaf156fb --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_TlmLinkCertificateMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage = { + "TlmLinkCertificateMessage", + "TlmLinkCertificateMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.h new file mode 100644 index 000000000..005423f5d --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_TlmLinkCertificateMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_TlmLinkCertificateMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.c new file mode 100644 index 000000000..47892a7dc --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage = { + "X509SignedButterflyAuthorizationRequestMessage", + "X509SignedButterflyAuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.h new file mode 100644 index 000000000..c2663b3fc --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesCa_X509SignedButterflyAuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.c new file mode 100644 index 000000000..5e53ccd66 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage = { + "AuthorizationRequestMessage", + "AuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.h new file mode 100644 index 000000000..4e3fd8c8c --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.c new file mode 100644 index 000000000..b8cae2d55 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop = { + "AuthorizationRequestMessageWithPop", + "AuthorizationRequestMessageWithPop", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.h new file mode 100644 index 000000000..22acd4689 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationRequestMessageWithPop */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationRequestMessageWithPop_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.c new file mode 100644 index 000000000..b9ba30cba --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage = { + "AuthorizationResponseMessage", + "AuthorizationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.h new file mode 100644 index 000000000..320c5d49c --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_AuthorizationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_AuthorizationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.c new file mode 100644 index 000000000..b8a6333c3 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage = { + "ButterflyAtDownloadRequestMessage", + "ButterflyAtDownloadRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.h new file mode 100644 index 000000000..0b2ca0b75 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAtDownloadRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAtDownloadRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.c new file mode 100644 index 000000000..11503539b --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage = { + "ButterflyAuthorizationRequestMessage", + "ButterflyAuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.h new file mode 100644 index 000000000..2364d4ec8 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.c new file mode 100644 index 000000000..458a16bdb --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage = { + "ButterflyAuthorizationResponseMessage", + "ButterflyAuthorizationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.h new file mode 100644 index 000000000..df2837e00 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_ButterflyAuthorizationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_ButterflyAuthorizationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.c new file mode 100644 index 000000000..a4b53985a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage = { + "CertificateRevocationListMessage", + "CertificateRevocationListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.h new file mode 100644 index 000000000..dc32ff1b8 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_CertificateRevocationListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_CertificateRevocationListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.c new file mode 100644 index 000000000..179d47c20 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage = { + "EnrolmentRequestMessage", + "EnrolmentRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.h new file mode 100644 index 000000000..69158d5c2 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.c new file mode 100644 index 000000000..a1bc4e333 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage = { + "EnrolmentResponseMessage", + "EnrolmentResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.h new file mode 100644 index 000000000..6781efa4b --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_EnrolmentResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EnrolmentResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.c new file mode 100644 index 000000000..b8eecc103 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (1..1) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (1..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Version, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data, _asn_ctx), + asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_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_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data = { + "EtsiTs102941Data", + "EtsiTs102941Data", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.h new file mode 100644 index 000000000..80054dd6a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Version.h" +#include "EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941Data */ +typedef struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data { + Vanetza_Security2_Version_t version; + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_t content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941Data_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.c new file mode 100644 index 000000000..7d9a09eb2 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.c @@ -0,0 +1,524 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 9 } /* (0..9,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_ext1_16[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, butterflyAuthorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAuthorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, x509SignedbutterflyAuthorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "x509SignedbutterflyAuthorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, butterflyAuthorizationResponse), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaEeCertInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAuthorizationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, butterflyCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, butterflyCertificateResponse), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyCertificateResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, butterflyAtDownloadRequest), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaDownloadRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAtDownloadRequest" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ext1_tags_16[] = { + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ext1_tag2el_16[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* butterflyAuthorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* x509SignedbutterflyAuthorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* butterflyAuthorizationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* butterflyCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* butterflyCertificateResponse */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* butterflyAtDownloadRequest */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ext1_specs_16 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1, _asn_ctx), + asn_MAP_Vanetza_Security2_ext1_tag2el_16, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ext1_16 = { + "ext1", + "ext1", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ext1_tags_16, + sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16) + /sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_ext1_tags_16, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16) + /sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ext1_16, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_ext1_specs_16 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.enrolmentRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "enrolmentRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.enrolmentResponse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerEcResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "enrolmentResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.authorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerAtRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.authorizationResponse), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerAtResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.certificateRevocationList), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateRevocationList" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.certificateTrustListTlm), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateTrustListTlm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.certificateTrustListRca), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateTrustListRca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.authorizationValidationRequest), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationValidationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.authorizationValidationResponse), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationValidationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.caCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "caCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.linkCertificateTlm), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkCertificateTlm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.singleSignedLinkCertificateRca), + (ASN_TAG_CLASS_CONTEXT | (11 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "singleSignedLinkCertificateRca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.doubleSignedlinkCertificateRca), + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "doubleSignedlinkCertificateRca" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, choice.ext1), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + 0, + &asn_DEF_Vanetza_Security2_ext1_16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ext1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enrolmentRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enrolmentResponse */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* authorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* authorizationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* certificateRevocationList */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* certificateTrustListTlm */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* certificateTrustListRca */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* authorizationValidationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* authorizationValidationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* caCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* linkCertificateTlm */ + { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* singleSignedLinkCertificateRca */ + { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* doubleSignedlinkCertificateRca */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 } /* ext1 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, _asn_ctx), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent, present), + sizeof(((struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent *)0)->present), + asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_tag2el_1, + 14, /* Count of tags in the map */ + 0, 0, + 10 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent = { + "EtsiTs102941DataContent", + "EtsiTs102941DataContent", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_1, + 14, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.h new file mode 100644 index 000000000..bf4af74ba --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent.h @@ -0,0 +1,104 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "InnerEcRequestSignedForPop.h" +#include "InnerEcResponse.h" +#include "InnerAtRequest.h" +#include "InnerAtResponse.h" +#include "ToBeSignedCrl.h" +#include "ToBeSignedTlmCtl.h" +#include "ToBeSignedRcaCtl.h" +#include "NULL.h" +#include "ToBeSignedLinkCertificateTlm.h" +#include "EeRaCertRequest.h" +#include "EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h" +#include "RaEeCertInfo.h" +#include "EeRaDownloadRequest.h" +#include "constr_SEQUENCE.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR { + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_NOTHING, /* No components present */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_enrolmentRequest, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_enrolmentResponse, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_authorizationRequest, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_authorizationResponse, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_certificateRevocationList, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_certificateTrustListTlm, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_certificateTrustListRca, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_authorizationValidationRequest, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_authorizationValidationResponse, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_caCertificateRequest, + /* Extensions may appear below */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_linkCertificateTlm, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_singleSignedLinkCertificateRca, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_doubleSignedlinkCertificateRca, + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR_ext1 +} Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR; + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_EtsiTs102941DataContent */ +typedef struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent { + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_PR present; + union Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_u { + Vanetza_Security2_InnerEcRequestSignedForPop_t enrolmentRequest; + Vanetza_Security2_InnerEcResponse_t enrolmentResponse; + Vanetza_Security2_InnerAtRequest_t authorizationRequest; + Vanetza_Security2_InnerAtResponse_t authorizationResponse; + Vanetza_Security2_ToBeSignedCrl_t certificateRevocationList; + Vanetza_Security2_ToBeSignedTlmCtl_t certificateTrustListTlm; + Vanetza_Security2_ToBeSignedRcaCtl_t certificateTrustListRca; + NULL_t authorizationValidationRequest; + NULL_t authorizationValidationResponse; + NULL_t caCertificateRequest; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_ToBeSignedLinkCertificateTlm_t linkCertificateTlm; + NULL_t singleSignedLinkCertificateRca; + NULL_t doubleSignedlinkCertificateRca; + struct Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent__ext1 { + Vanetza_Security2_EeRaCertRequest_t butterflyAuthorizationRequest; + Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_t x509SignedbutterflyAuthorizationRequest; + Vanetza_Security2_RaEeCertInfo_t butterflyAuthorizationResponse; + NULL_t butterflyCertificateRequest; + NULL_t butterflyCertificateResponse; + Vanetza_Security2_EeRaDownloadRequest_t butterflyAtDownloadRequest; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ext1; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_1[14]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_EtsiTs102941DataContent_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.c new file mode 100644 index 000000000..2cac75ac1 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage = { + "RcaCertificateTrustListMessage", + "RcaCertificateTrustListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.h new file mode 100644 index 000000000..2ca86c221 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_RcaCertificateTrustListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_RcaCertificateTrustListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.c new file mode 100644 index 000000000..401924b75 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage = { + "TlmCertificateTrustListMessage", + "TlmCertificateTrustListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.h new file mode 100644 index 000000000..6e5001c0c --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_TlmCertificateTrustListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmCertificateTrustListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.c new file mode 100644 index 000000000..654dd2b00 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage = { + "TlmLinkCertificateMessage", + "TlmLinkCertificateMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.h new file mode 100644 index 000000000..317786a1c --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_TlmLinkCertificateMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_TlmLinkCertificateMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.c new file mode 100644 index 000000000..95db7c848 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage = { + "X509SignedButterflyAuthorizationRequestMessage", + "X509SignedButterflyAuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.h new file mode 100644 index 000000000..66c3fb0ad --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss-OptionalPrivacy" + * found in "asn1/release2/TS102941v221/MessagesItss-OptionalPrivacy.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss-OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_OptionalPrivacy_X509SignedButterflyAuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.c new file mode 100644 index 000000000..430eea599 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_AuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage = { + "AuthorizationRequestMessage", + "AuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.h new file mode 100644 index 000000000..9b82b783c --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.c new file mode 100644 index 000000000..fff6b14b1 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop = { + "AuthorizationRequestMessageWithPop", + "AuthorizationRequestMessageWithPop", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.h new file mode 100644 index 000000000..08c66d4f0 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationRequestMessageWithPop_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.c new file mode 100644 index 000000000..926311836 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_AuthorizationResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage = { + "AuthorizationResponseMessage", + "AuthorizationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.h new file mode 100644 index 000000000..e06a81a56 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_AuthorizationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_AuthorizationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.c new file mode 100644 index 000000000..adc89d4e7 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage = { + "ButterflyAtDownloadRequestMessage", + "ButterflyAtDownloadRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.h new file mode 100644 index 000000000..2f70fa080 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAtDownloadRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.c new file mode 100644 index 000000000..0f3dbf8be --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage = { + "ButterflyAuthorizationRequestMessage", + "ButterflyAuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.h new file mode 100644 index 000000000..43d97f457 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.c new file mode 100644 index 000000000..443aa7fdb --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage = { + "ButterflyAuthorizationResponseMessage", + "ButterflyAuthorizationResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.h new file mode 100644 index 000000000..e35173287 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_ButterflyAuthorizationResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.c new file mode 100644 index 000000000..ed2de76fd --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_CertificateRevocationListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage = { + "CertificateRevocationListMessage", + "CertificateRevocationListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.h new file mode 100644 index 000000000..fb735bbf9 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_CertificateRevocationListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_CertificateRevocationListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.c new file mode 100644 index 000000000..1302b31b2 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_EnrolmentRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage = { + "EnrolmentRequestMessage", + "EnrolmentRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.h new file mode 100644 index 000000000..04fa59efb --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.c new file mode 100644 index 000000000..bbfdc1656 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_EnrolmentResponseMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_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 Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage = { + "EnrolmentResponseMessage", + "EnrolmentResponseMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.h new file mode 100644 index 000000000..a3db8fd92 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EnrolmentResponseMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_EnrolmentResponseMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.c new file mode 100644 index 000000000..2b09a24e0 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_EtsiTs102941Data.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (1..1) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (1..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Version, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data, _asn_ctx), + asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_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_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data = { + "EtsiTs102941Data", + "EtsiTs102941Data", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.h new file mode 100644 index 000000000..84eb2fd10 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941Data.h @@ -0,0 +1,40 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Version.h" +#include "EtsiTs102941MessagesItss_EtsiTs102941DataContent.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data */ +typedef struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data { + Vanetza_Security2_Version_t version; + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_t content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941Data_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.c new file mode 100644 index 000000000..f7ad733b0 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.c @@ -0,0 +1,524 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_EtsiTs102941DataContent.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 9 } /* (0..9,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_ext1_16[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, butterflyAuthorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaCertRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAuthorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, x509SignedbutterflyAuthorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "x509SignedbutterflyAuthorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, butterflyAuthorizationResponse), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaEeCertInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAuthorizationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, butterflyCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, butterflyCertificateResponse), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyCertificateResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, butterflyAtDownloadRequest), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaDownloadRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "butterflyAtDownloadRequest" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ext1_tags_16[] = { + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ext1_tag2el_16[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* butterflyAuthorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* x509SignedbutterflyAuthorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* butterflyAuthorizationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* butterflyCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* butterflyCertificateResponse */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* butterflyAtDownloadRequest */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ext1_specs_16 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1, _asn_ctx), + asn_MAP_Vanetza_Security2_ext1_tag2el_16, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ext1_16 = { + "ext1", + "ext1", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ext1_tags_16, + sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16) + /sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_ext1_tags_16, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16) + /sizeof(asn_DEF_Vanetza_Security2_ext1_tags_16[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ext1_16, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_ext1_specs_16 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.enrolmentRequest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "enrolmentRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.enrolmentResponse), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerEcResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "enrolmentResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.authorizationRequest), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerAtRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.authorizationResponse), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_InnerAtResponse, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.certificateRevocationList), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateRevocationList" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.certificateTrustListTlm), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateTrustListTlm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.certificateTrustListRca), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateTrustListRca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.authorizationValidationRequest), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationValidationRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.authorizationValidationResponse), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "authorizationValidationResponse" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.caCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "caCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.linkCertificateTlm), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkCertificateTlm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.singleSignedLinkCertificateRca), + (ASN_TAG_CLASS_CONTEXT | (11 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "singleSignedLinkCertificateRca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.doubleSignedlinkCertificateRca), + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "doubleSignedlinkCertificateRca" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, choice.ext1), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + 0, + &asn_DEF_Vanetza_Security2_ext1_16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ext1" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* enrolmentRequest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* enrolmentResponse */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* authorizationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* authorizationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* certificateRevocationList */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* certificateTrustListTlm */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* certificateTrustListRca */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* authorizationValidationRequest */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* authorizationValidationResponse */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* caCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* linkCertificateTlm */ + { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* singleSignedLinkCertificateRca */ + { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* doubleSignedlinkCertificateRca */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 } /* ext1 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, _asn_ctx), + offsetof(struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent, present), + sizeof(((struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent *)0)->present), + asn_MAP_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_tag2el_1, + 14, /* Count of tags in the map */ + 0, 0, + 10 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent = { + "EtsiTs102941DataContent", + "EtsiTs102941DataContent", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_1, + 14, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.h new file mode 100644 index 000000000..4543b651d --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_EtsiTs102941DataContent.h @@ -0,0 +1,104 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "InnerEcRequestSignedForPop.h" +#include "InnerEcResponse.h" +#include "InnerAtRequest.h" +#include "InnerAtResponse.h" +#include "ToBeSignedCrl.h" +#include "ToBeSignedTlmCtl.h" +#include "ToBeSignedRcaCtl.h" +#include "NULL.h" +#include "ToBeSignedLinkCertificateTlm.h" +#include "EeRaCertRequest.h" +#include "EtsiTs102941ButterflyAuthorizationRequest-X509Signed.h" +#include "RaEeCertInfo.h" +#include "EeRaDownloadRequest.h" +#include "constr_SEQUENCE.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR { + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_NOTHING, /* No components present */ + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_enrolmentRequest, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_enrolmentResponse, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_authorizationRequest, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_authorizationResponse, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_certificateRevocationList, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_certificateTrustListTlm, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_certificateTrustListRca, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_authorizationValidationRequest, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_authorizationValidationResponse, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_caCertificateRequest, + /* Extensions may appear below */ + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_linkCertificateTlm, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_singleSignedLinkCertificateRca, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_doubleSignedlinkCertificateRca, + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR_ext1 +} Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR; + +/* Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent */ +typedef struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent { + Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_PR present; + union Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_u { + Vanetza_Security2_InnerEcRequestSignedForPop_t enrolmentRequest; + Vanetza_Security2_InnerEcResponse_t enrolmentResponse; + Vanetza_Security2_InnerAtRequest_t authorizationRequest; + Vanetza_Security2_InnerAtResponse_t authorizationResponse; + Vanetza_Security2_ToBeSignedCrl_t certificateRevocationList; + Vanetza_Security2_ToBeSignedTlmCtl_t certificateTrustListTlm; + Vanetza_Security2_ToBeSignedRcaCtl_t certificateTrustListRca; + NULL_t authorizationValidationRequest; + NULL_t authorizationValidationResponse; + NULL_t caCertificateRequest; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_ToBeSignedLinkCertificateTlm_t linkCertificateTlm; + NULL_t singleSignedLinkCertificateRca; + NULL_t doubleSignedlinkCertificateRca; + struct Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent__ext1 { + Vanetza_Security2_EeRaCertRequest_t butterflyAuthorizationRequest; + Vanetza_Security2_EtsiTs102941ButterflyAuthorizationRequest_X509Signed_t x509SignedbutterflyAuthorizationRequest; + Vanetza_Security2_RaEeCertInfo_t butterflyAuthorizationResponse; + NULL_t butterflyCertificateRequest; + NULL_t butterflyCertificateResponse; + Vanetza_Security2_EeRaDownloadRequest_t butterflyAtDownloadRequest; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } *ext1; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_1[14]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_EtsiTs102941DataContent_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.c new file mode 100644 index 000000000..be7e8a0b2 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage = { + "RcaCertificateTrustListMessage", + "RcaCertificateTrustListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.h new file mode 100644 index 000000000..70f1e91c5 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_RcaCertificateTrustListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_RcaCertificateTrustListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.c new file mode 100644 index 000000000..59fe4fda8 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage = { + "TlmCertificateTrustListMessage", + "TlmCertificateTrustListMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.h new file mode 100644 index 000000000..3576746f9 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmCertificateTrustListMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_TlmCertificateTrustListMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.c new file mode 100644 index 000000000..a9d8c730a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_TlmLinkCertificateMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage = { + "TlmLinkCertificateMessage", + "TlmLinkCertificateMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.h new file mode 100644 index 000000000..16f6122f3 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_TlmLinkCertificateMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_TlmLinkCertificateMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.c b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.c new file mode 100644 index 000000000..2eaeed160 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.h" + +int +Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage = { + "X509SignedButterflyAuthorizationRequestMessage", + "X509SignedButterflyAuthorizationRequestMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.h b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.h new file mode 100644 index 000000000..2a7660072 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesItss" + * found in "asn1/release2/TS102941v221/MessagesItss.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_H_ +#define _Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage; +asn_struct_free_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_free; +asn_struct_print_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_print; +asn_constr_check_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs102941MessagesItss_X509SignedButterflyAuthorizationRequestMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Certificate.c b/vanetza/asn1/security/r2/EtsiTs103097Certificate.c new file mode 100644 index 000000000..50229d505 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Certificate.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Certificate.h" + +int +Vanetza_Security2_EtsiTs103097Certificate_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 Vanetza_Security2_Certificate, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Certificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Certificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Certificate = { + "EtsiTs103097Certificate", + "EtsiTs103097Certificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Certificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Certificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Certificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Certificate_constraint + }, + asn_MBR_Vanetza_Security2_CertificateBase_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateBase_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Certificate.h b/vanetza/asn1/security/r2/EtsiTs103097Certificate.h new file mode 100644 index 000000000..94761667a --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Certificate.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Certificate_H_ +#define _Vanetza_Security2_EtsiTs103097Certificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Certificate.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Certificate */ +typedef Vanetza_Security2_Certificate_t Vanetza_Security2_EtsiTs103097Certificate_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Certificate_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Certificate; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Certificate_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Certificate_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Certificate_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Certificate_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Certificate_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Certificate_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Certificate_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Certificate_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Certificate_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Certificate_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Certificate_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Certificate_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Certificate_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Certificate_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Certificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted-Unicast.c b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted-Unicast.c new file mode 100644 index 000000000..eb47c54b7 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted-Unicast.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-Encrypted-Unicast.h" + +int +Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0 = { + "EtsiTs103097Data-Encrypted-Unicast", + "EtsiTs103097Data-Encrypted-Unicast", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted-Unicast.h b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted-Unicast.h new file mode 100644 index 000000000..2e7f3fb1e --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted-Unicast.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_H_ +#define _Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Data-Encrypted-Unicast */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_t Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_107P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_Encrypted_Unicast_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted.c b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted.c new file mode 100644 index 000000000..45fa2f437 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted.c @@ -0,0 +1,204 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-Encrypted.h" + +int +Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0 = { + "EtsiTs103097Data-Encrypted", + "EtsiTs103097Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1 = { + "EtsiTs103097Data-Encrypted", + "EtsiTs103097Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2 = { + "EtsiTs103097Data-Encrypted", + "EtsiTs103097Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted.h b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted.h new file mode 100644 index 000000000..a3dc5a754 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Encrypted.h @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_Encrypted_H_ +#define _Vanetza_Security2_EtsiTs103097Data_Encrypted_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Data-Encrypted */ +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_t; +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_t; +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Encrypted_93P2_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_Encrypted_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Signed.c b/vanetza/asn1/security/r2/EtsiTs103097Data-Signed.c new file mode 100644 index 000000000..45e041dc0 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Signed.c @@ -0,0 +1,204 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-Signed.h" + +int +Vanetza_Security2_EtsiTs103097Data_Signed_63P0_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_EtsiTs103097Data_Signed_63P1_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_EtsiTs103097Data_Signed_63P2_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0 = { + "EtsiTs103097Data-Signed", + "EtsiTs103097Data-Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1 = { + "EtsiTs103097Data-Signed", + "EtsiTs103097Data-Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2 = { + "EtsiTs103097Data-Signed", + "EtsiTs103097Data-Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Signed.h b/vanetza/asn1/security/r2/EtsiTs103097Data-Signed.h new file mode 100644 index 000000000..ddee1f6f5 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Signed.h @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_Signed_H_ +#define _Vanetza_Security2_EtsiTs103097Data_Signed_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Data-Signed */ +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t; +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_Signed_63P1_t; +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_Signed_63P2_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P0; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P1; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P1_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_Signed_63P2; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_Signed_63P2_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_Signed_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.c b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.c new file mode 100644 index 000000000..9e44a0452 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-SignedAndEncrypted-Unicast.h" + +int +Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_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 Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0 = { + "EtsiTs103097Data-SignedAndEncrypted-Unicast", + "EtsiTs103097Data-SignedAndEncrypted-Unicast", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.h b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.h new file mode 100644 index 000000000..dc46da798 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted-Unicast.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_H_ +#define _Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Encrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Data-SignedAndEncrypted-Unicast */ +typedef Vanetza_Security2_EtsiTs103097Data_Encrypted_93P1_t Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_115P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_Unicast_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted.c b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted.c new file mode 100644 index 000000000..41ee5e7a4 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted.c @@ -0,0 +1,9 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-SignedAndEncrypted.h" + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted.h b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted.h new file mode 100644 index 000000000..0ce889185 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedAndEncrypted.h @@ -0,0 +1,23 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_H_ +#define _Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_H_ + + +#include "asn_application.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_SignedAndEncrypted_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-SignedExternalPayload.c b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedExternalPayload.c new file mode 100644 index 000000000..0274dab6f --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedExternalPayload.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-SignedExternalPayload.h" + +int +Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_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 Vanetza_Security2_EtsiTs103097Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload = { + "EtsiTs103097Data-SignedExternalPayload", + "EtsiTs103097Data-SignedExternalPayload", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-SignedExternalPayload.h b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedExternalPayload.h new file mode 100644 index 000000000..7c258b107 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-SignedExternalPayload.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_H_ +#define _Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Data-SignedExternalPayload */ +typedef Vanetza_Security2_EtsiTs103097Data_t Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_SignedExternalPayload_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Unsecured.c b/vanetza/asn1/security/r2/EtsiTs103097Data-Unsecured.c new file mode 100644 index 000000000..b62ea58d2 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Unsecured.c @@ -0,0 +1,9 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data-Unsecured.h" + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data-Unsecured.h b/vanetza/asn1/security/r2/EtsiTs103097Data-Unsecured.h new file mode 100644 index 000000000..b4f315658 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data-Unsecured.h @@ -0,0 +1,23 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_Unsecured_H_ +#define _Vanetza_Security2_EtsiTs103097Data_Unsecured_H_ + + +#include "asn_application.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_Unsecured_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data.c b/vanetza/asn1/security/r2/EtsiTs103097Data.c new file mode 100644 index 000000000..70002970b --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097Data.h" + +int +Vanetza_Security2_EtsiTs103097Data_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097Data_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data = { + "EtsiTs103097Data", + "EtsiTs103097Data", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097Data_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097Data_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097Data_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097Data_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097Data.h b/vanetza/asn1/security/r2/EtsiTs103097Data.h new file mode 100644 index 000000000..3a1820bdb --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097Data.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097Module" + * found in "asn1/release2/TS103097v211.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097Data_H_ +#define _Vanetza_Security2_EtsiTs103097Data_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097Data */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_EtsiTs103097Data_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097Data_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097Data; +asn_struct_free_f Vanetza_Security2_EtsiTs103097Data_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097Data_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097Data_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097Data_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097Data_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097Data_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097Data_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097Data_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097Data_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097Data_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097ExtensionModule_ExtId.c b/vanetza/asn1/security/r2/EtsiTs103097ExtensionModule_ExtId.c new file mode 100644 index 000000000..b5f559ecd --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097ExtensionModule_ExtId.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097ExtensionModule_ExtId.h" + +int +Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId = { + "ExtId", + "ExtId", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097ExtensionModule_ExtId.h b/vanetza/asn1/security/r2/EtsiTs103097ExtensionModule_ExtId.h new file mode 100644 index 000000000..a118fa7da --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097ExtensionModule_ExtId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_H_ +#define _Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId */ +typedef long Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId; +asn_struct_free_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/EtsiTs103097HeaderInfoExtensionId.c b/vanetza/asn1/security/r2/EtsiTs103097HeaderInfoExtensionId.c new file mode 100644 index 000000000..623457118 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097HeaderInfoExtensionId.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "EtsiTs103097HeaderInfoExtensionId.h" + +int +Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId = { + "EtsiTs103097HeaderInfoExtensionId", + "EtsiTs103097HeaderInfoExtensionId", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/EtsiTs103097HeaderInfoExtensionId.h b/vanetza/asn1/security/r2/EtsiTs103097HeaderInfoExtensionId.h new file mode 100644 index 000000000..50b407857 --- /dev/null +++ b/vanetza/asn1/security/r2/EtsiTs103097HeaderInfoExtensionId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_H_ +#define _Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097ExtensionModule_ExtId.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId */ +typedef Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_t Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId; +asn_struct_free_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_free; +asn_struct_print_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_print; +asn_constr_check_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_constraint; +ber_type_decoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_decode_ber; +der_type_encoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_encode_der; +xer_type_decoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_decode_xer; +xer_type_encoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_encode_xer; +jer_type_encoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_encode_jer; +oer_type_decoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_decode_oer; +oer_type_encoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_encode_oer; +per_type_decoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_decode_uper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_encode_uper; +per_type_decoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_decode_aper; +per_type_encoder_f Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_EtsiTs103097HeaderInfoExtensionId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ExpansionAlgorithmIdentifier.c b/vanetza/asn1/security/r2/ExpansionAlgorithmIdentifier.c new file mode 100644 index 000000000..b0d242380 --- /dev/null +++ b/vanetza/asn1/security/r2/ExpansionAlgorithmIdentifier.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ExpansionAlgorithmIdentifier.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ExpansionAlgorithmIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ExpansionAlgorithmIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_ExpansionAlgorithmIdentifier_value2enum_1[] = { + { 0, 18, "sha256ForI-aesForJ" }, + { 1, 15, "sm3ForI-sm4ForJ" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_Vanetza_Security2_ExpansionAlgorithmIdentifier_enum2value_1[] = { + 0, /* sha256ForI-aesForJ(0) */ + 1 /* sm3ForI-sm4ForJ(1) */ + /* This list is extensible */ +}; +static const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_ExpansionAlgorithmIdentifier_specs_1 = { + asn_MAP_Vanetza_Security2_ExpansionAlgorithmIdentifier_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_ExpansionAlgorithmIdentifier_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 3, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier = { + "ExpansionAlgorithmIdentifier", + "ExpansionAlgorithmIdentifier", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ExpansionAlgorithmIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ExpansionAlgorithmIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_ExpansionAlgorithmIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ExpansionAlgorithmIdentifier.h b/vanetza/asn1/security/r2/ExpansionAlgorithmIdentifier.h new file mode 100644 index 000000000..8b606f155 --- /dev/null +++ b/vanetza/asn1/security/r2/ExpansionAlgorithmIdentifier.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ExpansionAlgorithmIdentifier_H_ +#define _Vanetza_Security2_ExpansionAlgorithmIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_ExpansionAlgorithmIdentifier { + Vanetza_Security2_ExpansionAlgorithmIdentifier_sha256ForI_aesForJ = 0, + Vanetza_Security2_ExpansionAlgorithmIdentifier_sm3ForI_sm4ForJ = 1 + /* + * Enumeration is extensible + */ +} e_Vanetza_Security2_ExpansionAlgorithmIdentifier; + +/* Vanetza_Security2_ExpansionAlgorithmIdentifier */ +typedef long Vanetza_Security2_ExpansionAlgorithmIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ExpansionAlgorithmIdentifier; +asn_struct_free_f Vanetza_Security2_ExpansionAlgorithmIdentifier_free; +asn_struct_print_f Vanetza_Security2_ExpansionAlgorithmIdentifier_print; +asn_constr_check_f Vanetza_Security2_ExpansionAlgorithmIdentifier_constraint; +ber_type_decoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_decode_ber; +der_type_encoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_encode_der; +xer_type_decoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_decode_xer; +xer_type_encoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_encode_xer; +jer_type_encoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_encode_jer; +oer_type_decoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_decode_oer; +oer_type_encoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_encode_oer; +per_type_decoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_decode_uper; +per_type_encoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_encode_uper; +per_type_decoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_decode_aper; +per_type_encoder_f Vanetza_Security2_ExpansionAlgorithmIdentifier_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ExpansionAlgorithmIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ExplicitCertificate.c b/vanetza/asn1/security/r2/ExplicitCertificate.c new file mode 100644 index 000000000..99fb29d2f --- /dev/null +++ b/vanetza/asn1/security/r2/ExplicitCertificate.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ExplicitCertificate.h" + +int +Vanetza_Security2_ExplicitCertificate_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 Vanetza_Security2_CertificateBase, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ExplicitCertificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ExplicitCertificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ExplicitCertificate = { + "ExplicitCertificate", + "ExplicitCertificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ExplicitCertificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ExplicitCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ExplicitCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ExplicitCertificate_constraint + }, + asn_MBR_Vanetza_Security2_CertificateBase_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateBase_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ExplicitCertificate.h b/vanetza/asn1/security/r2/ExplicitCertificate.h new file mode 100644 index 000000000..1bf51c6c3 --- /dev/null +++ b/vanetza/asn1/security/r2/ExplicitCertificate.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ExplicitCertificate_H_ +#define _Vanetza_Security2_ExplicitCertificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CertificateBase.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ExplicitCertificate */ +typedef Vanetza_Security2_CertificateBase_t Vanetza_Security2_ExplicitCertificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ExplicitCertificate; +asn_struct_free_f Vanetza_Security2_ExplicitCertificate_free; +asn_struct_print_f Vanetza_Security2_ExplicitCertificate_print; +asn_constr_check_f Vanetza_Security2_ExplicitCertificate_constraint; +ber_type_decoder_f Vanetza_Security2_ExplicitCertificate_decode_ber; +der_type_encoder_f Vanetza_Security2_ExplicitCertificate_encode_der; +xer_type_decoder_f Vanetza_Security2_ExplicitCertificate_decode_xer; +xer_type_encoder_f Vanetza_Security2_ExplicitCertificate_encode_xer; +jer_type_encoder_f Vanetza_Security2_ExplicitCertificate_encode_jer; +oer_type_decoder_f Vanetza_Security2_ExplicitCertificate_decode_oer; +oer_type_encoder_f Vanetza_Security2_ExplicitCertificate_encode_oer; +per_type_decoder_f Vanetza_Security2_ExplicitCertificate_decode_uper; +per_type_encoder_f Vanetza_Security2_ExplicitCertificate_encode_uper; +per_type_decoder_f Vanetza_Security2_ExplicitCertificate_decode_aper; +per_type_encoder_f Vanetza_Security2_ExplicitCertificate_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ExplicitCertificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Extension.c b/vanetza/asn1/security/r2/Extension.c new file mode 100644 index 000000000..bedac23de --- /dev/null +++ b/vanetza/asn1/security/r2/Extension.c @@ -0,0 +1,281 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Extension.h" + +static const long asn_VAL_1_Vanetza_Security2_etsiTs102941CrlRequestId = 1; +static const long asn_VAL_2_Vanetza_Security2_etsiTs102941DeltaCtlRequestId = 2; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1_rows[] = { + { "&extId", aioc__value, &asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId, &asn_VAL_1_Vanetza_Security2_etsiTs102941CrlRequestId }, + { "&ExtContent", aioc__type, &asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest }, + { "&extId", aioc__value, &asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId, &asn_VAL_2_Vanetza_Security2_etsiTs102941DeltaCtlRequestId }, + { "&ExtContent", aioc__type, &asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1[] = { + { 2, 2, asn_IOS_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1_rows } +}; +static int +memb_Vanetza_Security2_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* 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_type_selector_result_t +select_EtsiTs103097HeaderInfoExtensions_Vanetza_Security2_content_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1; + size_t constraining_column = 0; /* &extId */ + size_t for_column = 1; /* &ExtContent */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_Vanetza_Security2_content_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_content_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content, choice.EtsiTs102941CrlRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_EtsiTs102941CrlRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "EtsiTs102941CrlRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content, choice.EtsiTs102941DeltaCtlRequest), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_EtsiTs102941DeltaCtlRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "EtsiTs102941DeltaCtlRequest" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_content_tag2el_3[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* EtsiTs102941CrlRequest */ + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* EtsiTs102941DeltaCtlRequest */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_content_specs_3 = { + sizeof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content), + offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content, _asn_ctx), + offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content, present), + sizeof(((struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content *)0)->present), + asn_MAP_Vanetza_Security2_content_tag2el_3, + 2, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_content_3 = { + "content", + "content", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_Vanetza_Security2_content_3, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_content_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_id_constraint_1 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_content_3, + select_EtsiTs103097HeaderInfoExtensions_Vanetza_Security2_content_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_content_constraint_1 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_specs_1 = { + sizeof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions), + offsetof(struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions, _asn_ctx), + asn_MAP_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_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_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions = { + "EtsiTs103097HeaderInfoExtensions", + "EtsiTs103097HeaderInfoExtensions", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Extension.h b/vanetza/asn1/security/r2/Extension.h new file mode 100644 index 000000000..b12a10cb6 --- /dev/null +++ b/vanetza/asn1/security/r2/Extension.h @@ -0,0 +1,63 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Extension_H_ +#define _Vanetza_Security2_Extension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097ExtensionModule_ExtId.h" +#include "ANY.h" +#include "asn_ioc.h" +#include "EtsiTs102941CrlRequest.h" +#include "EtsiTs102941DeltaCtlRequest.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content_PR { + Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content_PR_NOTHING, /* No components present */ + Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content_PR_EtsiTs102941CrlRequest, + Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content_PR_EtsiTs102941DeltaCtlRequest +} Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content_PR; + +/* Vanetza_Security2_Extension */ +typedef struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions { + Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId_t id; + struct Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content { + Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__content_PR present; + union Vanetza_Security2_EtsiTs103097HeaderInfoExtensions__Vanetza_Security2_content_u { + Vanetza_Security2_EtsiTs102941CrlRequest_t EtsiTs102941CrlRequest; + Vanetza_Security2_EtsiTs102941DeltaCtlRequest_t EtsiTs102941DeltaCtlRequest; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_EtsiTs103097HeaderInfoExtensions_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Extension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ExtensionModuleVersion.c b/vanetza/asn1/security/r2/ExtensionModuleVersion.c new file mode 100644 index 000000000..eb6001496 --- /dev/null +++ b/vanetza/asn1/security/r2/ExtensionModuleVersion.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ExtensionModuleVersion.h" + +int +Vanetza_Security2_ExtensionModuleVersion_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ExtensionModuleVersion_constr_1 CC_NOTUSED = { + { 1, 1 } /* (1..1) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ExtensionModuleVersion_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (1..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ExtensionModuleVersion = { + "ExtensionModuleVersion", + "ExtensionModuleVersion", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ExtensionModuleVersion_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ExtensionModuleVersion_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ExtensionModuleVersion_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ExtensionModuleVersion_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/ExtensionModuleVersion.h b/vanetza/asn1/security/r2/ExtensionModuleVersion.h new file mode 100644 index 000000000..c2a05997e --- /dev/null +++ b/vanetza/asn1/security/r2/ExtensionModuleVersion.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs103097ExtensionModule" + * found in "asn1/release2/TS103097v211-Extension.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ExtensionModuleVersion_H_ +#define _Vanetza_Security2_ExtensionModuleVersion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ExtensionModuleVersion */ +typedef long Vanetza_Security2_ExtensionModuleVersion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ExtensionModuleVersion; +asn_struct_free_f Vanetza_Security2_ExtensionModuleVersion_free; +asn_struct_print_f Vanetza_Security2_ExtensionModuleVersion_print; +asn_constr_check_f Vanetza_Security2_ExtensionModuleVersion_constraint; +ber_type_decoder_f Vanetza_Security2_ExtensionModuleVersion_decode_ber; +der_type_encoder_f Vanetza_Security2_ExtensionModuleVersion_encode_der; +xer_type_decoder_f Vanetza_Security2_ExtensionModuleVersion_decode_xer; +xer_type_encoder_f Vanetza_Security2_ExtensionModuleVersion_encode_xer; +jer_type_encoder_f Vanetza_Security2_ExtensionModuleVersion_encode_jer; +oer_type_decoder_f Vanetza_Security2_ExtensionModuleVersion_decode_oer; +oer_type_encoder_f Vanetza_Security2_ExtensionModuleVersion_encode_oer; +per_type_decoder_f Vanetza_Security2_ExtensionModuleVersion_decode_uper; +per_type_encoder_f Vanetza_Security2_ExtensionModuleVersion_encode_uper; +per_type_decoder_f Vanetza_Security2_ExtensionModuleVersion_decode_aper; +per_type_encoder_f Vanetza_Security2_ExtensionModuleVersion_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ExtensionModuleVersion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/FullCtl.c b/vanetza/asn1/security/r2/FullCtl.c new file mode 100644 index 000000000..1c6a32533 --- /dev/null +++ b/vanetza/asn1/security/r2/FullCtl.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "FullCtl.h" + +int +Vanetza_Security2_FullCtl_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 Vanetza_Security2_CtlFormat, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_FullCtl_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_FullCtl_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_FullCtl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_FullCtl = { + "FullCtl", + "FullCtl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_FullCtl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_FullCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_FullCtl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_FullCtl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_FullCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_FullCtl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_FullCtl_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_FullCtl_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_FullCtl_constraint + }, + asn_MBR_Vanetza_Security2_CtlFormat_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlFormat_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/FullCtl.h b/vanetza/asn1/security/r2/FullCtl.h new file mode 100644 index 000000000..27871f240 --- /dev/null +++ b/vanetza/asn1/security/r2/FullCtl.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_FullCtl_H_ +#define _Vanetza_Security2_FullCtl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlFormat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_FullCtl */ +typedef Vanetza_Security2_CtlFormat_t Vanetza_Security2_FullCtl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_FullCtl; +asn_struct_free_f Vanetza_Security2_FullCtl_free; +asn_struct_print_f Vanetza_Security2_FullCtl_print; +asn_constr_check_f Vanetza_Security2_FullCtl_constraint; +ber_type_decoder_f Vanetza_Security2_FullCtl_decode_ber; +der_type_encoder_f Vanetza_Security2_FullCtl_encode_der; +xer_type_decoder_f Vanetza_Security2_FullCtl_decode_xer; +xer_type_encoder_f Vanetza_Security2_FullCtl_encode_xer; +jer_type_encoder_f Vanetza_Security2_FullCtl_encode_jer; +oer_type_decoder_f Vanetza_Security2_FullCtl_decode_oer; +oer_type_encoder_f Vanetza_Security2_FullCtl_encode_oer; +per_type_decoder_f Vanetza_Security2_FullCtl_decode_uper; +per_type_encoder_f Vanetza_Security2_FullCtl_encode_uper; +per_type_decoder_f Vanetza_Security2_FullCtl_decode_aper; +per_type_encoder_f Vanetza_Security2_FullCtl_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_FullCtl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/FullIeeeTbsCtl.c b/vanetza/asn1/security/r2/FullIeeeTbsCtl.c new file mode 100644 index 000000000..d6d92cec2 --- /dev/null +++ b/vanetza/asn1/security/r2/FullIeeeTbsCtl.c @@ -0,0 +1,515 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "FullIeeeTbsCtl.h" + +static int +memb_Vanetza_Security2_type_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_type_constr_2 CC_NOTUSED = { + { 1, 1 } /* (1..1) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_type_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (1..1) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_electorApprove_6[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CtlElectorEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_electorApprove_tags_6[] = { + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_electorApprove_specs_6 = { + sizeof(struct Vanetza_Security2_FullIeeeTbsCtl__electorApprove), + offsetof(struct Vanetza_Security2_FullIeeeTbsCtl__electorApprove, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_electorApprove_6 = { + "electorApprove", + "electorApprove", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_electorApprove_tags_6, + sizeof(asn_DEF_Vanetza_Security2_electorApprove_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_electorApprove_tags_6[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_electorApprove_tags_6, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_electorApprove_tags_6) + /sizeof(asn_DEF_Vanetza_Security2_electorApprove_tags_6[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_electorApprove_6, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_electorApprove_specs_6 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_electorRemove_8[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CtlElectorEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_electorRemove_tags_8[] = { + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_electorRemove_specs_8 = { + sizeof(struct Vanetza_Security2_FullIeeeTbsCtl__electorRemove), + offsetof(struct Vanetza_Security2_FullIeeeTbsCtl__electorRemove, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_electorRemove_8 = { + "electorRemove", + "electorRemove", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_electorRemove_tags_8, + sizeof(asn_DEF_Vanetza_Security2_electorRemove_tags_8) + /sizeof(asn_DEF_Vanetza_Security2_electorRemove_tags_8[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_electorRemove_tags_8, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_electorRemove_tags_8) + /sizeof(asn_DEF_Vanetza_Security2_electorRemove_tags_8[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_electorRemove_8, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_electorRemove_specs_8 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_rootCaApprove_10[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CtlRootCaEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_rootCaApprove_tags_10[] = { + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_rootCaApprove_specs_10 = { + sizeof(struct Vanetza_Security2_FullIeeeTbsCtl__rootCaApprove), + offsetof(struct Vanetza_Security2_FullIeeeTbsCtl__rootCaApprove, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_rootCaApprove_10 = { + "rootCaApprove", + "rootCaApprove", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_rootCaApprove_tags_10, + sizeof(asn_DEF_Vanetza_Security2_rootCaApprove_tags_10) + /sizeof(asn_DEF_Vanetza_Security2_rootCaApprove_tags_10[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_rootCaApprove_tags_10, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_rootCaApprove_tags_10) + /sizeof(asn_DEF_Vanetza_Security2_rootCaApprove_tags_10[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_rootCaApprove_10, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_rootCaApprove_specs_10 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_rootCaRemove_12[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CtlRootCaEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_rootCaRemove_tags_12[] = { + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_rootCaRemove_specs_12 = { + sizeof(struct Vanetza_Security2_FullIeeeTbsCtl__rootCaRemove), + offsetof(struct Vanetza_Security2_FullIeeeTbsCtl__rootCaRemove, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_rootCaRemove_12 = { + "rootCaRemove", + "rootCaRemove", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_rootCaRemove_tags_12, + sizeof(asn_DEF_Vanetza_Security2_rootCaRemove_tags_12) + /sizeof(asn_DEF_Vanetza_Security2_rootCaRemove_tags_12[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_rootCaRemove_tags_12, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_rootCaRemove_tags_12) + /sizeof(asn_DEF_Vanetza_Security2_rootCaRemove_tags_12[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_rootCaRemove_12, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_rootCaRemove_specs_12 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_FullIeeeTbsCtl_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_type_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_type_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_type_constraint_1 + }, + 0, 0, /* No default value */ + "type" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, ctlSeriesId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlSeriesId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ctlSeriesId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, sequenceNumber), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlSequenceNumber, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sequenceNumber" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, effectiveDate), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "effectiveDate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, electorApprove), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_electorApprove_6, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "electorApprove" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, electorRemove), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + 0, + &asn_DEF_Vanetza_Security2_electorRemove_8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "electorRemove" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, rootCaApprove), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + 0, + &asn_DEF_Vanetza_Security2_rootCaApprove_10, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rootCaApprove" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, rootCaRemove), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + 0, + &asn_DEF_Vanetza_Security2_rootCaRemove_12, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rootCaRemove" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, quorum), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "quorum" + }, +}; +static const int asn_MAP_Vanetza_Security2_FullIeeeTbsCtl_oms_1[] = { 8 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_FullIeeeTbsCtl_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ctlSeriesId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sequenceNumber */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* effectiveDate */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* electorApprove */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* electorRemove */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* rootCaApprove */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* rootCaRemove */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 } /* quorum */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_FullIeeeTbsCtl_specs_1 = { + sizeof(struct Vanetza_Security2_FullIeeeTbsCtl), + offsetof(struct Vanetza_Security2_FullIeeeTbsCtl, _asn_ctx), + asn_MAP_Vanetza_Security2_FullIeeeTbsCtl_tag2el_1, + 9, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_FullIeeeTbsCtl_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 8, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_FullIeeeTbsCtl = { + "FullIeeeTbsCtl", + "FullIeeeTbsCtl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_FullIeeeTbsCtl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_FullIeeeTbsCtl_1, + 9, /* Elements count */ + &asn_SPC_Vanetza_Security2_FullIeeeTbsCtl_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/FullIeeeTbsCtl.h b/vanetza/asn1/security/r2/FullIeeeTbsCtl.h new file mode 100644 index 000000000..779045a42 --- /dev/null +++ b/vanetza/asn1/security/r2/FullIeeeTbsCtl.h @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_FullIeeeTbsCtl_H_ +#define _Vanetza_Security2_FullIeeeTbsCtl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609dot2dot1MsctlType.h" +#include "CtlSeriesId.h" +#include "CtlSequenceNumber.h" +#include "Time32.h" +#include "NativeInteger.h" +#include "CtlElectorEntry.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "CtlRootCaEntry.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_FullIeeeTbsCtl */ +typedef struct Vanetza_Security2_FullIeeeTbsCtl { + Vanetza_Security2_Ieee1609dot2dot1MsctlType_t type; + Vanetza_Security2_CtlSeriesId_t ctlSeriesId; + Vanetza_Security2_CtlSequenceNumber_t sequenceNumber; + Vanetza_Security2_Time32_t effectiveDate; + struct Vanetza_Security2_FullIeeeTbsCtl__electorApprove { + A_SEQUENCE_OF(Vanetza_Security2_CtlElectorEntry_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } electorApprove; + struct Vanetza_Security2_FullIeeeTbsCtl__electorRemove { + A_SEQUENCE_OF(Vanetza_Security2_CtlElectorEntry_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } electorRemove; + struct Vanetza_Security2_FullIeeeTbsCtl__rootCaApprove { + A_SEQUENCE_OF(Vanetza_Security2_CtlRootCaEntry_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } rootCaApprove; + struct Vanetza_Security2_FullIeeeTbsCtl__rootCaRemove { + A_SEQUENCE_OF(Vanetza_Security2_CtlRootCaEntry_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } rootCaRemove; + /* + * This type is extensible, + * possible extensions are below. + */ + long *quorum; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_FullIeeeTbsCtl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_FullIeeeTbsCtl; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_FullIeeeTbsCtl_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_FullIeeeTbsCtl_1[9]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_FullIeeeTbsCtl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/GeographicRegion.c b/vanetza/asn1/security/r2/GeographicRegion.c new file mode 100644 index 000000000..0db72120a --- /dev/null +++ b/vanetza/asn1/security/r2/GeographicRegion.c @@ -0,0 +1,144 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "GeographicRegion.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_GeographicRegion_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_GeographicRegion_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_GeographicRegion_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GeographicRegion, choice.circularRegion), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CircularRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "circularRegion" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GeographicRegion, choice.rectangularRegion), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rectangularRegion" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GeographicRegion, choice.polygonalRegion), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PolygonalRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "polygonalRegion" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GeographicRegion, choice.identifiedRegion), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "identifiedRegion" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_GeographicRegion_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* circularRegion */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rectangularRegion */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* polygonalRegion */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* identifiedRegion */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_GeographicRegion_specs_1 = { + sizeof(struct Vanetza_Security2_GeographicRegion), + offsetof(struct Vanetza_Security2_GeographicRegion, _asn_ctx), + offsetof(struct Vanetza_Security2_GeographicRegion, present), + sizeof(((struct Vanetza_Security2_GeographicRegion *)0)->present), + asn_MAP_Vanetza_Security2_GeographicRegion_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GeographicRegion = { + "GeographicRegion", + "GeographicRegion", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_GeographicRegion_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_GeographicRegion_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_GeographicRegion_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_GeographicRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/GeographicRegion.h b/vanetza/asn1/security/r2/GeographicRegion.h new file mode 100644 index 000000000..02b99114b --- /dev/null +++ b/vanetza/asn1/security/r2/GeographicRegion.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_GeographicRegion_H_ +#define _Vanetza_Security2_GeographicRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CircularRegion.h" +#include "SequenceOfRectangularRegion.h" +#include "PolygonalRegion.h" +#include "SequenceOfIdentifiedRegion.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_GeographicRegion_PR { + Vanetza_Security2_GeographicRegion_PR_NOTHING, /* No components present */ + Vanetza_Security2_GeographicRegion_PR_circularRegion, + Vanetza_Security2_GeographicRegion_PR_rectangularRegion, + Vanetza_Security2_GeographicRegion_PR_polygonalRegion, + Vanetza_Security2_GeographicRegion_PR_identifiedRegion + /* Extensions may appear below */ + +} Vanetza_Security2_GeographicRegion_PR; + +/* Vanetza_Security2_GeographicRegion */ +typedef struct Vanetza_Security2_GeographicRegion { + Vanetza_Security2_GeographicRegion_PR present; + union Vanetza_Security2_GeographicRegion_u { + Vanetza_Security2_CircularRegion_t circularRegion; + Vanetza_Security2_SequenceOfRectangularRegion_t rectangularRegion; + Vanetza_Security2_PolygonalRegion_t polygonalRegion; + Vanetza_Security2_SequenceOfIdentifiedRegion_t identifiedRegion; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_GeographicRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GeographicRegion; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_GeographicRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_GeographicRegion_1[4]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_GeographicRegion_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_GeographicRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/GroupCrlEntry.c b/vanetza/asn1/security/r2/GroupCrlEntry.c new file mode 100644 index 000000000..0c3c8ad08 --- /dev/null +++ b/vanetza/asn1/security/r2/GroupCrlEntry.c @@ -0,0 +1,156 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "GroupCrlEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_GroupCrlEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupCrlEntry, iMax), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "iMax" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupCrlEntry, la1Id), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la1Id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupCrlEntry, linkageSeed1), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageSeed1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupCrlEntry, la2Id), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la2Id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupCrlEntry, linkageSeed2), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageSeed2" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_GroupCrlEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iMax */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* la1Id */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* linkageSeed1 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* la2Id */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* linkageSeed2 */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_GroupCrlEntry_specs_1 = { + sizeof(struct Vanetza_Security2_GroupCrlEntry), + offsetof(struct Vanetza_Security2_GroupCrlEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_GroupCrlEntry_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GroupCrlEntry = { + "GroupCrlEntry", + "GroupCrlEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_GroupCrlEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_GroupCrlEntry_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_GroupCrlEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/GroupCrlEntry.h b/vanetza/asn1/security/r2/GroupCrlEntry.h new file mode 100644 index 000000000..a47523a1d --- /dev/null +++ b/vanetza/asn1/security/r2/GroupCrlEntry.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_GroupCrlEntry_H_ +#define _Vanetza_Security2_GroupCrlEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" +#include "LaId.h" +#include "LinkageSeed.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_GroupCrlEntry */ +typedef struct Vanetza_Security2_GroupCrlEntry { + Vanetza_Security2_Uint16_t iMax; + Vanetza_Security2_LaId_t la1Id; + Vanetza_Security2_LinkageSeed_t linkageSeed1; + Vanetza_Security2_LaId_t la2Id; + Vanetza_Security2_LinkageSeed_t linkageSeed2; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_GroupCrlEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GroupCrlEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_GroupCrlEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_GroupCrlEntry_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_GroupCrlEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/GroupLinkageValue.c b/vanetza/asn1/security/r2/GroupLinkageValue.c new file mode 100644 index 000000000..3ee022620 --- /dev/null +++ b/vanetza/asn1/security/r2/GroupLinkageValue.c @@ -0,0 +1,169 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "GroupLinkageValue.h" + +static int +memb_Vanetza_Security2_jValue_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 == 4UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_value_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 == 9UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_jValue_constr_2 CC_NOTUSED = { + { 0, 0 }, + 4 /* (SIZE(4..4)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_jValue_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_value_constr_3 CC_NOTUSED = { + { 0, 0 }, + 9 /* (SIZE(9..9)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_value_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 9, 9 } /* (SIZE(9..9)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_GroupLinkageValue_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupLinkageValue, jValue), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_jValue_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_jValue_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_jValue_constraint_1 + }, + 0, 0, /* No default value */ + "jValue" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupLinkageValue, value), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_value_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_value_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_value_constraint_1 + }, + 0, 0, /* No default value */ + "value" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_GroupLinkageValue_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* jValue */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_GroupLinkageValue_specs_1 = { + sizeof(struct Vanetza_Security2_GroupLinkageValue), + offsetof(struct Vanetza_Security2_GroupLinkageValue, _asn_ctx), + asn_MAP_Vanetza_Security2_GroupLinkageValue_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_Vanetza_Security2_GroupLinkageValue = { + "GroupLinkageValue", + "GroupLinkageValue", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1, + sizeof(asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_GroupLinkageValue_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_GroupLinkageValue_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_GroupLinkageValue_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/GroupLinkageValue.h b/vanetza/asn1/security/r2/GroupLinkageValue.h new file mode 100644 index 000000000..95bb28e51 --- /dev/null +++ b/vanetza/asn1/security/r2/GroupLinkageValue.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_GroupLinkageValue_H_ +#define _Vanetza_Security2_GroupLinkageValue_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_GroupLinkageValue */ +typedef struct Vanetza_Security2_GroupLinkageValue { + OCTET_STRING_t jValue; + OCTET_STRING_t value; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_GroupLinkageValue_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GroupLinkageValue; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_GroupLinkageValue_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_GroupLinkageValue_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_GroupLinkageValue_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/GroupSingleSeedCrlEntry.c b/vanetza/asn1/security/r2/GroupSingleSeedCrlEntry.c new file mode 100644 index 000000000..9080bc89e --- /dev/null +++ b/vanetza/asn1/security/r2/GroupSingleSeedCrlEntry.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "GroupSingleSeedCrlEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_GroupSingleSeedCrlEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupSingleSeedCrlEntry, iMax), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "iMax" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupSingleSeedCrlEntry, laId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "laId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_GroupSingleSeedCrlEntry, linkageSeed), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageSeed" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_GroupSingleSeedCrlEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iMax */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* laId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* linkageSeed */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_GroupSingleSeedCrlEntry_specs_1 = { + sizeof(struct Vanetza_Security2_GroupSingleSeedCrlEntry), + offsetof(struct Vanetza_Security2_GroupSingleSeedCrlEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_GroupSingleSeedCrlEntry_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry = { + "GroupSingleSeedCrlEntry", + "GroupSingleSeedCrlEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_GroupSingleSeedCrlEntry_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_GroupSingleSeedCrlEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/GroupSingleSeedCrlEntry.h b/vanetza/asn1/security/r2/GroupSingleSeedCrlEntry.h new file mode 100644 index 000000000..0b27652b4 --- /dev/null +++ b/vanetza/asn1/security/r2/GroupSingleSeedCrlEntry.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_GroupSingleSeedCrlEntry_H_ +#define _Vanetza_Security2_GroupSingleSeedCrlEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" +#include "LaId.h" +#include "LinkageSeed.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_GroupSingleSeedCrlEntry */ +typedef struct Vanetza_Security2_GroupSingleSeedCrlEntry { + Vanetza_Security2_Uint16_t iMax; + Vanetza_Security2_LaId_t laId; + Vanetza_Security2_LinkageSeed_t linkageSeed; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_GroupSingleSeedCrlEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_GroupSingleSeedCrlEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_GroupSingleSeedCrlEntry_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_GroupSingleSeedCrlEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashAlgorithm.c b/vanetza/asn1/security/r2/HashAlgorithm.c new file mode 100644 index 000000000..372d8294a --- /dev/null +++ b/vanetza/asn1/security/r2/HashAlgorithm.c @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashAlgorithm.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashAlgorithm_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashAlgorithm_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_HashAlgorithm_value2enum_1[] = { + { 0, 6, "sha256" }, + { 1, 6, "sha384" }, + { 2, 3, "sm3" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_Vanetza_Security2_HashAlgorithm_enum2value_1[] = { + 0, /* sha256(0) */ + 1, /* sha384(1) */ + 2 /* sm3(2) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_HashAlgorithm_specs_1 = { + asn_MAP_Vanetza_Security2_HashAlgorithm_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_HashAlgorithm_enum2value_1, /* N => "tag"; sorted by N */ + 3, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashAlgorithm = { + "HashAlgorithm", + "HashAlgorithm", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashAlgorithm_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashAlgorithm_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashAlgorithm_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_HashAlgorithm_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashAlgorithm.h b/vanetza/asn1/security/r2/HashAlgorithm.h new file mode 100644 index 000000000..18f621e61 --- /dev/null +++ b/vanetza/asn1/security/r2/HashAlgorithm.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashAlgorithm_H_ +#define _Vanetza_Security2_HashAlgorithm_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_HashAlgorithm { + Vanetza_Security2_HashAlgorithm_sha256 = 0, + /* + * Enumeration is extensible + */ + Vanetza_Security2_HashAlgorithm_sha384 = 1, + Vanetza_Security2_HashAlgorithm_sm3 = 2 +} e_Vanetza_Security2_HashAlgorithm; + +/* Vanetza_Security2_HashAlgorithm */ +typedef long Vanetza_Security2_HashAlgorithm_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashAlgorithm_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashAlgorithm; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_HashAlgorithm_specs_1; +asn_struct_free_f Vanetza_Security2_HashAlgorithm_free; +asn_struct_print_f Vanetza_Security2_HashAlgorithm_print; +asn_constr_check_f Vanetza_Security2_HashAlgorithm_constraint; +ber_type_decoder_f Vanetza_Security2_HashAlgorithm_decode_ber; +der_type_encoder_f Vanetza_Security2_HashAlgorithm_encode_der; +xer_type_decoder_f Vanetza_Security2_HashAlgorithm_decode_xer; +xer_type_encoder_f Vanetza_Security2_HashAlgorithm_encode_xer; +jer_type_encoder_f Vanetza_Security2_HashAlgorithm_encode_jer; +oer_type_decoder_f Vanetza_Security2_HashAlgorithm_decode_oer; +oer_type_encoder_f Vanetza_Security2_HashAlgorithm_encode_oer; +per_type_decoder_f Vanetza_Security2_HashAlgorithm_decode_uper; +per_type_encoder_f Vanetza_Security2_HashAlgorithm_encode_uper; +per_type_decoder_f Vanetza_Security2_HashAlgorithm_decode_aper; +per_type_encoder_f Vanetza_Security2_HashAlgorithm_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashAlgorithm_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashBasedRevocationInfo.c b/vanetza/asn1/security/r2/HashBasedRevocationInfo.c new file mode 100644 index 000000000..66a379029 --- /dev/null +++ b/vanetza/asn1/security/r2/HashBasedRevocationInfo.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashBasedRevocationInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_HashBasedRevocationInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_HashBasedRevocationInfo, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId10, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_HashBasedRevocationInfo, expiry), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "expiry" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_HashBasedRevocationInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* expiry */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_HashBasedRevocationInfo_specs_1 = { + sizeof(struct Vanetza_Security2_HashBasedRevocationInfo), + offsetof(struct Vanetza_Security2_HashBasedRevocationInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_HashBasedRevocationInfo_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashBasedRevocationInfo = { + "HashBasedRevocationInfo", + "HashBasedRevocationInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashBasedRevocationInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_HashBasedRevocationInfo_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_HashBasedRevocationInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashBasedRevocationInfo.h b/vanetza/asn1/security/r2/HashBasedRevocationInfo.h new file mode 100644 index 000000000..b877c06ec --- /dev/null +++ b/vanetza/asn1/security/r2/HashBasedRevocationInfo.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashBasedRevocationInfo_H_ +#define _Vanetza_Security2_HashBasedRevocationInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId10.h" +#include "Time32.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HashBasedRevocationInfo */ +typedef struct Vanetza_Security2_HashBasedRevocationInfo { + Vanetza_Security2_HashedId10_t id; + Vanetza_Security2_Time32_t expiry; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_HashBasedRevocationInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashBasedRevocationInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_HashBasedRevocationInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_HashBasedRevocationInfo_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashBasedRevocationInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashedData.c b/vanetza/asn1/security/r2/HashedData.c new file mode 100644 index 000000000..c6fe5f50c --- /dev/null +++ b/vanetza/asn1/security/r2/HashedData.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashedData.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashedData_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedData_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_HashedData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_HashedData, choice.sha256HashedData), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sha256HashedData" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_HashedData, choice.sha384HashedData), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId48, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sha384HashedData" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_HashedData, choice.sm3HashedData), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sm3HashedData" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_HashedData_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sha256HashedData */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sha384HashedData */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* sm3HashedData */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_HashedData_specs_1 = { + sizeof(struct Vanetza_Security2_HashedData), + offsetof(struct Vanetza_Security2_HashedData, _asn_ctx), + offsetof(struct Vanetza_Security2_HashedData, present), + sizeof(((struct Vanetza_Security2_HashedData *)0)->present), + asn_MAP_Vanetza_Security2_HashedData_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedData = { + "HashedData", + "HashedData", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashedData_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashedData_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_HashedData_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_HashedData_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashedData.h b/vanetza/asn1/security/r2/HashedData.h new file mode 100644 index 000000000..839986057 --- /dev/null +++ b/vanetza/asn1/security/r2/HashedData.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashedData_H_ +#define _Vanetza_Security2_HashedData_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId32.h" +#include "HashedId48.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_HashedData_PR { + Vanetza_Security2_HashedData_PR_NOTHING, /* No components present */ + Vanetza_Security2_HashedData_PR_sha256HashedData, + /* Extensions may appear below */ + Vanetza_Security2_HashedData_PR_sha384HashedData, + Vanetza_Security2_HashedData_PR_sm3HashedData +} Vanetza_Security2_HashedData_PR; + +/* Vanetza_Security2_HashedData */ +typedef struct Vanetza_Security2_HashedData { + Vanetza_Security2_HashedData_PR present; + union Vanetza_Security2_HashedData_u { + Vanetza_Security2_HashedId32_t sha256HashedData; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_HashedId48_t sha384HashedData; + Vanetza_Security2_HashedId32_t sm3HashedData; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_HashedData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedData; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_HashedData_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_HashedData_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedData_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashedData_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashedId10.c b/vanetza/asn1/security/r2/HashedId10.c new file mode 100644 index 000000000..2b158c300 --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId10.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashedId10.h" + +int +Vanetza_Security2_HashedId10_constraint(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 == 10UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashedId10_constr_1 CC_NOTUSED = { + { 0, 0 }, + 10 /* (SIZE(10..10)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId10_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 10, 10 } /* (SIZE(10..10)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashedId10_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId10 = { + "HashedId10", + "HashedId10", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_HashedId10_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashedId10_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId10_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashedId10_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashedId10_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId10_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashedId10_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashedId10_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_HashedId10_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashedId10.h b/vanetza/asn1/security/r2/HashedId10.h new file mode 100644 index 000000000..c8d2b5163 --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId10.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashedId10_H_ +#define _Vanetza_Security2_HashedId10_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HashedId10 */ +typedef OCTET_STRING_t Vanetza_Security2_HashedId10_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId10_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId10; +asn_struct_free_f Vanetza_Security2_HashedId10_free; +asn_struct_print_f Vanetza_Security2_HashedId10_print; +asn_constr_check_f Vanetza_Security2_HashedId10_constraint; +ber_type_decoder_f Vanetza_Security2_HashedId10_decode_ber; +der_type_encoder_f Vanetza_Security2_HashedId10_encode_der; +xer_type_decoder_f Vanetza_Security2_HashedId10_decode_xer; +xer_type_encoder_f Vanetza_Security2_HashedId10_encode_xer; +jer_type_encoder_f Vanetza_Security2_HashedId10_encode_jer; +oer_type_decoder_f Vanetza_Security2_HashedId10_decode_oer; +oer_type_encoder_f Vanetza_Security2_HashedId10_encode_oer; +per_type_decoder_f Vanetza_Security2_HashedId10_decode_uper; +per_type_encoder_f Vanetza_Security2_HashedId10_encode_uper; +per_type_decoder_f Vanetza_Security2_HashedId10_decode_aper; +per_type_encoder_f Vanetza_Security2_HashedId10_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashedId10_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashedId3.c b/vanetza/asn1/security/r2/HashedId3.c new file mode 100644 index 000000000..61f5845cf --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId3.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashedId3.h" + +int +Vanetza_Security2_HashedId3_constraint(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 == 3UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashedId3_constr_1 CC_NOTUSED = { + { 0, 0 }, + 3 /* (SIZE(3..3)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId3_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashedId3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId3 = { + "HashedId3", + "HashedId3", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_HashedId3_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashedId3_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId3_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashedId3_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashedId3_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId3_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashedId3_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashedId3_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_HashedId3_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashedId3.h b/vanetza/asn1/security/r2/HashedId3.h new file mode 100644 index 000000000..4a8bc808d --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId3.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashedId3_H_ +#define _Vanetza_Security2_HashedId3_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HashedId3 */ +typedef OCTET_STRING_t Vanetza_Security2_HashedId3_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId3_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId3; +asn_struct_free_f Vanetza_Security2_HashedId3_free; +asn_struct_print_f Vanetza_Security2_HashedId3_print; +asn_constr_check_f Vanetza_Security2_HashedId3_constraint; +ber_type_decoder_f Vanetza_Security2_HashedId3_decode_ber; +der_type_encoder_f Vanetza_Security2_HashedId3_encode_der; +xer_type_decoder_f Vanetza_Security2_HashedId3_decode_xer; +xer_type_encoder_f Vanetza_Security2_HashedId3_encode_xer; +jer_type_encoder_f Vanetza_Security2_HashedId3_encode_jer; +oer_type_decoder_f Vanetza_Security2_HashedId3_decode_oer; +oer_type_encoder_f Vanetza_Security2_HashedId3_encode_oer; +per_type_decoder_f Vanetza_Security2_HashedId3_decode_uper; +per_type_encoder_f Vanetza_Security2_HashedId3_encode_uper; +per_type_decoder_f Vanetza_Security2_HashedId3_decode_aper; +per_type_encoder_f Vanetza_Security2_HashedId3_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashedId3_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashedId32.c b/vanetza/asn1/security/r2/HashedId32.c new file mode 100644 index 000000000..f6da7d5b6 --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId32.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashedId32.h" + +int +Vanetza_Security2_HashedId32_constraint(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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashedId32_constr_1 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId32_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashedId32_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId32 = { + "HashedId32", + "HashedId32", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_HashedId32_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashedId32_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId32_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashedId32_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashedId32_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId32_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashedId32_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashedId32_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_HashedId32_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashedId32.h b/vanetza/asn1/security/r2/HashedId32.h new file mode 100644 index 000000000..bf3fb5c67 --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId32.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashedId32_H_ +#define _Vanetza_Security2_HashedId32_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HashedId32 */ +typedef OCTET_STRING_t Vanetza_Security2_HashedId32_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId32_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId32; +asn_struct_free_f Vanetza_Security2_HashedId32_free; +asn_struct_print_f Vanetza_Security2_HashedId32_print; +asn_constr_check_f Vanetza_Security2_HashedId32_constraint; +ber_type_decoder_f Vanetza_Security2_HashedId32_decode_ber; +der_type_encoder_f Vanetza_Security2_HashedId32_encode_der; +xer_type_decoder_f Vanetza_Security2_HashedId32_decode_xer; +xer_type_encoder_f Vanetza_Security2_HashedId32_encode_xer; +jer_type_encoder_f Vanetza_Security2_HashedId32_encode_jer; +oer_type_decoder_f Vanetza_Security2_HashedId32_decode_oer; +oer_type_encoder_f Vanetza_Security2_HashedId32_encode_oer; +per_type_decoder_f Vanetza_Security2_HashedId32_decode_uper; +per_type_encoder_f Vanetza_Security2_HashedId32_encode_uper; +per_type_decoder_f Vanetza_Security2_HashedId32_decode_aper; +per_type_encoder_f Vanetza_Security2_HashedId32_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashedId32_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashedId48.c b/vanetza/asn1/security/r2/HashedId48.c new file mode 100644 index 000000000..98ea4daab --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId48.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashedId48.h" + +int +Vanetza_Security2_HashedId48_constraint(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 == 48UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashedId48_constr_1 CC_NOTUSED = { + { 0, 0 }, + 48 /* (SIZE(48..48)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId48_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 48, 48 } /* (SIZE(48..48)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashedId48_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId48 = { + "HashedId48", + "HashedId48", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_HashedId48_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashedId48_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId48_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashedId48_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashedId48_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId48_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashedId48_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashedId48_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_HashedId48_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashedId48.h b/vanetza/asn1/security/r2/HashedId48.h new file mode 100644 index 000000000..071b840df --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId48.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashedId48_H_ +#define _Vanetza_Security2_HashedId48_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HashedId48 */ +typedef OCTET_STRING_t Vanetza_Security2_HashedId48_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId48_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId48; +asn_struct_free_f Vanetza_Security2_HashedId48_free; +asn_struct_print_f Vanetza_Security2_HashedId48_print; +asn_constr_check_f Vanetza_Security2_HashedId48_constraint; +ber_type_decoder_f Vanetza_Security2_HashedId48_decode_ber; +der_type_encoder_f Vanetza_Security2_HashedId48_encode_der; +xer_type_decoder_f Vanetza_Security2_HashedId48_decode_xer; +xer_type_encoder_f Vanetza_Security2_HashedId48_encode_xer; +jer_type_encoder_f Vanetza_Security2_HashedId48_encode_jer; +oer_type_decoder_f Vanetza_Security2_HashedId48_decode_oer; +oer_type_encoder_f Vanetza_Security2_HashedId48_encode_oer; +per_type_decoder_f Vanetza_Security2_HashedId48_decode_uper; +per_type_encoder_f Vanetza_Security2_HashedId48_encode_uper; +per_type_decoder_f Vanetza_Security2_HashedId48_decode_aper; +per_type_encoder_f Vanetza_Security2_HashedId48_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashedId48_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HashedId8.c b/vanetza/asn1/security/r2/HashedId8.c new file mode 100644 index 000000000..e0e5838ba --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId8.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HashedId8.h" + +int +Vanetza_Security2_HashedId8_constraint(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 == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HashedId8_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId8_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HashedId8_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId8 = { + "HashedId8", + "HashedId8", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_HashedId8_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HashedId8_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId8_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HashedId8_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HashedId8_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HashedId8_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HashedId8_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HashedId8_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_HashedId8_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HashedId8.h b/vanetza/asn1/security/r2/HashedId8.h new file mode 100644 index 000000000..4f8c8b822 --- /dev/null +++ b/vanetza/asn1/security/r2/HashedId8.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HashedId8_H_ +#define _Vanetza_Security2_HashedId8_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HashedId8 */ +typedef OCTET_STRING_t Vanetza_Security2_HashedId8_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HashedId8_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HashedId8; +asn_struct_free_f Vanetza_Security2_HashedId8_free; +asn_struct_print_f Vanetza_Security2_HashedId8_print; +asn_constr_check_f Vanetza_Security2_HashedId8_constraint; +ber_type_decoder_f Vanetza_Security2_HashedId8_decode_ber; +der_type_encoder_f Vanetza_Security2_HashedId8_encode_der; +xer_type_decoder_f Vanetza_Security2_HashedId8_decode_xer; +xer_type_encoder_f Vanetza_Security2_HashedId8_encode_xer; +jer_type_encoder_f Vanetza_Security2_HashedId8_encode_jer; +oer_type_decoder_f Vanetza_Security2_HashedId8_decode_oer; +oer_type_encoder_f Vanetza_Security2_HashedId8_encode_oer; +per_type_decoder_f Vanetza_Security2_HashedId8_decode_uper; +per_type_encoder_f Vanetza_Security2_HashedId8_encode_uper; +per_type_decoder_f Vanetza_Security2_HashedId8_decode_aper; +per_type_encoder_f Vanetza_Security2_HashedId8_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HashedId8_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HeaderInfo.c b/vanetza/asn1/security/r2/HeaderInfo.c new file mode 100644 index 000000000..eb501e73e --- /dev/null +++ b/vanetza/asn1/security/r2/HeaderInfo.c @@ -0,0 +1,284 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HeaderInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_HeaderInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_HeaderInfo, psid), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Psid, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "psid" + }, + { ATF_POINTER, 10, offsetof(struct Vanetza_Security2_HeaderInfo, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time64, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_POINTER, 9, offsetof(struct Vanetza_Security2_HeaderInfo, expiryTime), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time64, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "expiryTime" + }, + { ATF_POINTER, 8, offsetof(struct Vanetza_Security2_HeaderInfo, generationLocation), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ThreeDLocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationLocation" + }, + { ATF_POINTER, 7, offsetof(struct Vanetza_Security2_HeaderInfo, p2pcdLearningRequest), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "p2pcdLearningRequest" + }, + { ATF_POINTER, 6, offsetof(struct Vanetza_Security2_HeaderInfo, missingCrlIdentifier), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_MissingCrlIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "missingCrlIdentifier" + }, + { ATF_POINTER, 5, offsetof(struct Vanetza_Security2_HeaderInfo, encryptionKey), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptionKey" + }, + { ATF_POINTER, 4, offsetof(struct Vanetza_Security2_HeaderInfo, inlineP2pcdRequest), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfHashedId3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "inlineP2pcdRequest" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_HeaderInfo, requestedCertificate), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestedCertificate" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_HeaderInfo, pduFunctionalType), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PduFunctionalType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "pduFunctionalType" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_HeaderInfo, contributedExtensions), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ContributedExtensionBlocks, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "contributedExtensions" + }, +}; +static const int asn_MAP_Vanetza_Security2_HeaderInfo_oms_1[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HeaderInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_HeaderInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* psid */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* expiryTime */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* generationLocation */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* p2pcdLearningRequest */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* missingCrlIdentifier */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* encryptionKey */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* inlineP2pcdRequest */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* requestedCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* pduFunctionalType */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 } /* contributedExtensions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_HeaderInfo_specs_1 = { + sizeof(struct Vanetza_Security2_HeaderInfo), + offsetof(struct Vanetza_Security2_HeaderInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_HeaderInfo_tag2el_1, + 11, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_HeaderInfo_oms_1, /* Optional members */ + 6, 4, /* Root/Additions */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HeaderInfo = { + "HeaderInfo", + "HeaderInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_HeaderInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HeaderInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HeaderInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HeaderInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HeaderInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HeaderInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_HeaderInfo_1, + 11, /* Elements count */ + &asn_SPC_Vanetza_Security2_HeaderInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/HeaderInfo.h b/vanetza/asn1/security/r2/HeaderInfo.h new file mode 100644 index 000000000..edffabd99 --- /dev/null +++ b/vanetza/asn1/security/r2/HeaderInfo.h @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HeaderInfo_H_ +#define _Vanetza_Security2_HeaderInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" +#include "Time64.h" +#include "HashedId3.h" +#include "PduFunctionalType.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_ThreeDLocation; +struct Vanetza_Security2_MissingCrlIdentifier; +struct Vanetza_Security2_EncryptionKey; +struct Vanetza_Security2_SequenceOfHashedId3; +struct Vanetza_Security2_Certificate; +struct Vanetza_Security2_ContributedExtensionBlocks; + +/* Vanetza_Security2_HeaderInfo */ +typedef struct Vanetza_Security2_HeaderInfo { + Vanetza_Security2_Psid_t psid; + Vanetza_Security2_Time64_t *generationTime; /* OPTIONAL */ + Vanetza_Security2_Time64_t *expiryTime; /* OPTIONAL */ + struct Vanetza_Security2_ThreeDLocation *generationLocation; /* OPTIONAL */ + Vanetza_Security2_HashedId3_t *p2pcdLearningRequest; /* OPTIONAL */ + struct Vanetza_Security2_MissingCrlIdentifier *missingCrlIdentifier; /* OPTIONAL */ + struct Vanetza_Security2_EncryptionKey *encryptionKey; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + struct Vanetza_Security2_SequenceOfHashedId3 *inlineP2pcdRequest; /* OPTIONAL */ + struct Vanetza_Security2_Certificate *requestedCertificate; /* OPTIONAL */ + Vanetza_Security2_PduFunctionalType_t *pduFunctionalType; /* OPTIONAL */ + struct Vanetza_Security2_ContributedExtensionBlocks *contributedExtensions; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_HeaderInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HeaderInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_HeaderInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_HeaderInfo_1[11]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "ThreeDLocation.h" +#include "MissingCrlIdentifier.h" +#include "EncryptionKey.h" +#include "SequenceOfHashedId3.h" +#include "Certificate.h" +#include "ContributedExtensionBlocks.h" + +#endif /* _Vanetza_Security2_HeaderInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/HeaderInfoContributorId.c b/vanetza/asn1/security/r2/HeaderInfoContributorId.c new file mode 100644 index 000000000..ec1da992b --- /dev/null +++ b/vanetza/asn1/security/r2/HeaderInfoContributorId.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "HeaderInfoContributorId.h" + +int +Vanetza_Security2_HeaderInfoContributorId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_HeaderInfoContributorId_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_HeaderInfoContributorId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HeaderInfoContributorId = { + "HeaderInfoContributorId", + "HeaderInfoContributorId", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_HeaderInfoContributorId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_HeaderInfoContributorId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_HeaderInfoContributorId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_HeaderInfoContributorId_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/HeaderInfoContributorId.h b/vanetza/asn1/security/r2/HeaderInfoContributorId.h new file mode 100644 index 000000000..8c343a53c --- /dev/null +++ b/vanetza/asn1/security/r2/HeaderInfoContributorId.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_HeaderInfoContributorId_H_ +#define _Vanetza_Security2_HeaderInfoContributorId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_HeaderInfoContributorId */ +typedef long Vanetza_Security2_HeaderInfoContributorId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_HeaderInfoContributorId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_HeaderInfoContributorId; +asn_struct_free_f Vanetza_Security2_HeaderInfoContributorId_free; +asn_struct_print_f Vanetza_Security2_HeaderInfoContributorId_print; +asn_constr_check_f Vanetza_Security2_HeaderInfoContributorId_constraint; +ber_type_decoder_f Vanetza_Security2_HeaderInfoContributorId_decode_ber; +der_type_encoder_f Vanetza_Security2_HeaderInfoContributorId_encode_der; +xer_type_decoder_f Vanetza_Security2_HeaderInfoContributorId_decode_xer; +xer_type_encoder_f Vanetza_Security2_HeaderInfoContributorId_encode_xer; +jer_type_encoder_f Vanetza_Security2_HeaderInfoContributorId_encode_jer; +oer_type_decoder_f Vanetza_Security2_HeaderInfoContributorId_decode_oer; +oer_type_encoder_f Vanetza_Security2_HeaderInfoContributorId_encode_oer; +per_type_decoder_f Vanetza_Security2_HeaderInfoContributorId_decode_uper; +per_type_encoder_f Vanetza_Security2_HeaderInfoContributorId_encode_uper; +per_type_decoder_f Vanetza_Security2_HeaderInfoContributorId_decode_aper; +per_type_encoder_f Vanetza_Security2_HeaderInfoContributorId_encode_aper; +#define Vanetza_Security2_HeaderInfoContributorId_ieee1609HeaderInfoContributorId ((Vanetza_Security2_HeaderInfoContributorId_t)1) +#define Vanetza_Security2_HeaderInfoContributorId_etsiHeaderInfoContributorId ((Vanetza_Security2_HeaderInfoContributorId_t)2) + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_HeaderInfoContributorId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Hostname.c b/vanetza/asn1/security/r2/Hostname.c new file mode 100644 index 000000000..375943a5d --- /dev/null +++ b/vanetza/asn1/security/r2/Hostname.c @@ -0,0 +1,86 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Hostname.h" + +int +Vanetza_Security2_Hostname_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const UTF8String_t *st = (const UTF8String_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 = UTF8String_length(st); + if((ssize_t)size < 0) { + ASN__CTFAIL(app_key, td, sptr, + "%s: UTF-8: broken encoding (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((size <= 255UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using UTF8String, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Hostname_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Hostname_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Hostname_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (12 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Hostname = { + "Hostname", + "Hostname", + &asn_OP_UTF8String, + asn_DEF_Vanetza_Security2_Hostname_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Hostname_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Hostname_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Hostname_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Hostname_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Hostname_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Hostname_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Hostname_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Hostname_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Hostname.h b/vanetza/asn1/security/r2/Hostname.h new file mode 100644 index 000000000..1557b4f4c --- /dev/null +++ b/vanetza/asn1/security/r2/Hostname.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Hostname_H_ +#define _Vanetza_Security2_Hostname_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UTF8String.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Hostname */ +typedef UTF8String_t Vanetza_Security2_Hostname_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Hostname_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Hostname; +asn_struct_free_f Vanetza_Security2_Hostname_free; +asn_struct_print_f Vanetza_Security2_Hostname_print; +asn_constr_check_f Vanetza_Security2_Hostname_constraint; +ber_type_decoder_f Vanetza_Security2_Hostname_decode_ber; +der_type_encoder_f Vanetza_Security2_Hostname_encode_der; +xer_type_decoder_f Vanetza_Security2_Hostname_decode_xer; +xer_type_encoder_f Vanetza_Security2_Hostname_encode_xer; +jer_type_encoder_f Vanetza_Security2_Hostname_encode_jer; +oer_type_decoder_f Vanetza_Security2_Hostname_decode_oer; +oer_type_encoder_f Vanetza_Security2_Hostname_encode_oer; +per_type_decoder_f Vanetza_Security2_Hostname_decode_uper; +per_type_encoder_f Vanetza_Security2_Hostname_encode_uper; +per_type_decoder_f Vanetza_Security2_Hostname_decode_aper; +per_type_encoder_f Vanetza_Security2_Hostname_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Hostname_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IMaxGroup.c b/vanetza/asn1/security/r2/IMaxGroup.c new file mode 100644 index 000000000..b3346d0e4 --- /dev/null +++ b/vanetza/asn1/security/r2/IMaxGroup.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IMaxGroup.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_IMaxGroup_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IMaxGroup, iMax), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "iMax" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IMaxGroup, contents), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "contents" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_IMaxGroup, singleSeed), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "singleSeed" + }, +}; +static const int asn_MAP_Vanetza_Security2_IMaxGroup_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_IMaxGroup_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_IMaxGroup_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iMax */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* contents */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* singleSeed */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IMaxGroup_specs_1 = { + sizeof(struct Vanetza_Security2_IMaxGroup), + offsetof(struct Vanetza_Security2_IMaxGroup, _asn_ctx), + asn_MAP_Vanetza_Security2_IMaxGroup_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_IMaxGroup_oms_1, /* Optional members */ + 0, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IMaxGroup = { + "IMaxGroup", + "IMaxGroup", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_IMaxGroup_tags_1, + sizeof(asn_DEF_Vanetza_Security2_IMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IMaxGroup_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_IMaxGroup_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_IMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IMaxGroup_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_IMaxGroup_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_IMaxGroup_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IMaxGroup.h b/vanetza/asn1/security/r2/IMaxGroup.h new file mode 100644 index 000000000..33879116d --- /dev/null +++ b/vanetza/asn1/security/r2/IMaxGroup.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IMaxGroup_H_ +#define _Vanetza_Security2_IMaxGroup_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" +#include "SequenceOfIndividualRevocation.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_SequenceOfLinkageSeed; + +/* Vanetza_Security2_IMaxGroup */ +typedef struct Vanetza_Security2_IMaxGroup { + Vanetza_Security2_Uint16_t iMax; + Vanetza_Security2_SequenceOfIndividualRevocation_t contents; + /* + * This type is extensible, + * possible extensions are below. + */ + struct Vanetza_Security2_SequenceOfLinkageSeed *singleSeed; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_IMaxGroup_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IMaxGroup; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IMaxGroup_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_IMaxGroup_1[3]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SequenceOfLinkageSeed.h" + +#endif /* _Vanetza_Security2_IMaxGroup_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IValue.c b/vanetza/asn1/security/r2/IValue.c new file mode 100644 index 000000000..85f1de1ca --- /dev/null +++ b/vanetza/asn1/security/r2/IValue.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IValue.h" + +int +Vanetza_Security2_IValue_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Uint16, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_IValue_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_IValue_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_IValue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IValue = { + "IValue", + "IValue", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_IValue_tags_1, + sizeof(asn_DEF_Vanetza_Security2_IValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IValue_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_IValue_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_IValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IValue_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_IValue_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_IValue_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_IValue_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/IValue.h b/vanetza/asn1/security/r2/IValue.h new file mode 100644 index 000000000..319cdff30 --- /dev/null +++ b/vanetza/asn1/security/r2/IValue.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IValue_H_ +#define _Vanetza_Security2_IValue_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_IValue */ +typedef Vanetza_Security2_Uint16_t Vanetza_Security2_IValue_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_IValue_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IValue; +asn_struct_free_f Vanetza_Security2_IValue_free; +asn_struct_print_f Vanetza_Security2_IValue_print; +asn_constr_check_f Vanetza_Security2_IValue_constraint; +ber_type_decoder_f Vanetza_Security2_IValue_decode_ber; +der_type_encoder_f Vanetza_Security2_IValue_encode_der; +xer_type_decoder_f Vanetza_Security2_IValue_decode_xer; +xer_type_encoder_f Vanetza_Security2_IValue_encode_xer; +jer_type_encoder_f Vanetza_Security2_IValue_encode_jer; +oer_type_decoder_f Vanetza_Security2_IValue_decode_oer; +oer_type_encoder_f Vanetza_Security2_IValue_encode_oer; +per_type_decoder_f Vanetza_Security2_IValue_decode_uper; +per_type_encoder_f Vanetza_Security2_IValue_encode_uper; +per_type_decoder_f Vanetza_Security2_IValue_decode_aper; +per_type_encoder_f Vanetza_Security2_IValue_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IValue_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IcaSsp.c b/vanetza/asn1/security/r2/IcaSsp.c new file mode 100644 index 000000000..ca188e055 --- /dev/null +++ b/vanetza/asn1/security/r2/IcaSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IcaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_IcaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IcaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_IcaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_IcaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IcaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_IcaSsp), + offsetof(struct Vanetza_Security2_IcaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_IcaSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IcaSsp = { + "IcaSsp", + "IcaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_IcaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_IcaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IcaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_IcaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_IcaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IcaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_IcaSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_IcaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IcaSsp.h b/vanetza/asn1/security/r2/IcaSsp.h new file mode 100644 index 000000000..e6df008d9 --- /dev/null +++ b/vanetza/asn1/security/r2/IcaSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IcaSsp_H_ +#define _Vanetza_Security2_IcaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_IcaSsp */ +typedef struct Vanetza_Security2_IcaSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_IcaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IcaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IcaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_IcaSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IcaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IdentifiedRegion.c b/vanetza/asn1/security/r2/IdentifiedRegion.c new file mode 100644 index 000000000..3322c0981 --- /dev/null +++ b/vanetza/asn1/security/r2/IdentifiedRegion.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IdentifiedRegion.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_IdentifiedRegion_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_IdentifiedRegion_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_IdentifiedRegion_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IdentifiedRegion, choice.countryOnly), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_UnCountryId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "countryOnly" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IdentifiedRegion, choice.countryAndRegions), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CountryAndRegions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "countryAndRegions" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IdentifiedRegion, choice.countryAndSubregions), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CountryAndSubregions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "countryAndSubregions" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_IdentifiedRegion_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* countryOnly */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* countryAndRegions */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* countryAndSubregions */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_IdentifiedRegion_specs_1 = { + sizeof(struct Vanetza_Security2_IdentifiedRegion), + offsetof(struct Vanetza_Security2_IdentifiedRegion, _asn_ctx), + offsetof(struct Vanetza_Security2_IdentifiedRegion, present), + sizeof(((struct Vanetza_Security2_IdentifiedRegion *)0)->present), + asn_MAP_Vanetza_Security2_IdentifiedRegion_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IdentifiedRegion = { + "IdentifiedRegion", + "IdentifiedRegion", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_IdentifiedRegion_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_IdentifiedRegion_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_IdentifiedRegion_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_IdentifiedRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IdentifiedRegion.h b/vanetza/asn1/security/r2/IdentifiedRegion.h new file mode 100644 index 000000000..ea02700f4 --- /dev/null +++ b/vanetza/asn1/security/r2/IdentifiedRegion.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IdentifiedRegion_H_ +#define _Vanetza_Security2_IdentifiedRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "UnCountryId.h" +#include "CountryAndRegions.h" +#include "CountryAndSubregions.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_IdentifiedRegion_PR { + Vanetza_Security2_IdentifiedRegion_PR_NOTHING, /* No components present */ + Vanetza_Security2_IdentifiedRegion_PR_countryOnly, + Vanetza_Security2_IdentifiedRegion_PR_countryAndRegions, + Vanetza_Security2_IdentifiedRegion_PR_countryAndSubregions + /* Extensions may appear below */ + +} Vanetza_Security2_IdentifiedRegion_PR; + +/* Vanetza_Security2_IdentifiedRegion */ +typedef struct Vanetza_Security2_IdentifiedRegion { + Vanetza_Security2_IdentifiedRegion_PR present; + union Vanetza_Security2_IdentifiedRegion_u { + Vanetza_Security2_UnCountryId_t countryOnly; + Vanetza_Security2_CountryAndRegions_t countryAndRegions; + Vanetza_Security2_CountryAndSubregions_t countryAndSubregions; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_IdentifiedRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IdentifiedRegion; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_IdentifiedRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_IdentifiedRegion_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_IdentifiedRegion_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IdentifiedRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609ContributedHeaderInfoExtension.c b/vanetza/asn1/security/r2/Ieee1609ContributedHeaderInfoExtension.c new file mode 100644 index 000000000..3628ac1a6 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609ContributedHeaderInfoExtension.c @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609ContributedHeaderInfoExtension.h" + +/* + * This type is implemented using Vanetza_Security2_Ieee1609HeaderInfoExtensions, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension = { + "Ieee1609ContributedHeaderInfoExtension", + "Ieee1609ContributedHeaderInfoExtension", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609HeaderInfoExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609ContributedHeaderInfoExtension.h b/vanetza/asn1/security/r2/Ieee1609ContributedHeaderInfoExtension.h new file mode 100644 index 000000000..264e90e66 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609ContributedHeaderInfoExtension.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_H_ +#define _Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "IeeeExtension.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension */ +typedef Vanetza_Security2_Ieee1609HeaderInfoExtensions_t Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension; +asn_struct_free_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_free; +asn_struct_print_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_print; +asn_constr_check_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609ContributedHeaderInfoExtension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2BaseTypes_ExtId.c b/vanetza/asn1/security/r2/Ieee1609Dot2BaseTypes_ExtId.c new file mode 100644 index 000000000..74c278655 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2BaseTypes_ExtId.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2BaseTypes_ExtId.h" + +int +Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId = { + "ExtId", + "ExtId", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2BaseTypes_ExtId.h b/vanetza/asn1/security/r2/Ieee1609Dot2BaseTypes_ExtId.h new file mode 100644 index 000000000..54282a0a7 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2BaseTypes_ExtId.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_H_ +#define _Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId */ +typedef long Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t; + +/* Implementation */ +#define Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_certExtId_OperatingOrganization ((Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t)1) +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Content.c b/vanetza/asn1/security/r2/Ieee1609Dot2Content.c new file mode 100644 index 000000000..a9eeff270 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Content.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Content.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Content_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Content_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_Ieee1609Dot2Content_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, choice.unsecuredData), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Opaque, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "unsecuredData" + }, + { ATF_POINTER, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, choice.signedData), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SignedData, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signedData" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, choice.encryptedData), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EncryptedData, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptedData" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, choice.signedCertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Opaque, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signedCertificateRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, choice.signedX509CertificateRequest), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Opaque, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signedX509CertificateRequest" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_Ieee1609Dot2Content_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* unsecuredData */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* signedData */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* encryptedData */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* signedCertificateRequest */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* signedX509CertificateRequest */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_Ieee1609Dot2Content_specs_1 = { + sizeof(struct Vanetza_Security2_Ieee1609Dot2Content), + offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, _asn_ctx), + offsetof(struct Vanetza_Security2_Ieee1609Dot2Content, present), + sizeof(((struct Vanetza_Security2_Ieee1609Dot2Content *)0)->present), + asn_MAP_Vanetza_Security2_Ieee1609Dot2Content_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Content = { + "Ieee1609Dot2Content", + "Ieee1609Dot2Content", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Content_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Content_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Content_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Content_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Content.h b/vanetza/asn1/security/r2/Ieee1609Dot2Content.h new file mode 100644 index 000000000..d037978b5 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Content.h @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Content_H_ +#define _Vanetza_Security2_Ieee1609Dot2Content_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Opaque.h" +#include "EncryptedData.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_Ieee1609Dot2Content_PR { + Vanetza_Security2_Ieee1609Dot2Content_PR_NOTHING, /* No components present */ + Vanetza_Security2_Ieee1609Dot2Content_PR_unsecuredData, + Vanetza_Security2_Ieee1609Dot2Content_PR_signedData, + Vanetza_Security2_Ieee1609Dot2Content_PR_encryptedData, + Vanetza_Security2_Ieee1609Dot2Content_PR_signedCertificateRequest, + /* Extensions may appear below */ + Vanetza_Security2_Ieee1609Dot2Content_PR_signedX509CertificateRequest +} Vanetza_Security2_Ieee1609Dot2Content_PR; + +/* Forward declarations */ +struct Vanetza_Security2_SignedData; + +/* Vanetza_Security2_Ieee1609Dot2Content */ +typedef struct Vanetza_Security2_Ieee1609Dot2Content { + Vanetza_Security2_Ieee1609Dot2Content_PR present; + union Vanetza_Security2_Ieee1609Dot2Content_u { + Vanetza_Security2_Opaque_t unsecuredData; + struct Vanetza_Security2_SignedData *signedData; + Vanetza_Security2_EncryptedData_t encryptedData; + Vanetza_Security2_Opaque_t signedCertificateRequest; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_Opaque_t signedX509CertificateRequest; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_Ieee1609Dot2Content_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Content; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_Ieee1609Dot2Content_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_Ieee1609Dot2Content_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Content_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SignedData.h" + +#endif /* _Vanetza_Security2_Ieee1609Dot2Content_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-Encrypted.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Encrypted.c new file mode 100644 index 000000000..361827015 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Encrypted.c @@ -0,0 +1,269 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-Encrypted.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0 = { + "Ieee1609Dot2Data-Encrypted", + "Ieee1609Dot2Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1 = { + "Ieee1609Dot2Data-Encrypted", + "Ieee1609Dot2Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2 = { + "Ieee1609Dot2Data-Encrypted", + "Ieee1609Dot2Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3 = { + "Ieee1609Dot2Data-Encrypted", + "Ieee1609Dot2Data-Encrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_tags_4[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-Encrypted.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Encrypted.h new file mode 100644 index 000000000..ff707137e --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Encrypted.h @@ -0,0 +1,98 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_Encrypted_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_Encrypted_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-Encrypted */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P2_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constr_4; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_Encrypted_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-EncryptedSigned.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-EncryptedSigned.c new file mode 100644 index 000000000..6f0d88b1a --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-EncryptedSigned.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-EncryptedSigned.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0 = { + "Ieee1609Dot2Data-EncryptedSigned", + "Ieee1609Dot2Data-EncryptedSigned", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-EncryptedSigned.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-EncryptedSigned.h new file mode 100644 index 000000000..097d47c8b --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-EncryptedSigned.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-EncryptedSigned */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_t Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_379P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_EncryptedSigned_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-Signed.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Signed.c new file mode 100644 index 000000000..abaa67a51 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Signed.c @@ -0,0 +1,204 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-Signed.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0 = { + "Ieee1609Dot2Data-Signed", + "Ieee1609Dot2Data-Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1 = { + "Ieee1609Dot2Data-Signed", + "Ieee1609Dot2Data-Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2 = { + "Ieee1609Dot2Data-Signed", + "Ieee1609Dot2Data-Signed", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-Signed.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Signed.h new file mode 100644 index 000000000..6e34d5542 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Signed.h @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_Signed_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_Signed_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-Signed */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_Signed_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedCertRequest.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedCertRequest.c new file mode 100644 index 000000000..e522058c6 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedCertRequest.c @@ -0,0 +1,139 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-SignedCertRequest.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0 = { + "Ieee1609Dot2Data-SignedCertRequest", + "Ieee1609Dot2Data-SignedCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1 = { + "Ieee1609Dot2Data-SignedCertRequest", + "Ieee1609Dot2Data-SignedCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedCertRequest.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedCertRequest.h new file mode 100644 index 000000000..827a97186 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedCertRequest.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-SignedCertRequest */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncrypted.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncrypted.c new file mode 100644 index 000000000..21f9bd03b --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncrypted.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-SignedEncrypted.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_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 Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0 = { + "Ieee1609Dot2Data-SignedEncrypted", + "Ieee1609Dot2Data-SignedEncrypted", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncrypted.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncrypted.h new file mode 100644 index 000000000..9471de82a --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncrypted.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Encrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-SignedEncrypted */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P3_t Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_358P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_SignedEncrypted_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.c new file mode 100644 index 000000000..997d3c201 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-SignedEncryptedCertRequest.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_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 Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0 = { + "Ieee1609Dot2Data-SignedEncryptedCertRequest", + "Ieee1609Dot2Data-SignedEncryptedCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.h new file mode 100644 index 000000000..764bd6800 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedEncryptedCertRequest.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Encrypted.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-SignedEncryptedCertRequest */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Encrypted_276P1_t Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_391P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_SignedEncryptedCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.c new file mode 100644 index 000000000..52f1f21f2 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0 = { + "Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest", + "Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.h new file mode 100644 index 000000000..f3a33f991 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-SignedX509AuthenticatedCertRequest */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_335P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_SignedX509AuthenticatedCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.c new file mode 100644 index 000000000..35b18ab4c --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-SymmEncryptedSingleRecipient.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0 = { + "Ieee1609Dot2Data-SymmEncryptedSingleRecipient", + "Ieee1609Dot2Data-SymmEncryptedSingleRecipient", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.h new file mode 100644 index 000000000..d26710a52 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-SymmEncryptedSingleRecipient.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-SymmEncryptedSingleRecipient */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_402P0_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_SymmEncryptedSingleRecipient_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-Unsecured.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Unsecured.c new file mode 100644 index 000000000..61ae82018 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Unsecured.c @@ -0,0 +1,139 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data-Unsecured.h" + +int +Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0 = { + "Ieee1609Dot2Data-Unsecured", + "Ieee1609Dot2Data-Unsecured", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1 = { + "Ieee1609Dot2Data-Unsecured", + "Ieee1609Dot2Data-Unsecured", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data-Unsecured.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Unsecured.h new file mode 100644 index 000000000..f57b0b738 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data-Unsecured.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_Unsecured_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_Unsecured_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609Dot2Data-Unsecured */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t; +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1; +asn_struct_free_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_free; +asn_struct_print_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_print; +asn_constr_check_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_Unsecured_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data.c b/vanetza/asn1/security/r2/Ieee1609Dot2Data.c new file mode 100644 index 000000000..0b0085d42 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609Dot2Data.h" + +static int +memb_Vanetza_Security2_protocolVersion_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 3L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_protocolVersion_constr_2 CC_NOTUSED = { + { 1, 1 } /* (3..3) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_protocolVersion_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 3, 3 } /* (3..3) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Data, protocolVersion), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_protocolVersion_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_protocolVersion_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_protocolVersion_constraint_1 + }, + 0, 0, /* No default value */ + "protocolVersion" + }, + { ATF_POINTER, 0, offsetof(struct Vanetza_Security2_Ieee1609Dot2Data, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2Content, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_Ieee1609Dot2Data_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* protocolVersion */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 = { + sizeof(struct Vanetza_Security2_Ieee1609Dot2Data), + offsetof(struct Vanetza_Security2_Ieee1609Dot2Data, _asn_ctx), + asn_MAP_Vanetza_Security2_Ieee1609Dot2Data_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_Vanetza_Security2_Ieee1609Dot2Data = { + "Ieee1609Dot2Data", + "Ieee1609Dot2Data", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609Dot2Data_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609Dot2Data.h b/vanetza/asn1/security/r2/Ieee1609Dot2Data.h new file mode 100644 index 000000000..2609b6255 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609Dot2Data.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609Dot2Data_H_ +#define _Vanetza_Security2_Ieee1609Dot2Data_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_Ieee1609Dot2Content; + +/* Vanetza_Security2_Ieee1609Dot2Data */ +typedef struct Vanetza_Security2_Ieee1609Dot2Data { + Vanetza_Security2_Uint8_t protocolVersion; + struct Vanetza_Security2_Ieee1609Dot2Content *content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_Ieee1609Dot2Data_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609Dot2Data; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "Ieee1609Dot2Content.h" + +#endif /* _Vanetza_Security2_Ieee1609Dot2Data_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609HeaderInfoExtensionId.c b/vanetza/asn1/security/r2/Ieee1609HeaderInfoExtensionId.c new file mode 100644 index 000000000..60b28741b --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609HeaderInfoExtensionId.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609HeaderInfoExtensionId.h" + +int +Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId = { + "Ieee1609HeaderInfoExtensionId", + "Ieee1609HeaderInfoExtensionId", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609HeaderInfoExtensionId.h b/vanetza/asn1/security/r2/Ieee1609HeaderInfoExtensionId.h new file mode 100644 index 000000000..4120d42f7 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609HeaderInfoExtensionId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609HeaderInfoExtensionId_H_ +#define _Vanetza_Security2_Ieee1609HeaderInfoExtensionId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2BaseTypes_ExtId.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609HeaderInfoExtensionId */ +typedef Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t Vanetza_Security2_Ieee1609HeaderInfoExtensionId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensionId; +asn_struct_free_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_free; +asn_struct_print_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_print; +asn_constr_check_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609HeaderInfoExtensionId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609HeaderInfoExtensionId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Ieee1609dot2dot1MsctlType.c b/vanetza/asn1/security/r2/Ieee1609dot2dot1MsctlType.c new file mode 100644 index 000000000..46cd2149f --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609dot2dot1MsctlType.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Ieee1609dot2dot1MsctlType.h" + +int +Vanetza_Security2_Ieee1609dot2dot1MsctlType_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Ieee1609dot2dot1MsctlType_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609dot2dot1MsctlType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType = { + "Ieee1609dot2dot1MsctlType", + "Ieee1609dot2dot1MsctlType", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Ieee1609dot2dot1MsctlType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Ieee1609dot2dot1MsctlType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Ieee1609dot2dot1MsctlType_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Ieee1609dot2dot1MsctlType.h b/vanetza/asn1/security/r2/Ieee1609dot2dot1MsctlType.h new file mode 100644 index 000000000..37621dd55 --- /dev/null +++ b/vanetza/asn1/security/r2/Ieee1609dot2dot1MsctlType.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Ieee1609dot2dot1MsctlType_H_ +#define _Vanetza_Security2_Ieee1609dot2dot1MsctlType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Ieee1609dot2dot1MsctlType */ +typedef long Vanetza_Security2_Ieee1609dot2dot1MsctlType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Ieee1609dot2dot1MsctlType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType; +asn_struct_free_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_free; +asn_struct_print_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_print; +asn_constr_check_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_constraint; +ber_type_decoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_decode_ber; +der_type_encoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_encode_der; +xer_type_decoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_decode_xer; +xer_type_encoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_encode_xer; +jer_type_encoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_encode_jer; +oer_type_decoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_decode_oer; +oer_type_encoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_encode_oer; +per_type_decoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_decode_uper; +per_type_encoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_encode_uper; +per_type_decoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_decode_aper; +per_type_encoder_f Vanetza_Security2_Ieee1609dot2dot1MsctlType_encode_aper; +#define Vanetza_Security2_Ieee1609dot2dot1MsctlType_fullIeeeCtl ((Vanetza_Security2_Ieee1609dot2dot1MsctlType_t)1) + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Ieee1609dot2dot1MsctlType_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IeeeExtension.c b/vanetza/asn1/security/r2/IeeeExtension.c new file mode 100644 index 000000000..9ea2db73f --- /dev/null +++ b/vanetza/asn1/security/r2/IeeeExtension.c @@ -0,0 +1,257 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IeeeExtension.h" + +static const long asn_VAL_1_Vanetza_Security2_p2pcd8ByteLearningRequestId = 1; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1_rows[] = { + { "&extId", aioc__value, &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, &asn_VAL_1_Vanetza_Security2_p2pcd8ByteLearningRequestId }, + { "&ExtContent", aioc__type, &asn_DEF_Vanetza_Security2_HashedId8 } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1[] = { + { 1, 2, asn_IOS_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1_rows } +}; +static int +memb_Vanetza_Security2_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* 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_type_selector_result_t +select_Ieee1609HeaderInfoExtensions_Vanetza_Security2_content_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1; + size_t constraining_column = 0; /* &extId */ + size_t for_column = 1; /* &ExtContent */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions, id)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_Vanetza_Security2_content_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_id_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_content_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions__content, choice.HashedId8), + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "HashedId8" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_content_tag2el_3[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 } /* HashedId8 */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_content_specs_3 = { + sizeof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions__content), + offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions__content, _asn_ctx), + offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions__content, present), + sizeof(((struct Vanetza_Security2_Ieee1609HeaderInfoExtensions__content *)0)->present), + asn_MAP_Vanetza_Security2_content_tag2el_3, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_content_3 = { + "content", + "content", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_Vanetza_Security2_content_3, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_content_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_id_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_id_constraint_1 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_content_3, + select_Ieee1609HeaderInfoExtensions_Vanetza_Security2_content_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_content_constraint_1 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_Ieee1609HeaderInfoExtensions_specs_1 = { + sizeof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions), + offsetof(struct Vanetza_Security2_Ieee1609HeaderInfoExtensions, _asn_ctx), + asn_MAP_Vanetza_Security2_Ieee1609HeaderInfoExtensions_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_Vanetza_Security2_Ieee1609HeaderInfoExtensions = { + "Ieee1609HeaderInfoExtensions", + "Ieee1609HeaderInfoExtensions", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609HeaderInfoExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IeeeExtension.h b/vanetza/asn1/security/r2/IeeeExtension.h new file mode 100644 index 000000000..528b832da --- /dev/null +++ b/vanetza/asn1/security/r2/IeeeExtension.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IeeeExtension_H_ +#define _Vanetza_Security2_IeeeExtension_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2BaseTypes_ExtId.h" +#include "ANY.h" +#include "asn_ioc.h" +#include "HashedId8.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_Ieee1609HeaderInfoExtensions__content_PR { + Vanetza_Security2_Ieee1609HeaderInfoExtensions__content_PR_NOTHING, /* No components present */ + Vanetza_Security2_Ieee1609HeaderInfoExtensions__content_PR_HashedId8 +} Vanetza_Security2_Ieee1609HeaderInfoExtensions__content_PR; + +/* Vanetza_Security2_IeeeExtension */ +typedef struct Vanetza_Security2_Ieee1609HeaderInfoExtensions { + Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId_t id; + struct Vanetza_Security2_Ieee1609HeaderInfoExtensions__content { + Vanetza_Security2_Ieee1609HeaderInfoExtensions__content_PR present; + union Vanetza_Security2_Ieee1609HeaderInfoExtensions__Vanetza_Security2_content_u { + Vanetza_Security2_HashedId8_t HashedId8; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_Ieee1609HeaderInfoExtensions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Ieee1609HeaderInfoExtensions; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_Ieee1609HeaderInfoExtensions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_Ieee1609HeaderInfoExtensions_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IeeeExtension_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ImplicitCertificate.c b/vanetza/asn1/security/r2/ImplicitCertificate.c new file mode 100644 index 000000000..33284ebbf --- /dev/null +++ b/vanetza/asn1/security/r2/ImplicitCertificate.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ImplicitCertificate.h" + +int +Vanetza_Security2_ImplicitCertificate_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 Vanetza_Security2_CertificateBase, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ImplicitCertificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ImplicitCertificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ImplicitCertificate = { + "ImplicitCertificate", + "ImplicitCertificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ImplicitCertificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ImplicitCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ImplicitCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ImplicitCertificate_constraint + }, + asn_MBR_Vanetza_Security2_CertificateBase_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateBase_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ImplicitCertificate.h b/vanetza/asn1/security/r2/ImplicitCertificate.h new file mode 100644 index 000000000..2e0efd192 --- /dev/null +++ b/vanetza/asn1/security/r2/ImplicitCertificate.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ImplicitCertificate_H_ +#define _Vanetza_Security2_ImplicitCertificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CertificateBase.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ImplicitCertificate */ +typedef Vanetza_Security2_CertificateBase_t Vanetza_Security2_ImplicitCertificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ImplicitCertificate; +asn_struct_free_f Vanetza_Security2_ImplicitCertificate_free; +asn_struct_print_f Vanetza_Security2_ImplicitCertificate_print; +asn_constr_check_f Vanetza_Security2_ImplicitCertificate_constraint; +ber_type_decoder_f Vanetza_Security2_ImplicitCertificate_decode_ber; +der_type_encoder_f Vanetza_Security2_ImplicitCertificate_encode_der; +xer_type_decoder_f Vanetza_Security2_ImplicitCertificate_decode_xer; +xer_type_encoder_f Vanetza_Security2_ImplicitCertificate_encode_xer; +jer_type_encoder_f Vanetza_Security2_ImplicitCertificate_encode_jer; +oer_type_decoder_f Vanetza_Security2_ImplicitCertificate_decode_oer; +oer_type_encoder_f Vanetza_Security2_ImplicitCertificate_encode_oer; +per_type_decoder_f Vanetza_Security2_ImplicitCertificate_decode_uper; +per_type_encoder_f Vanetza_Security2_ImplicitCertificate_encode_uper; +per_type_decoder_f Vanetza_Security2_ImplicitCertificate_decode_aper; +per_type_encoder_f Vanetza_Security2_ImplicitCertificate_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ImplicitCertificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IndividualAprv.c b/vanetza/asn1/security/r2/IndividualAprv.c new file mode 100644 index 000000000..3c40e4b6b --- /dev/null +++ b/vanetza/asn1/security/r2/IndividualAprv.c @@ -0,0 +1,214 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IndividualAprv.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_IndividualAprv_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualAprv, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualAprv, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualAprv, currentI), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "currentI" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualAprv, acpcTreeId), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcpcTreeId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acpcTreeId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualAprv, nodeId), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nodeId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualAprv, nodeValue), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcpcNodeValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nodeValue" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_IndividualAprv_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_IndividualAprv_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* currentI */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* acpcTreeId */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* nodeId */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* nodeValue */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IndividualAprv_specs_1 = { + sizeof(struct Vanetza_Security2_IndividualAprv), + offsetof(struct Vanetza_Security2_IndividualAprv, _asn_ctx), + asn_MAP_Vanetza_Security2_IndividualAprv_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IndividualAprv = { + "IndividualAprv", + "IndividualAprv", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_IndividualAprv_tags_1, + sizeof(asn_DEF_Vanetza_Security2_IndividualAprv_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IndividualAprv_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_IndividualAprv_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_IndividualAprv_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IndividualAprv_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_IndividualAprv_1, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_IndividualAprv_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IndividualAprv.h b/vanetza/asn1/security/r2/IndividualAprv.h new file mode 100644 index 000000000..43633d785 --- /dev/null +++ b/vanetza/asn1/security/r2/IndividualAprv.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IndividualAprv_H_ +#define _Vanetza_Security2_IndividualAprv_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "IValue.h" +#include "AcpcTreeId.h" +#include "BIT_STRING.h" +#include "AcpcNodeValue.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_IndividualAprv */ +typedef struct Vanetza_Security2_IndividualAprv { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_IValue_t currentI; + Vanetza_Security2_AcpcTreeId_t acpcTreeId; + BIT_STRING_t nodeId; + Vanetza_Security2_AcpcNodeValue_t nodeValue; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_IndividualAprv_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IndividualAprv; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IndividualAprv_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_IndividualAprv_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IndividualAprv_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IndividualRevocation.c b/vanetza/asn1/security/r2/IndividualRevocation.c new file mode 100644 index 000000000..055c66c7f --- /dev/null +++ b/vanetza/asn1/security/r2/IndividualRevocation.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IndividualRevocation.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_IndividualRevocation_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualRevocation, linkageSeed1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageSeed1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IndividualRevocation, linkageSeed2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageSeed2" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_IndividualRevocation_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* linkageSeed1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* linkageSeed2 */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IndividualRevocation_specs_1 = { + sizeof(struct Vanetza_Security2_IndividualRevocation), + offsetof(struct Vanetza_Security2_IndividualRevocation, _asn_ctx), + asn_MAP_Vanetza_Security2_IndividualRevocation_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IndividualRevocation = { + "IndividualRevocation", + "IndividualRevocation", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1, + sizeof(asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_IndividualRevocation_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_IndividualRevocation_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_IndividualRevocation_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IndividualRevocation.h b/vanetza/asn1/security/r2/IndividualRevocation.h new file mode 100644 index 000000000..8684d193f --- /dev/null +++ b/vanetza/asn1/security/r2/IndividualRevocation.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IndividualRevocation_H_ +#define _Vanetza_Security2_IndividualRevocation_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "LinkageSeed.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_IndividualRevocation */ +typedef struct Vanetza_Security2_IndividualRevocation { + Vanetza_Security2_LinkageSeed_t linkageSeed1; + Vanetza_Security2_LinkageSeed_t linkageSeed2; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_IndividualRevocation_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IndividualRevocation; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_IndividualRevocation_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_IndividualRevocation_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IndividualRevocation_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/InnerAtRequest.c b/vanetza/asn1/security/r2/InnerAtRequest.c new file mode 100644 index 000000000..8b080a1b9 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerAtRequest.c @@ -0,0 +1,173 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "InnerAtRequest.h" + +static int +memb_Vanetza_Security2_hmacKey_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 == 32UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_hmacKey_constr_3 CC_NOTUSED = { + { 0, 0 }, + 32 /* (SIZE(32..32)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_hmacKey_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerAtRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerAtRequest, publicKeys), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicKeys, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "publicKeys" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerAtRequest, hmacKey), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_hmacKey_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_hmacKey_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_hmacKey_constraint_1 + }, + 0, 0, /* No default value */ + "hmacKey" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerAtRequest, sharedAtRequest), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SharedAtRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sharedAtRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerAtRequest, ecSignature), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcSignature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecSignature" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_InnerAtRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* publicKeys */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* hmacKey */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sharedAtRequest */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* ecSignature */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerAtRequest_specs_1 = { + sizeof(struct Vanetza_Security2_InnerAtRequest), + offsetof(struct Vanetza_Security2_InnerAtRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_InnerAtRequest_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerAtRequest = { + "InnerAtRequest", + "InnerAtRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerAtRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_InnerAtRequest_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_InnerAtRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/InnerAtRequest.h b/vanetza/asn1/security/r2/InnerAtRequest.h new file mode 100644 index 000000000..4684f0d27 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerAtRequest.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_InnerAtRequest_H_ +#define _Vanetza_Security2_InnerAtRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PublicKeys.h" +#include "OCTET_STRING.h" +#include "SharedAtRequest.h" +#include "EcSignature.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_InnerAtRequest */ +typedef struct Vanetza_Security2_InnerAtRequest { + Vanetza_Security2_PublicKeys_t publicKeys; + OCTET_STRING_t hmacKey; + Vanetza_Security2_SharedAtRequest_t sharedAtRequest; + Vanetza_Security2_EcSignature_t ecSignature; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_InnerAtRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerAtRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerAtRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerAtRequest_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_InnerAtRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/InnerAtResponse.c b/vanetza/asn1/security/r2/InnerAtResponse.c new file mode 100644 index 000000000..ceadde17d --- /dev/null +++ b/vanetza/asn1/security/r2/InnerAtResponse.c @@ -0,0 +1,166 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "InnerAtResponse.h" + +static int +memb_Vanetza_Security2_requestHash_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_requestHash_constr_2 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_requestHash_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_InnerAtResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_InnerAtResponse_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerAtResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerAtResponse, requestHash), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_requestHash_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_requestHash_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_requestHash_constraint_1 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerAtResponse, responseCode), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AuthorizationResponseCode, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "responseCode" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_InnerAtResponse, certificate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificate" + }, +}; +static const int asn_MAP_Vanetza_Security2_InnerAtResponse_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_InnerAtResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* responseCode */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* certificate */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerAtResponse_specs_1 = { + sizeof(struct Vanetza_Security2_InnerAtResponse), + offsetof(struct Vanetza_Security2_InnerAtResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_InnerAtResponse_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_InnerAtResponse_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerAtResponse = { + "InnerAtResponse", + "InnerAtResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerAtResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_InnerAtResponse_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_InnerAtResponse_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_InnerAtResponse_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_InnerAtResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/InnerAtResponse.h b/vanetza/asn1/security/r2/InnerAtResponse.h new file mode 100644 index 000000000..87c903735 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerAtResponse.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_InnerAtResponse_H_ +#define _Vanetza_Security2_InnerAtResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "AuthorizationResponseCode.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_EtsiTs103097Certificate; + +/* Vanetza_Security2_InnerAtResponse */ +typedef struct Vanetza_Security2_InnerAtResponse { + OCTET_STRING_t requestHash; + Vanetza_Security2_AuthorizationResponseCode_t responseCode; + struct Vanetza_Security2_EtsiTs103097Certificate *certificate; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_InnerAtResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerAtResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerAtResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerAtResponse_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_InnerAtResponse_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "EtsiTs103097Certificate.h" + +#endif /* _Vanetza_Security2_InnerAtResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/InnerEcRequest.c b/vanetza/asn1/security/r2/InnerEcRequest.c new file mode 100644 index 000000000..0ad908817 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerEcRequest.c @@ -0,0 +1,166 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "InnerEcRequest.h" + +static int +memb_Vanetza_Security2_requestedSubjectAttributes_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerEcRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerEcRequest, itsId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "itsId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerEcRequest, certificateFormat), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateFormat, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateFormat" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerEcRequest, publicKeys), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicKeys, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "publicKeys" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerEcRequest, requestedSubjectAttributes), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateSubjectAttributes, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_requestedSubjectAttributes_constraint_1 + }, + 0, 0, /* No default value */ + "requestedSubjectAttributes" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_InnerEcRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* itsId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* certificateFormat */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* publicKeys */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* requestedSubjectAttributes */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerEcRequest_specs_1 = { + sizeof(struct Vanetza_Security2_InnerEcRequest), + offsetof(struct Vanetza_Security2_InnerEcRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_InnerEcRequest_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerEcRequest = { + "InnerEcRequest", + "InnerEcRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerEcRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_InnerEcRequest_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_InnerEcRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/InnerEcRequest.h b/vanetza/asn1/security/r2/InnerEcRequest.h new file mode 100644 index 000000000..cc4233ae7 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerEcRequest.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_InnerEcRequest_H_ +#define _Vanetza_Security2_InnerEcRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "CertificateFormat.h" +#include "PublicKeys.h" +#include "CertificateSubjectAttributes.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_InnerEcRequest */ +typedef struct Vanetza_Security2_InnerEcRequest { + OCTET_STRING_t itsId; + Vanetza_Security2_CertificateFormat_t certificateFormat; + Vanetza_Security2_PublicKeys_t publicKeys; + Vanetza_Security2_CertificateSubjectAttributes_t requestedSubjectAttributes; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_InnerEcRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerEcRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_InnerEcRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/InnerEcRequestSignedForPop.c b/vanetza/asn1/security/r2/InnerEcRequestSignedForPop.c new file mode 100644 index 000000000..0379c23e4 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerEcRequestSignedForPop.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "InnerEcRequestSignedForPop.h" + +int +Vanetza_Security2_InnerEcRequestSignedForPop_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_InnerEcRequestSignedForPop_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_InnerEcRequestSignedForPop_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop = { + "InnerEcRequestSignedForPop", + "InnerEcRequestSignedForPop", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1, + sizeof(asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_InnerEcRequestSignedForPop_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_InnerEcRequestSignedForPop_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_InnerEcRequestSignedForPop_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/InnerEcRequestSignedForPop.h b/vanetza/asn1/security/r2/InnerEcRequestSignedForPop.h new file mode 100644 index 000000000..ea5ca9466 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerEcRequestSignedForPop.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_InnerEcRequestSignedForPop_H_ +#define _Vanetza_Security2_InnerEcRequestSignedForPop_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_InnerEcRequestSignedForPop */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P2_t Vanetza_Security2_InnerEcRequestSignedForPop_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_InnerEcRequestSignedForPop_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerEcRequestSignedForPop; +asn_struct_free_f Vanetza_Security2_InnerEcRequestSignedForPop_free; +asn_struct_print_f Vanetza_Security2_InnerEcRequestSignedForPop_print; +asn_constr_check_f Vanetza_Security2_InnerEcRequestSignedForPop_constraint; +ber_type_decoder_f Vanetza_Security2_InnerEcRequestSignedForPop_decode_ber; +der_type_encoder_f Vanetza_Security2_InnerEcRequestSignedForPop_encode_der; +xer_type_decoder_f Vanetza_Security2_InnerEcRequestSignedForPop_decode_xer; +xer_type_encoder_f Vanetza_Security2_InnerEcRequestSignedForPop_encode_xer; +jer_type_encoder_f Vanetza_Security2_InnerEcRequestSignedForPop_encode_jer; +oer_type_decoder_f Vanetza_Security2_InnerEcRequestSignedForPop_decode_oer; +oer_type_encoder_f Vanetza_Security2_InnerEcRequestSignedForPop_encode_oer; +per_type_decoder_f Vanetza_Security2_InnerEcRequestSignedForPop_decode_uper; +per_type_encoder_f Vanetza_Security2_InnerEcRequestSignedForPop_encode_uper; +per_type_decoder_f Vanetza_Security2_InnerEcRequestSignedForPop_decode_aper; +per_type_encoder_f Vanetza_Security2_InnerEcRequestSignedForPop_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_InnerEcRequestSignedForPop_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/InnerEcResponse.c b/vanetza/asn1/security/r2/InnerEcResponse.c new file mode 100644 index 000000000..31c37bfa8 --- /dev/null +++ b/vanetza/asn1/security/r2/InnerEcResponse.c @@ -0,0 +1,166 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "InnerEcResponse.h" + +static int +memb_Vanetza_Security2_requestHash_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_requestHash_constr_2 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_requestHash_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_InnerEcResponse_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_InnerEcResponse_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerEcResponse_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerEcResponse, requestHash), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_requestHash_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_requestHash_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_requestHash_constraint_1 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_InnerEcResponse, responseCode), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EnrolmentResponseCode, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "responseCode" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_InnerEcResponse, certificate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificate" + }, +}; +static const int asn_MAP_Vanetza_Security2_InnerEcResponse_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_InnerEcResponse_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* responseCode */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* certificate */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerEcResponse_specs_1 = { + sizeof(struct Vanetza_Security2_InnerEcResponse), + offsetof(struct Vanetza_Security2_InnerEcResponse, _asn_ctx), + asn_MAP_Vanetza_Security2_InnerEcResponse_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_InnerEcResponse_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerEcResponse = { + "InnerEcResponse", + "InnerEcResponse", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1, + sizeof(asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_InnerEcResponse_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_InnerEcResponse_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_InnerEcResponse_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_InnerEcResponse_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_InnerEcResponse_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/InnerEcResponse.h b/vanetza/asn1/security/r2/InnerEcResponse.h new file mode 100644 index 000000000..2f9e784da --- /dev/null +++ b/vanetza/asn1/security/r2/InnerEcResponse.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesEnrolment" + * found in "asn1/release2/TS102941v221/TypesEnrolment.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_InnerEcResponse_H_ +#define _Vanetza_Security2_InnerEcResponse_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "EnrolmentResponseCode.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_EtsiTs103097Certificate; + +/* Vanetza_Security2_InnerEcResponse */ +typedef struct Vanetza_Security2_InnerEcResponse { + OCTET_STRING_t requestHash; + Vanetza_Security2_EnrolmentResponseCode_t responseCode; + struct Vanetza_Security2_EtsiTs103097Certificate *certificate; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_InnerEcResponse_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_InnerEcResponse; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_InnerEcResponse_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_InnerEcResponse_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_InnerEcResponse_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "EtsiTs103097Certificate.h" + +#endif /* _Vanetza_Security2_InnerEcResponse_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/IssuerIdentifier.c b/vanetza/asn1/security/r2/IssuerIdentifier.c new file mode 100644 index 000000000..01f68737d --- /dev/null +++ b/vanetza/asn1/security/r2/IssuerIdentifier.c @@ -0,0 +1,144 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "IssuerIdentifier.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_IssuerIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_IssuerIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_IssuerIdentifier_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IssuerIdentifier, choice.sha256AndDigest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sha256AndDigest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IssuerIdentifier, choice.self), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashAlgorithm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "self" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IssuerIdentifier, choice.sha384AndDigest), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sha384AndDigest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_IssuerIdentifier, choice.sm3AndDigest), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sm3AndDigest" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_IssuerIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sha256AndDigest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* self */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sha384AndDigest */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* sm3AndDigest */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_IssuerIdentifier_specs_1 = { + sizeof(struct Vanetza_Security2_IssuerIdentifier), + offsetof(struct Vanetza_Security2_IssuerIdentifier, _asn_ctx), + offsetof(struct Vanetza_Security2_IssuerIdentifier, present), + sizeof(((struct Vanetza_Security2_IssuerIdentifier *)0)->present), + asn_MAP_Vanetza_Security2_IssuerIdentifier_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IssuerIdentifier = { + "IssuerIdentifier", + "IssuerIdentifier", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_IssuerIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_IssuerIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_IssuerIdentifier_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_IssuerIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/IssuerIdentifier.h b/vanetza/asn1/security/r2/IssuerIdentifier.h new file mode 100644 index 000000000..160df8d34 --- /dev/null +++ b/vanetza/asn1/security/r2/IssuerIdentifier.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_IssuerIdentifier_H_ +#define _Vanetza_Security2_IssuerIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "HashAlgorithm.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_IssuerIdentifier_PR { + Vanetza_Security2_IssuerIdentifier_PR_NOTHING, /* No components present */ + Vanetza_Security2_IssuerIdentifier_PR_sha256AndDigest, + Vanetza_Security2_IssuerIdentifier_PR_self, + /* Extensions may appear below */ + Vanetza_Security2_IssuerIdentifier_PR_sha384AndDigest, + Vanetza_Security2_IssuerIdentifier_PR_sm3AndDigest +} Vanetza_Security2_IssuerIdentifier_PR; + +/* Vanetza_Security2_IssuerIdentifier */ +typedef struct Vanetza_Security2_IssuerIdentifier { + Vanetza_Security2_IssuerIdentifier_PR present; + union Vanetza_Security2_IssuerIdentifier_u { + Vanetza_Security2_HashedId8_t sha256AndDigest; + Vanetza_Security2_HashAlgorithm_t self; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_HashedId8_t sha384AndDigest; + Vanetza_Security2_HashedId8_t sm3AndDigest; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_IssuerIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_IssuerIdentifier; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_IssuerIdentifier_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_IssuerIdentifier_1[4]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_IssuerIdentifier_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_IssuerIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/JMaxGroup.c b/vanetza/asn1/security/r2/JMaxGroup.c new file mode 100644 index 000000000..053588fea --- /dev/null +++ b/vanetza/asn1/security/r2/JMaxGroup.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "JMaxGroup.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_JMaxGroup_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_JMaxGroup, jmax), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "jmax" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_JMaxGroup, contents), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfLAGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "contents" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_JMaxGroup_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_JMaxGroup_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* jmax */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* contents */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_JMaxGroup_specs_1 = { + sizeof(struct Vanetza_Security2_JMaxGroup), + offsetof(struct Vanetza_Security2_JMaxGroup, _asn_ctx), + asn_MAP_Vanetza_Security2_JMaxGroup_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_JMaxGroup = { + "JMaxGroup", + "JMaxGroup", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_JMaxGroup_tags_1, + sizeof(asn_DEF_Vanetza_Security2_JMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_JMaxGroup_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_JMaxGroup_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_JMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_JMaxGroup_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_JMaxGroup_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_JMaxGroup_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/JMaxGroup.h b/vanetza/asn1/security/r2/JMaxGroup.h new file mode 100644 index 000000000..81a06394d --- /dev/null +++ b/vanetza/asn1/security/r2/JMaxGroup.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_JMaxGroup_H_ +#define _Vanetza_Security2_JMaxGroup_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "SequenceOfLAGroup.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_JMaxGroup */ +typedef struct Vanetza_Security2_JMaxGroup { + Vanetza_Security2_Uint8_t jmax; + Vanetza_Security2_SequenceOfLAGroup_t contents; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_JMaxGroup_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_JMaxGroup; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_JMaxGroup_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_JMaxGroup_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_JMaxGroup_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/KnownLatitude.c b/vanetza/asn1/security/r2/KnownLatitude.c new file mode 100644 index 000000000..ff33b3398 --- /dev/null +++ b/vanetza/asn1/security/r2/KnownLatitude.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "KnownLatitude.h" + +int +Vanetza_Security2_KnownLatitude_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= -900000000L && value <= 900000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_NinetyDegreeInt, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_KnownLatitude_constr_1 CC_NOTUSED = { + { 4, 0 } /* (-900000000..900000000) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_KnownLatitude_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 31, -1, -900000000, 900000000 } /* (-900000000..900000000) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_KnownLatitude_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_KnownLatitude = { + "KnownLatitude", + "KnownLatitude", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_KnownLatitude_tags_1, + sizeof(asn_DEF_Vanetza_Security2_KnownLatitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_KnownLatitude_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_KnownLatitude_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_KnownLatitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_KnownLatitude_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_KnownLatitude_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_KnownLatitude_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_KnownLatitude_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/KnownLatitude.h b/vanetza/asn1/security/r2/KnownLatitude.h new file mode 100644 index 000000000..4b7a16360 --- /dev/null +++ b/vanetza/asn1/security/r2/KnownLatitude.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_KnownLatitude_H_ +#define _Vanetza_Security2_KnownLatitude_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NinetyDegreeInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_KnownLatitude */ +typedef Vanetza_Security2_NinetyDegreeInt_t Vanetza_Security2_KnownLatitude_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_KnownLatitude; +asn_struct_free_f Vanetza_Security2_KnownLatitude_free; +asn_struct_print_f Vanetza_Security2_KnownLatitude_print; +asn_constr_check_f Vanetza_Security2_KnownLatitude_constraint; +ber_type_decoder_f Vanetza_Security2_KnownLatitude_decode_ber; +der_type_encoder_f Vanetza_Security2_KnownLatitude_encode_der; +xer_type_decoder_f Vanetza_Security2_KnownLatitude_decode_xer; +xer_type_encoder_f Vanetza_Security2_KnownLatitude_encode_xer; +jer_type_encoder_f Vanetza_Security2_KnownLatitude_encode_jer; +oer_type_decoder_f Vanetza_Security2_KnownLatitude_decode_oer; +oer_type_encoder_f Vanetza_Security2_KnownLatitude_encode_oer; +per_type_decoder_f Vanetza_Security2_KnownLatitude_decode_uper; +per_type_encoder_f Vanetza_Security2_KnownLatitude_encode_uper; +per_type_decoder_f Vanetza_Security2_KnownLatitude_decode_aper; +per_type_encoder_f Vanetza_Security2_KnownLatitude_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_KnownLatitude_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/KnownLongitude.c b/vanetza/asn1/security/r2/KnownLongitude.c new file mode 100644 index 000000000..3b38b248f --- /dev/null +++ b/vanetza/asn1/security/r2/KnownLongitude.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "KnownLongitude.h" + +int +Vanetza_Security2_KnownLongitude_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= -1799999999L && value <= 1800000000L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_OneEightyDegreeInt, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_KnownLongitude_constr_1 CC_NOTUSED = { + { 4, 0 } /* (-1799999999..1800000000) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_KnownLongitude_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, -1799999999, 1800000000 } /* (-1799999999..1800000000) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_KnownLongitude_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_KnownLongitude = { + "KnownLongitude", + "KnownLongitude", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_KnownLongitude_tags_1, + sizeof(asn_DEF_Vanetza_Security2_KnownLongitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_KnownLongitude_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_KnownLongitude_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_KnownLongitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_KnownLongitude_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_KnownLongitude_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_KnownLongitude_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_KnownLongitude_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/KnownLongitude.h b/vanetza/asn1/security/r2/KnownLongitude.h new file mode 100644 index 000000000..aa36d26fc --- /dev/null +++ b/vanetza/asn1/security/r2/KnownLongitude.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_KnownLongitude_H_ +#define _Vanetza_Security2_KnownLongitude_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OneEightyDegreeInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_KnownLongitude */ +typedef Vanetza_Security2_OneEightyDegreeInt_t Vanetza_Security2_KnownLongitude_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_KnownLongitude; +asn_struct_free_f Vanetza_Security2_KnownLongitude_free; +asn_struct_print_f Vanetza_Security2_KnownLongitude_print; +asn_constr_check_f Vanetza_Security2_KnownLongitude_constraint; +ber_type_decoder_f Vanetza_Security2_KnownLongitude_decode_ber; +der_type_encoder_f Vanetza_Security2_KnownLongitude_encode_der; +xer_type_decoder_f Vanetza_Security2_KnownLongitude_decode_xer; +xer_type_encoder_f Vanetza_Security2_KnownLongitude_encode_xer; +jer_type_encoder_f Vanetza_Security2_KnownLongitude_encode_jer; +oer_type_decoder_f Vanetza_Security2_KnownLongitude_decode_oer; +oer_type_encoder_f Vanetza_Security2_KnownLongitude_encode_oer; +per_type_decoder_f Vanetza_Security2_KnownLongitude_decode_uper; +per_type_encoder_f Vanetza_Security2_KnownLongitude_encode_uper; +per_type_decoder_f Vanetza_Security2_KnownLongitude_decode_aper; +per_type_encoder_f Vanetza_Security2_KnownLongitude_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_KnownLongitude_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LAGroup.c b/vanetza/asn1/security/r2/LAGroup.c new file mode 100644 index 000000000..ef29ff65a --- /dev/null +++ b/vanetza/asn1/security/r2/LAGroup.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LAGroup.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_LAGroup_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LAGroup, la1Id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la1Id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LAGroup, la2Id), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la2Id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LAGroup, contents), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "contents" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LAGroup_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_LAGroup_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* la1Id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* la2Id */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* contents */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LAGroup_specs_1 = { + sizeof(struct Vanetza_Security2_LAGroup), + offsetof(struct Vanetza_Security2_LAGroup, _asn_ctx), + asn_MAP_Vanetza_Security2_LAGroup_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LAGroup = { + "LAGroup", + "LAGroup", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_LAGroup_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LAGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LAGroup_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LAGroup_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LAGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LAGroup_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_LAGroup_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_LAGroup_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LAGroup.h b/vanetza/asn1/security/r2/LAGroup.h new file mode 100644 index 000000000..b7b642f11 --- /dev/null +++ b/vanetza/asn1/security/r2/LAGroup.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LAGroup_H_ +#define _Vanetza_Security2_LAGroup_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "LaId.h" +#include "SequenceOfIMaxGroup.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LAGroup */ +typedef struct Vanetza_Security2_LAGroup { + Vanetza_Security2_LaId_t la1Id; + Vanetza_Security2_LaId_t la2Id; + Vanetza_Security2_SequenceOfIMaxGroup_t contents; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_LAGroup_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LAGroup; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LAGroup_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_LAGroup_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LAGroup_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LaId.c b/vanetza/asn1/security/r2/LaId.c new file mode 100644 index 000000000..ca0af4a90 --- /dev/null +++ b/vanetza/asn1/security/r2/LaId.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LaId.h" + +int +Vanetza_Security2_LaId_constraint(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 == 2UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_LaId_constr_1 CC_NOTUSED = { + { 0, 0 }, + 2 /* (SIZE(2..2)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_LaId_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LaId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaId = { + "LaId", + "LaId", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_LaId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LaId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LaId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LaId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_LaId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_LaId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_LaId_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LaId.h b/vanetza/asn1/security/r2/LaId.h new file mode 100644 index 000000000..7ddf40db8 --- /dev/null +++ b/vanetza/asn1/security/r2/LaId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LaId_H_ +#define _Vanetza_Security2_LaId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LaId */ +typedef OCTET_STRING_t Vanetza_Security2_LaId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_LaId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaId; +asn_struct_free_f Vanetza_Security2_LaId_free; +asn_struct_print_f Vanetza_Security2_LaId_print; +asn_constr_check_f Vanetza_Security2_LaId_constraint; +ber_type_decoder_f Vanetza_Security2_LaId_decode_ber; +der_type_encoder_f Vanetza_Security2_LaId_encode_der; +xer_type_decoder_f Vanetza_Security2_LaId_decode_xer; +xer_type_encoder_f Vanetza_Security2_LaId_encode_xer; +jer_type_encoder_f Vanetza_Security2_LaId_encode_jer; +oer_type_decoder_f Vanetza_Security2_LaId_decode_oer; +oer_type_encoder_f Vanetza_Security2_LaId_encode_oer; +per_type_decoder_f Vanetza_Security2_LaId_decode_uper; +per_type_encoder_f Vanetza_Security2_LaId_encode_uper; +per_type_decoder_f Vanetza_Security2_LaId_decode_aper; +per_type_encoder_f Vanetza_Security2_LaId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LaId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LaMaInterfacePdu.c b/vanetza/asn1/security/r2/LaMaInterfacePdu.c new file mode 100644 index 000000000..cb8695392 --- /dev/null +++ b/vanetza/asn1/security/r2/LaMaInterfacePdu.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1LaMaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1LaMaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LaMaInterfacePdu.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaMaInterfacePdu = { + "LaMaInterfacePdu", + "LaMaInterfacePdu", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaMaInterfacePdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/LaMaInterfacePdu.h b/vanetza/asn1/security/r2/LaMaInterfacePdu.h new file mode 100644 index 000000000..a7292a1ba --- /dev/null +++ b/vanetza/asn1/security/r2/LaMaInterfacePdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1LaMaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1LaMaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LaMaInterfacePdu_H_ +#define _Vanetza_Security2_LaMaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LaMaInterfacePdu */ +typedef NULL_t Vanetza_Security2_LaMaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaMaInterfacePdu; +asn_struct_free_f Vanetza_Security2_LaMaInterfacePdu_free; +asn_struct_print_f Vanetza_Security2_LaMaInterfacePdu_print; +asn_constr_check_f Vanetza_Security2_LaMaInterfacePdu_constraint; +ber_type_decoder_f Vanetza_Security2_LaMaInterfacePdu_decode_ber; +der_type_encoder_f Vanetza_Security2_LaMaInterfacePdu_encode_der; +xer_type_decoder_f Vanetza_Security2_LaMaInterfacePdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_LaMaInterfacePdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_LaMaInterfacePdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_LaMaInterfacePdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_LaMaInterfacePdu_encode_oer; +per_type_decoder_f Vanetza_Security2_LaMaInterfacePdu_decode_uper; +per_type_encoder_f Vanetza_Security2_LaMaInterfacePdu_encode_uper; +per_type_decoder_f Vanetza_Security2_LaMaInterfacePdu_decode_aper; +per_type_encoder_f Vanetza_Security2_LaMaInterfacePdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LaMaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LaRaInterfacePdu.c b/vanetza/asn1/security/r2/LaRaInterfacePdu.c new file mode 100644 index 000000000..e5c240e06 --- /dev/null +++ b/vanetza/asn1/security/r2/LaRaInterfacePdu.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1LaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1LaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LaRaInterfacePdu.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaRaInterfacePdu = { + "LaRaInterfacePdu", + "LaRaInterfacePdu", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaRaInterfacePdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/LaRaInterfacePdu.h b/vanetza/asn1/security/r2/LaRaInterfacePdu.h new file mode 100644 index 000000000..c154b7826 --- /dev/null +++ b/vanetza/asn1/security/r2/LaRaInterfacePdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1LaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1LaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LaRaInterfacePdu_H_ +#define _Vanetza_Security2_LaRaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LaRaInterfacePdu */ +typedef NULL_t Vanetza_Security2_LaRaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaRaInterfacePdu; +asn_struct_free_f Vanetza_Security2_LaRaInterfacePdu_free; +asn_struct_print_f Vanetza_Security2_LaRaInterfacePdu_print; +asn_constr_check_f Vanetza_Security2_LaRaInterfacePdu_constraint; +ber_type_decoder_f Vanetza_Security2_LaRaInterfacePdu_decode_ber; +der_type_encoder_f Vanetza_Security2_LaRaInterfacePdu_encode_der; +xer_type_decoder_f Vanetza_Security2_LaRaInterfacePdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_LaRaInterfacePdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_LaRaInterfacePdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_LaRaInterfacePdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_LaRaInterfacePdu_encode_oer; +per_type_decoder_f Vanetza_Security2_LaRaInterfacePdu_decode_uper; +per_type_encoder_f Vanetza_Security2_LaRaInterfacePdu_encode_uper; +per_type_decoder_f Vanetza_Security2_LaRaInterfacePdu_decode_aper; +per_type_encoder_f Vanetza_Security2_LaRaInterfacePdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LaRaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LaSsp.c b/vanetza/asn1/security/r2/LaSsp.c new file mode 100644 index 000000000..4e37799fc --- /dev/null +++ b/vanetza/asn1/security/r2/LaSsp.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_LaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LaSsp, laId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "laId" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_LaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* laId */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_LaSsp), + offsetof(struct Vanetza_Security2_LaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_LaSsp_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaSsp = { + "LaSsp", + "LaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_LaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_LaSsp_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_LaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LaSsp.h b/vanetza/asn1/security/r2/LaSsp.h new file mode 100644 index 000000000..ab6e3862e --- /dev/null +++ b/vanetza/asn1/security/r2/LaSsp.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LaSsp_H_ +#define _Vanetza_Security2_LaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Uint16.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LaSsp */ +typedef struct Vanetza_Security2_LaSsp { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Uint16_t laId; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_LaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_LaSsp_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Latitude.c b/vanetza/asn1/security/r2/Latitude.c new file mode 100644 index 000000000..d507d57fd --- /dev/null +++ b/vanetza/asn1/security/r2/Latitude.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Latitude.h" + +int +Vanetza_Security2_Latitude_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= -900000000L && value <= 900000001L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_NinetyDegreeInt, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Latitude_constr_1 CC_NOTUSED = { + { 4, 0 } /* (-900000000..900000001) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Latitude_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 31, -1, -900000000, 900000001 } /* (-900000000..900000001) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Latitude_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Latitude = { + "Latitude", + "Latitude", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Latitude_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Latitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Latitude_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Latitude_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Latitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Latitude_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Latitude_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Latitude_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Latitude_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Latitude.h b/vanetza/asn1/security/r2/Latitude.h new file mode 100644 index 000000000..1bfce0078 --- /dev/null +++ b/vanetza/asn1/security/r2/Latitude.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Latitude_H_ +#define _Vanetza_Security2_Latitude_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NinetyDegreeInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Latitude */ +typedef Vanetza_Security2_NinetyDegreeInt_t Vanetza_Security2_Latitude_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Latitude_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Latitude; +asn_struct_free_f Vanetza_Security2_Latitude_free; +asn_struct_print_f Vanetza_Security2_Latitude_print; +asn_constr_check_f Vanetza_Security2_Latitude_constraint; +ber_type_decoder_f Vanetza_Security2_Latitude_decode_ber; +der_type_encoder_f Vanetza_Security2_Latitude_encode_der; +xer_type_decoder_f Vanetza_Security2_Latitude_decode_xer; +xer_type_encoder_f Vanetza_Security2_Latitude_encode_xer; +jer_type_encoder_f Vanetza_Security2_Latitude_encode_jer; +oer_type_decoder_f Vanetza_Security2_Latitude_decode_oer; +oer_type_encoder_f Vanetza_Security2_Latitude_encode_oer; +per_type_decoder_f Vanetza_Security2_Latitude_decode_uper; +per_type_encoder_f Vanetza_Security2_Latitude_encode_uper; +per_type_decoder_f Vanetza_Security2_Latitude_decode_aper; +per_type_encoder_f Vanetza_Security2_Latitude_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Latitude_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LinkageData.c b/vanetza/asn1/security/r2/LinkageData.c new file mode 100644 index 000000000..b8d170f9a --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageData.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LinkageData.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_LinkageData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LinkageData, iCert), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "iCert" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LinkageData, linkage_value), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkage-value" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_LinkageData, group_linkage_value), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_GroupLinkageValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "group-linkage-value" + }, +}; +static const int asn_MAP_Vanetza_Security2_LinkageData_oms_1[] = { 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LinkageData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_LinkageData_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iCert */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* linkage-value */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* group-linkage-value */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LinkageData_specs_1 = { + sizeof(struct Vanetza_Security2_LinkageData), + offsetof(struct Vanetza_Security2_LinkageData, _asn_ctx), + asn_MAP_Vanetza_Security2_LinkageData_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_LinkageData_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageData = { + "LinkageData", + "LinkageData", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_LinkageData_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LinkageData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageData_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LinkageData_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LinkageData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageData_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_LinkageData_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_LinkageData_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LinkageData.h b/vanetza/asn1/security/r2/LinkageData.h new file mode 100644 index 000000000..8300a86d5 --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageData.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LinkageData_H_ +#define _Vanetza_Security2_LinkageData_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "IValue.h" +#include "LinkageValue.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_GroupLinkageValue; + +/* Vanetza_Security2_LinkageData */ +typedef struct Vanetza_Security2_LinkageData { + Vanetza_Security2_IValue_t iCert; + Vanetza_Security2_LinkageValue_t linkage_value; + struct Vanetza_Security2_GroupLinkageValue *group_linkage_value; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_LinkageData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageData; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LinkageData_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_LinkageData_1[3]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "GroupLinkageValue.h" + +#endif /* _Vanetza_Security2_LinkageData_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LinkageInfo.c b/vanetza/asn1/security/r2/LinkageInfo.c new file mode 100644 index 000000000..a8261ad89 --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageInfo.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LinkageInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_LinkageInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LinkageInfo, encPlv1), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EncryptedIndividualPLV, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encPlv1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LinkageInfo, encPlv2), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EncryptedIndividualPLV, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encPlv2" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LinkageInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_LinkageInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* encPlv1 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encPlv2 */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LinkageInfo_specs_1 = { + sizeof(struct Vanetza_Security2_LinkageInfo), + offsetof(struct Vanetza_Security2_LinkageInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_LinkageInfo_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageInfo = { + "LinkageInfo", + "LinkageInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_LinkageInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LinkageInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LinkageInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LinkageInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_LinkageInfo_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_LinkageInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LinkageInfo.h b/vanetza/asn1/security/r2/LinkageInfo.h new file mode 100644 index 000000000..52eb8dc77 --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageInfo.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LinkageInfo_H_ +#define _Vanetza_Security2_LinkageInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EncryptedIndividualPLV.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LinkageInfo */ +typedef struct Vanetza_Security2_LinkageInfo { + Vanetza_Security2_EncryptedIndividualPLV_t encPlv1; + Vanetza_Security2_EncryptedIndividualPLV_t encPlv2; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_LinkageInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LinkageInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_LinkageInfo_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LinkageInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LinkageSeed.c b/vanetza/asn1/security/r2/LinkageSeed.c new file mode 100644 index 000000000..e5b6f5dda --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageSeed.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LinkageSeed.h" + +int +Vanetza_Security2_LinkageSeed_constraint(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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_LinkageSeed_constr_1 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_LinkageSeed_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LinkageSeed_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageSeed = { + "LinkageSeed", + "LinkageSeed", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_LinkageSeed_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LinkageSeed_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageSeed_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LinkageSeed_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LinkageSeed_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageSeed_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_LinkageSeed_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_LinkageSeed_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_LinkageSeed_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LinkageSeed.h b/vanetza/asn1/security/r2/LinkageSeed.h new file mode 100644 index 000000000..61512244d --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageSeed.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LinkageSeed_H_ +#define _Vanetza_Security2_LinkageSeed_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LinkageSeed */ +typedef OCTET_STRING_t Vanetza_Security2_LinkageSeed_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_LinkageSeed_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageSeed; +asn_struct_free_f Vanetza_Security2_LinkageSeed_free; +asn_struct_print_f Vanetza_Security2_LinkageSeed_print; +asn_constr_check_f Vanetza_Security2_LinkageSeed_constraint; +ber_type_decoder_f Vanetza_Security2_LinkageSeed_decode_ber; +der_type_encoder_f Vanetza_Security2_LinkageSeed_encode_der; +xer_type_decoder_f Vanetza_Security2_LinkageSeed_decode_xer; +xer_type_encoder_f Vanetza_Security2_LinkageSeed_encode_xer; +jer_type_encoder_f Vanetza_Security2_LinkageSeed_encode_jer; +oer_type_decoder_f Vanetza_Security2_LinkageSeed_decode_oer; +oer_type_encoder_f Vanetza_Security2_LinkageSeed_encode_oer; +per_type_decoder_f Vanetza_Security2_LinkageSeed_decode_uper; +per_type_encoder_f Vanetza_Security2_LinkageSeed_encode_uper; +per_type_decoder_f Vanetza_Security2_LinkageSeed_decode_aper; +per_type_encoder_f Vanetza_Security2_LinkageSeed_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LinkageSeed_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LinkageValue.c b/vanetza/asn1/security/r2/LinkageValue.c new file mode 100644 index 000000000..7e66b726c --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageValue.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LinkageValue.h" + +int +Vanetza_Security2_LinkageValue_constraint(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 == 9UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_LinkageValue_constr_1 CC_NOTUSED = { + { 0, 0 }, + 9 /* (SIZE(9..9)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_LinkageValue_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 9, 9 } /* (SIZE(9..9)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LinkageValue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageValue = { + "LinkageValue", + "LinkageValue", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_LinkageValue_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LinkageValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageValue_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LinkageValue_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LinkageValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LinkageValue_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_LinkageValue_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_LinkageValue_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_LinkageValue_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LinkageValue.h b/vanetza/asn1/security/r2/LinkageValue.h new file mode 100644 index 000000000..0f8434ada --- /dev/null +++ b/vanetza/asn1/security/r2/LinkageValue.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LinkageValue_H_ +#define _Vanetza_Security2_LinkageValue_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LinkageValue */ +typedef OCTET_STRING_t Vanetza_Security2_LinkageValue_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_LinkageValue_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LinkageValue; +asn_struct_free_f Vanetza_Security2_LinkageValue_free; +asn_struct_print_f Vanetza_Security2_LinkageValue_print; +asn_constr_check_f Vanetza_Security2_LinkageValue_constraint; +ber_type_decoder_f Vanetza_Security2_LinkageValue_decode_ber; +der_type_encoder_f Vanetza_Security2_LinkageValue_encode_der; +xer_type_decoder_f Vanetza_Security2_LinkageValue_decode_xer; +xer_type_encoder_f Vanetza_Security2_LinkageValue_encode_xer; +jer_type_encoder_f Vanetza_Security2_LinkageValue_encode_jer; +oer_type_decoder_f Vanetza_Security2_LinkageValue_decode_oer; +oer_type_encoder_f Vanetza_Security2_LinkageValue_encode_oer; +per_type_decoder_f Vanetza_Security2_LinkageValue_decode_uper; +per_type_encoder_f Vanetza_Security2_LinkageValue_encode_uper; +per_type_decoder_f Vanetza_Security2_LinkageValue_decode_aper; +per_type_encoder_f Vanetza_Security2_LinkageValue_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LinkageValue_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Longitude.c b/vanetza/asn1/security/r2/Longitude.c new file mode 100644 index 000000000..8ed3bc91a --- /dev/null +++ b/vanetza/asn1/security/r2/Longitude.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Longitude.h" + +int +Vanetza_Security2_Longitude_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= -1799999999L && value <= 1800000001L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_OneEightyDegreeInt, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Longitude_constr_1 CC_NOTUSED = { + { 4, 0 } /* (-1799999999..1800000001) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Longitude_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, -1799999999, 1800000001 } /* (-1799999999..1800000001) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Longitude_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Longitude = { + "Longitude", + "Longitude", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Longitude_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Longitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Longitude_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Longitude_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Longitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Longitude_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Longitude_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Longitude_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Longitude_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Longitude.h b/vanetza/asn1/security/r2/Longitude.h new file mode 100644 index 000000000..ee530cde4 --- /dev/null +++ b/vanetza/asn1/security/r2/Longitude.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Longitude_H_ +#define _Vanetza_Security2_Longitude_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OneEightyDegreeInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Longitude */ +typedef Vanetza_Security2_OneEightyDegreeInt_t Vanetza_Security2_Longitude_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Longitude_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Longitude; +asn_struct_free_f Vanetza_Security2_Longitude_free; +asn_struct_print_f Vanetza_Security2_Longitude_print; +asn_constr_check_f Vanetza_Security2_Longitude_constraint; +ber_type_decoder_f Vanetza_Security2_Longitude_decode_ber; +der_type_encoder_f Vanetza_Security2_Longitude_encode_der; +xer_type_decoder_f Vanetza_Security2_Longitude_decode_xer; +xer_type_encoder_f Vanetza_Security2_Longitude_encode_xer; +jer_type_encoder_f Vanetza_Security2_Longitude_encode_jer; +oer_type_decoder_f Vanetza_Security2_Longitude_decode_oer; +oer_type_encoder_f Vanetza_Security2_Longitude_encode_oer; +per_type_decoder_f Vanetza_Security2_Longitude_decode_uper; +per_type_encoder_f Vanetza_Security2_Longitude_encode_uper; +per_type_decoder_f Vanetza_Security2_Longitude_decode_aper; +per_type_encoder_f Vanetza_Security2_Longitude_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Longitude_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LopSsp.c b/vanetza/asn1/security/r2/LopSsp.c new file mode 100644 index 000000000..5d8596649 --- /dev/null +++ b/vanetza/asn1/security/r2/LopSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LopSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_LopSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_LopSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LopSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_LopSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LopSsp_specs_1 = { + sizeof(struct Vanetza_Security2_LopSsp), + offsetof(struct Vanetza_Security2_LopSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_LopSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LopSsp = { + "LopSsp", + "LopSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_LopSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LopSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LopSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LopSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LopSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LopSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_LopSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_LopSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/LopSsp.h b/vanetza/asn1/security/r2/LopSsp.h new file mode 100644 index 000000000..ba327bf97 --- /dev/null +++ b/vanetza/asn1/security/r2/LopSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LopSsp_H_ +#define _Vanetza_Security2_LopSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LopSsp */ +typedef struct Vanetza_Security2_LopSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_LopSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LopSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_LopSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_LopSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LopSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/LvGenerationFunctionIdentifier.c b/vanetza/asn1/security/r2/LvGenerationFunctionIdentifier.c new file mode 100644 index 000000000..835fce571 --- /dev/null +++ b/vanetza/asn1/security/r2/LvGenerationFunctionIdentifier.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "LvGenerationFunctionIdentifier.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier = { + "LvGenerationFunctionIdentifier", + "LvGenerationFunctionIdentifier", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1, + sizeof(asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/LvGenerationFunctionIdentifier.h b/vanetza/asn1/security/r2/LvGenerationFunctionIdentifier.h new file mode 100644 index 000000000..caf955e6f --- /dev/null +++ b/vanetza/asn1/security/r2/LvGenerationFunctionIdentifier.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_LvGenerationFunctionIdentifier_H_ +#define _Vanetza_Security2_LvGenerationFunctionIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_LvGenerationFunctionIdentifier */ +typedef NULL_t Vanetza_Security2_LvGenerationFunctionIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier; +asn_struct_free_f Vanetza_Security2_LvGenerationFunctionIdentifier_free; +asn_struct_print_f Vanetza_Security2_LvGenerationFunctionIdentifier_print; +asn_constr_check_f Vanetza_Security2_LvGenerationFunctionIdentifier_constraint; +ber_type_decoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_decode_ber; +der_type_encoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_encode_der; +xer_type_decoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_decode_xer; +xer_type_encoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_encode_xer; +jer_type_encoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_encode_jer; +oer_type_decoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_decode_oer; +oer_type_encoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_encode_oer; +per_type_decoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_decode_uper; +per_type_encoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_encode_uper; +per_type_decoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_decode_aper; +per_type_encoder_f Vanetza_Security2_LvGenerationFunctionIdentifier_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_LvGenerationFunctionIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/MaInfoStatus.c b/vanetza/asn1/security/r2/MaInfoStatus.c new file mode 100644 index 000000000..c258f408d --- /dev/null +++ b/vanetza/asn1/security/r2/MaInfoStatus.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "MaInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_MaInfoStatus_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MaInfoStatus, psids), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsid, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "psids" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MaInfoStatus, updated), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "updated" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_MaInfoStatus_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* psids */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* updated */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MaInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_MaInfoStatus), + offsetof(struct Vanetza_Security2_MaInfoStatus, _asn_ctx), + asn_MAP_Vanetza_Security2_MaInfoStatus_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MaInfoStatus = { + "MaInfoStatus", + "MaInfoStatus", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MaInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_MaInfoStatus_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_MaInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/MaInfoStatus.h b/vanetza/asn1/security/r2/MaInfoStatus.h new file mode 100644 index 000000000..e20ddc720 --- /dev/null +++ b/vanetza/asn1/security/r2/MaInfoStatus.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_MaInfoStatus_H_ +#define _Vanetza_Security2_MaInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SequenceOfPsid.h" +#include "Time32.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_MaInfoStatus */ +typedef struct Vanetza_Security2_MaInfoStatus { + Vanetza_Security2_SequenceOfPsid_t psids; + Vanetza_Security2_Time32_t updated; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_MaInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MaInfoStatus; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MaInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_MaInfoStatus_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_MaInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/MaRaInterfacePdu.c b/vanetza/asn1/security/r2/MaRaInterfacePdu.c new file mode 100644 index 000000000..040441f20 --- /dev/null +++ b/vanetza/asn1/security/r2/MaRaInterfacePdu.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1MaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1MaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "MaRaInterfacePdu.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MaRaInterfacePdu = { + "MaRaInterfacePdu", + "MaRaInterfacePdu", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MaRaInterfacePdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/MaRaInterfacePdu.h b/vanetza/asn1/security/r2/MaRaInterfacePdu.h new file mode 100644 index 000000000..7eda04aab --- /dev/null +++ b/vanetza/asn1/security/r2/MaRaInterfacePdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1MaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1MaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_MaRaInterfacePdu_H_ +#define _Vanetza_Security2_MaRaInterfacePdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_MaRaInterfacePdu */ +typedef NULL_t Vanetza_Security2_MaRaInterfacePdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MaRaInterfacePdu; +asn_struct_free_f Vanetza_Security2_MaRaInterfacePdu_free; +asn_struct_print_f Vanetza_Security2_MaRaInterfacePdu_print; +asn_constr_check_f Vanetza_Security2_MaRaInterfacePdu_constraint; +ber_type_decoder_f Vanetza_Security2_MaRaInterfacePdu_decode_ber; +der_type_encoder_f Vanetza_Security2_MaRaInterfacePdu_encode_der; +xer_type_decoder_f Vanetza_Security2_MaRaInterfacePdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_MaRaInterfacePdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_MaRaInterfacePdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_MaRaInterfacePdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_MaRaInterfacePdu_encode_oer; +per_type_decoder_f Vanetza_Security2_MaRaInterfacePdu_decode_uper; +per_type_encoder_f Vanetza_Security2_MaRaInterfacePdu_encode_uper; +per_type_decoder_f Vanetza_Security2_MaRaInterfacePdu_decode_aper; +per_type_encoder_f Vanetza_Security2_MaRaInterfacePdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_MaRaInterfacePdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/MaSsp.c b/vanetza/asn1/security/r2/MaSsp.c new file mode 100644 index 000000000..fa152b2c6 --- /dev/null +++ b/vanetza/asn1/security/r2/MaSsp.c @@ -0,0 +1,130 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "MaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_MaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MaSsp, relevantPsids), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsid, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "relevantPsids" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_MaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_MaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* relevantPsids */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_MaSsp), + offsetof(struct Vanetza_Security2_MaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_MaSsp_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MaSsp = { + "MaSsp", + "MaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_MaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_MaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_MaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_MaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_MaSsp_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_MaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/MaSsp.h b/vanetza/asn1/security/r2/MaSsp.h new file mode 100644 index 000000000..12ee5237e --- /dev/null +++ b/vanetza/asn1/security/r2/MaSsp.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_MaSsp_H_ +#define _Vanetza_Security2_MaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "SequenceOfPsid.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_MaSsp */ +typedef struct Vanetza_Security2_MaSsp { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_SequenceOfPsid_t relevantPsids; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_MaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_MaSsp_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_MaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/MissingCrlIdentifier.c b/vanetza/asn1/security/r2/MissingCrlIdentifier.c new file mode 100644 index 000000000..38c8d0d7b --- /dev/null +++ b/vanetza/asn1/security/r2/MissingCrlIdentifier.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "MissingCrlIdentifier.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_MissingCrlIdentifier_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MissingCrlIdentifier, cracaId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cracaId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MissingCrlIdentifier, crlSeries), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CrlSeries, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crlSeries" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_MissingCrlIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cracaId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* crlSeries */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MissingCrlIdentifier_specs_1 = { + sizeof(struct Vanetza_Security2_MissingCrlIdentifier), + offsetof(struct Vanetza_Security2_MissingCrlIdentifier, _asn_ctx), + asn_MAP_Vanetza_Security2_MissingCrlIdentifier_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MissingCrlIdentifier = { + "MissingCrlIdentifier", + "MissingCrlIdentifier", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1, + sizeof(asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MissingCrlIdentifier_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_MissingCrlIdentifier_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_MissingCrlIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/MissingCrlIdentifier.h b/vanetza/asn1/security/r2/MissingCrlIdentifier.h new file mode 100644 index 000000000..7cfdc93ef --- /dev/null +++ b/vanetza/asn1/security/r2/MissingCrlIdentifier.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_MissingCrlIdentifier_H_ +#define _Vanetza_Security2_MissingCrlIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId3.h" +#include "CrlSeries.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_MissingCrlIdentifier */ +typedef struct Vanetza_Security2_MissingCrlIdentifier { + Vanetza_Security2_HashedId3_t cracaId; + Vanetza_Security2_CrlSeries_t crlSeries; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_MissingCrlIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MissingCrlIdentifier; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MissingCrlIdentifier_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_MissingCrlIdentifier_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_MissingCrlIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/MultiSignedCtl.c b/vanetza/asn1/security/r2/MultiSignedCtl.c new file mode 100644 index 000000000..4554c08da --- /dev/null +++ b/vanetza/asn1/security/r2/MultiSignedCtl.c @@ -0,0 +1,528 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "MultiSignedCtl.h" + +static const long asn_VAL_1_Vanetza_Security2_fullIeeeCtl = 1; +static const asn_ioc_cell_t asn_IOS_Vanetza_Security2_Ieee1609dot2dot1Ctls_1_rows[] = { + { "&type", aioc__value, &asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType, &asn_VAL_1_Vanetza_Security2_fullIeeeCtl }, + { "&TbsCtl", aioc__type, &asn_DEF_Vanetza_Security2_FullIeeeTbsCtl }, + { "&UnsignedCtlMaterial", aioc__type, &asn_DEF_Vanetza_Security2_SequenceOfCertificate } +}; +static const asn_ioc_set_t asn_IOS_Vanetza_Security2_Ieee1609dot2dot1Ctls_1[] = { + { 1, 3, asn_IOS_Vanetza_Security2_Ieee1609dot2dot1Ctls_1_rows } +}; +static int +memb_Vanetza_Security2_type_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* 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_type_selector_result_t +select_MultiSignedCtl_Vanetza_Security2_tbsCtl_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_Vanetza_Security2_Ieee1609dot2dot1Ctls_1; + size_t constraining_column = 0; /* &type */ + size_t for_column = 1; /* &TbsCtl */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Vanetza_Security2_MultiSignedCtl, type)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_Vanetza_Security2_tbsCtl_constraint_1(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); +} + +static asn_type_selector_result_t +select_MultiSignedCtl_Vanetza_Security2_unsigned_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { + asn_type_selector_result_t result = {0, 0}; + const asn_ioc_set_t *itable = asn_IOS_Vanetza_Security2_Ieee1609dot2dot1Ctls_1; + size_t constraining_column = 0; /* &type */ + size_t for_column = 2; /* &UnsignedCtlMaterial */ + size_t row, presence_index = 0; + const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct Vanetza_Security2_MultiSignedCtl, type)); + + for(row=0; row < itable->rows_count; row++) { + const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; + const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; + + if(type_cell->cell_kind == aioc__undefined) + continue; + + presence_index++; + if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { + result.type_descriptor = type_cell->type_descriptor; + result.presence_index = presence_index; + break; + } + } + + return result; +} + +static int +memb_Vanetza_Security2_unsigned_constraint_1(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); +} + +static int +memb_Vanetza_Security2_signatures_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + size_t size; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + /* Determine the number of elements */ + size = _A_CSEQUENCE_FROM_VOID(sptr)->count; + + if((size >= 1UL)) { + /* Perform validation of the inner elements */ + return SEQUENCE_OF_constraint(td, sptr, ctfailcb, app_key); + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_signatures_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_signatures_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_type_constr_2 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_type_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_tbsCtl_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_tbsCtl_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_unsigned_constr_4 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_unsigned_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_signatures_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_signatures_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_tbsCtl_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MultiSignedCtl__tbsCtl, choice.FullIeeeTbsCtl), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_FullIeeeTbsCtl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "FullIeeeTbsCtl" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_tbsCtl_tag2el_3[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* FullIeeeTbsCtl */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_tbsCtl_specs_3 = { + sizeof(struct Vanetza_Security2_MultiSignedCtl__tbsCtl), + offsetof(struct Vanetza_Security2_MultiSignedCtl__tbsCtl, _asn_ctx), + offsetof(struct Vanetza_Security2_MultiSignedCtl__tbsCtl, present), + sizeof(((struct Vanetza_Security2_MultiSignedCtl__tbsCtl *)0)->present), + asn_MAP_Vanetza_Security2_tbsCtl_tag2el_3, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_tbsCtl_3 = { + "tbsCtl", + "tbsCtl", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_Vanetza_Security2_tbsCtl_3, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_tbsCtl_specs_3 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_unsigned_4[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MultiSignedCtl__unsigned, choice.SequenceOfCertificate), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_SequenceOfCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "SequenceOfCertificate" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_unsigned_tag2el_4[] = { + { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* SequenceOfCertificate */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_unsigned_specs_4 = { + sizeof(struct Vanetza_Security2_MultiSignedCtl__unsigned), + offsetof(struct Vanetza_Security2_MultiSignedCtl__unsigned, _asn_ctx), + offsetof(struct Vanetza_Security2_MultiSignedCtl__unsigned, present), + sizeof(((struct Vanetza_Security2_MultiSignedCtl__unsigned *)0)->present), + asn_MAP_Vanetza_Security2_unsigned_tag2el_4, + 1, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_unsigned_4 = { + "unsigned", + "unsigned", + &asn_OP_OPEN_TYPE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OPEN_TYPE_constraint + }, + asn_MBR_Vanetza_Security2_unsigned_4, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_unsigned_specs_4 /* Additional specs */ +}; + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_signatures_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CtlSignatureSpdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_signatures_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_signatures_specs_5 = { + sizeof(struct Vanetza_Security2_MultiSignedCtl__signatures), + offsetof(struct Vanetza_Security2_MultiSignedCtl__signatures, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_signatures_5 = { + "signatures", + "signatures", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_signatures_tags_5, + sizeof(asn_DEF_Vanetza_Security2_signatures_tags_5) + /sizeof(asn_DEF_Vanetza_Security2_signatures_tags_5[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_signatures_tags_5, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_signatures_tags_5) + /sizeof(asn_DEF_Vanetza_Security2_signatures_tags_5[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_signatures_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_signatures_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_signatures_5, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_signatures_specs_5 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_MultiSignedCtl_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MultiSignedCtl, type), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_type_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_type_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_type_constraint_1 + }, + 0, 0, /* No default value */ + "type" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MultiSignedCtl, tbsCtl), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_tbsCtl_3, + select_MultiSignedCtl_Vanetza_Security2_tbsCtl_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_tbsCtl_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_tbsCtl_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_tbsCtl_constraint_1 + }, + 0, 0, /* No default value */ + "tbsCtl" + }, + { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MultiSignedCtl, Unsigned), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_unsigned_4, + select_MultiSignedCtl_Vanetza_Security2_unsigned_type, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_unsigned_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_unsigned_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_unsigned_constraint_1 + }, + 0, 0, /* No default value */ + "unsigned" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_MultiSignedCtl, signatures), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + 0, + &asn_DEF_Vanetza_Security2_signatures_5, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_signatures_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_signatures_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_signatures_constraint_1 + }, + 0, 0, /* No default value */ + "signatures" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_MultiSignedCtl_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* type */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tbsCtl */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* unsigned */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* signatures */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MultiSignedCtl_specs_1 = { + sizeof(struct Vanetza_Security2_MultiSignedCtl), + offsetof(struct Vanetza_Security2_MultiSignedCtl, _asn_ctx), + asn_MAP_Vanetza_Security2_MultiSignedCtl_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MultiSignedCtl = { + "MultiSignedCtl", + "MultiSignedCtl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_MultiSignedCtl_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_MultiSignedCtl_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/MultiSignedCtl.h b/vanetza/asn1/security/r2/MultiSignedCtl.h new file mode 100644 index 000000000..85248025f --- /dev/null +++ b/vanetza/asn1/security/r2/MultiSignedCtl.h @@ -0,0 +1,88 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_MultiSignedCtl_H_ +#define _Vanetza_Security2_MultiSignedCtl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609dot2dot1MsctlType.h" +#include "ANY.h" +#include "asn_ioc.h" +#include "FullIeeeTbsCtl.h" +#include "SequenceOfCertificate.h" +#include "OPEN_TYPE.h" +#include "constr_CHOICE.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_MultiSignedCtl__tbsCtl_PR { + Vanetza_Security2_MultiSignedCtl__tbsCtl_PR_NOTHING, /* No components present */ + Vanetza_Security2_MultiSignedCtl__tbsCtl_PR_FullIeeeTbsCtl +} Vanetza_Security2_MultiSignedCtl__tbsCtl_PR; +typedef enum Vanetza_Security2_MultiSignedCtl__unsigned_PR { + Vanetza_Security2_MultiSignedCtl__unsigned_PR_NOTHING, /* No components present */ + Vanetza_Security2_MultiSignedCtl__unsigned_PR_SequenceOfCertificate +} Vanetza_Security2_MultiSignedCtl__unsigned_PR; + +/* Forward declarations */ +struct Vanetza_Security2_CtlSignatureSpdu; + +/* Vanetza_Security2_MultiSignedCtl */ +typedef struct Vanetza_Security2_MultiSignedCtl { + Vanetza_Security2_Ieee1609dot2dot1MsctlType_t type; + struct Vanetza_Security2_MultiSignedCtl__tbsCtl { + Vanetza_Security2_MultiSignedCtl__tbsCtl_PR present; + union Vanetza_Security2_MultiSignedCtl__Vanetza_Security2_tbsCtl_u { + Vanetza_Security2_FullIeeeTbsCtl_t FullIeeeTbsCtl; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } tbsCtl; + struct Vanetza_Security2_MultiSignedCtl__unsigned { + Vanetza_Security2_MultiSignedCtl__unsigned_PR present; + union Vanetza_Security2_MultiSignedCtl__Vanetza_Security2_unsigned_u { + Vanetza_Security2_SequenceOfCertificate_t SequenceOfCertificate; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } Unsigned; + struct Vanetza_Security2_MultiSignedCtl__signatures { + A_SEQUENCE_OF(struct Vanetza_Security2_CtlSignatureSpdu) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } signatures; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_MultiSignedCtl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MultiSignedCtl; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_MultiSignedCtl_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_MultiSignedCtl_1[4]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CtlSignatureSpdu.h" + +#endif /* _Vanetza_Security2_MultiSignedCtl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/MultiSignedCtlSpdu.c b/vanetza/asn1/security/r2/MultiSignedCtlSpdu.c new file mode 100644 index 000000000..eb3b3d763 --- /dev/null +++ b/vanetza/asn1/security/r2/MultiSignedCtlSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "MultiSignedCtlSpdu.h" + +int +Vanetza_Security2_MultiSignedCtlSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_MultiSignedCtlSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_MultiSignedCtlSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu = { + "MultiSignedCtlSpdu", + "MultiSignedCtlSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_MultiSignedCtlSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_MultiSignedCtlSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_MultiSignedCtlSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/MultiSignedCtlSpdu.h b/vanetza/asn1/security/r2/MultiSignedCtlSpdu.h new file mode 100644 index 000000000..e8fa3bfe3 --- /dev/null +++ b/vanetza/asn1/security/r2/MultiSignedCtlSpdu.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_MultiSignedCtlSpdu_H_ +#define _Vanetza_Security2_MultiSignedCtlSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_MultiSignedCtlSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t Vanetza_Security2_MultiSignedCtlSpdu_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_MultiSignedCtlSpdu_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_MultiSignedCtlSpdu; +asn_struct_free_f Vanetza_Security2_MultiSignedCtlSpdu_free; +asn_struct_print_f Vanetza_Security2_MultiSignedCtlSpdu_print; +asn_constr_check_f Vanetza_Security2_MultiSignedCtlSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_MultiSignedCtlSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_MultiSignedCtlSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_MultiSignedCtlSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_MultiSignedCtlSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_MultiSignedCtlSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_MultiSignedCtlSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_MultiSignedCtlSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_MultiSignedCtlSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_MultiSignedCtlSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_MultiSignedCtlSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_MultiSignedCtlSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_MultiSignedCtlSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/NinetyDegreeInt.c b/vanetza/asn1/security/r2/NinetyDegreeInt.c new file mode 100644 index 000000000..fbeb1f1e8 --- /dev/null +++ b/vanetza/asn1/security/r2/NinetyDegreeInt.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "NinetyDegreeInt.h" + +int +Vanetza_Security2_NinetyDegreeInt_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= -900000000L && value <= 900000001L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_NinetyDegreeInt_constr_1 CC_NOTUSED = { + { 4, 0 } /* (-900000000..900000001) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_NinetyDegreeInt_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 31, -1, -900000000, 900000001 } /* (-900000000..900000001) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_NinetyDegreeInt = { + "NinetyDegreeInt", + "NinetyDegreeInt", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1, + sizeof(asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_NinetyDegreeInt_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_NinetyDegreeInt_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_NinetyDegreeInt_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_NinetyDegreeInt_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/NinetyDegreeInt.h b/vanetza/asn1/security/r2/NinetyDegreeInt.h new file mode 100644 index 000000000..cdd4335dd --- /dev/null +++ b/vanetza/asn1/security/r2/NinetyDegreeInt.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_NinetyDegreeInt_H_ +#define _Vanetza_Security2_NinetyDegreeInt_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_NinetyDegreeInt { + Vanetza_Security2_NinetyDegreeInt_min = -900000000, + Vanetza_Security2_NinetyDegreeInt_max = 900000000, + Vanetza_Security2_NinetyDegreeInt_unknown = 900000001 +} e_Vanetza_Security2_NinetyDegreeInt; + +/* Vanetza_Security2_NinetyDegreeInt */ +typedef long Vanetza_Security2_NinetyDegreeInt_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_NinetyDegreeInt_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_NinetyDegreeInt; +asn_struct_free_f Vanetza_Security2_NinetyDegreeInt_free; +asn_struct_print_f Vanetza_Security2_NinetyDegreeInt_print; +asn_constr_check_f Vanetza_Security2_NinetyDegreeInt_constraint; +ber_type_decoder_f Vanetza_Security2_NinetyDegreeInt_decode_ber; +der_type_encoder_f Vanetza_Security2_NinetyDegreeInt_encode_der; +xer_type_decoder_f Vanetza_Security2_NinetyDegreeInt_decode_xer; +xer_type_encoder_f Vanetza_Security2_NinetyDegreeInt_encode_xer; +jer_type_encoder_f Vanetza_Security2_NinetyDegreeInt_encode_jer; +oer_type_decoder_f Vanetza_Security2_NinetyDegreeInt_decode_oer; +oer_type_encoder_f Vanetza_Security2_NinetyDegreeInt_encode_oer; +per_type_decoder_f Vanetza_Security2_NinetyDegreeInt_decode_uper; +per_type_encoder_f Vanetza_Security2_NinetyDegreeInt_encode_uper; +per_type_decoder_f Vanetza_Security2_NinetyDegreeInt_decode_aper; +per_type_encoder_f Vanetza_Security2_NinetyDegreeInt_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_NinetyDegreeInt_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/One28BitCcmCiphertext.c b/vanetza/asn1/security/r2/One28BitCcmCiphertext.c new file mode 100644 index 000000000..1ad07f95e --- /dev/null +++ b/vanetza/asn1/security/r2/One28BitCcmCiphertext.c @@ -0,0 +1,131 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "One28BitCcmCiphertext.h" + +static int +memb_Vanetza_Security2_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 == 12UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_nonce_constr_2 CC_NOTUSED = { + { 0, 0 }, + 12 /* (SIZE(12..12)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_nonce_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 12, 12 } /* (SIZE(12..12)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_One28BitCcmCiphertext_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_One28BitCcmCiphertext, nonce), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_nonce_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_nonce_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_nonce_constraint_1 + }, + 0, 0, /* No default value */ + "nonce" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_One28BitCcmCiphertext, ccmCiphertext), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Opaque, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ccmCiphertext" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_One28BitCcmCiphertext_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_Vanetza_Security2_One28BitCcmCiphertext_specs_1 = { + sizeof(struct Vanetza_Security2_One28BitCcmCiphertext), + offsetof(struct Vanetza_Security2_One28BitCcmCiphertext, _asn_ctx), + asn_MAP_Vanetza_Security2_One28BitCcmCiphertext_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_Vanetza_Security2_One28BitCcmCiphertext = { + "One28BitCcmCiphertext", + "One28BitCcmCiphertext", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1, + sizeof(asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_One28BitCcmCiphertext_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_One28BitCcmCiphertext_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_One28BitCcmCiphertext_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/One28BitCcmCiphertext.h b/vanetza/asn1/security/r2/One28BitCcmCiphertext.h new file mode 100644 index 000000000..eeaaf27f2 --- /dev/null +++ b/vanetza/asn1/security/r2/One28BitCcmCiphertext.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_One28BitCcmCiphertext_H_ +#define _Vanetza_Security2_One28BitCcmCiphertext_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "Opaque.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_One28BitCcmCiphertext */ +typedef struct Vanetza_Security2_One28BitCcmCiphertext { + OCTET_STRING_t nonce; + Vanetza_Security2_Opaque_t ccmCiphertext; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_One28BitCcmCiphertext_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_One28BitCcmCiphertext; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_One28BitCcmCiphertext_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_One28BitCcmCiphertext_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_One28BitCcmCiphertext_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/OneEightyDegreeInt.c b/vanetza/asn1/security/r2/OneEightyDegreeInt.c new file mode 100644 index 000000000..cb23726b5 --- /dev/null +++ b/vanetza/asn1/security/r2/OneEightyDegreeInt.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "OneEightyDegreeInt.h" + +int +Vanetza_Security2_OneEightyDegreeInt_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= -1799999999L && value <= 1800000001L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_OneEightyDegreeInt_constr_1 CC_NOTUSED = { + { 4, 0 } /* (-1799999999..1800000001) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_OneEightyDegreeInt_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, -1799999999, 1800000001 } /* (-1799999999..1800000001) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_OneEightyDegreeInt = { + "OneEightyDegreeInt", + "OneEightyDegreeInt", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1, + sizeof(asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_OneEightyDegreeInt_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_OneEightyDegreeInt_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_OneEightyDegreeInt_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_OneEightyDegreeInt_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/OneEightyDegreeInt.h b/vanetza/asn1/security/r2/OneEightyDegreeInt.h new file mode 100644 index 000000000..df4f1e481 --- /dev/null +++ b/vanetza/asn1/security/r2/OneEightyDegreeInt.h @@ -0,0 +1,54 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_OneEightyDegreeInt_H_ +#define _Vanetza_Security2_OneEightyDegreeInt_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_OneEightyDegreeInt { + Vanetza_Security2_OneEightyDegreeInt_min = -1799999999, + Vanetza_Security2_OneEightyDegreeInt_max = 1800000000, + Vanetza_Security2_OneEightyDegreeInt_unknown = 1800000001 +} e_Vanetza_Security2_OneEightyDegreeInt; + +/* Vanetza_Security2_OneEightyDegreeInt */ +typedef long Vanetza_Security2_OneEightyDegreeInt_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_OneEightyDegreeInt_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_OneEightyDegreeInt; +asn_struct_free_f Vanetza_Security2_OneEightyDegreeInt_free; +asn_struct_print_f Vanetza_Security2_OneEightyDegreeInt_print; +asn_constr_check_f Vanetza_Security2_OneEightyDegreeInt_constraint; +ber_type_decoder_f Vanetza_Security2_OneEightyDegreeInt_decode_ber; +der_type_encoder_f Vanetza_Security2_OneEightyDegreeInt_encode_der; +xer_type_decoder_f Vanetza_Security2_OneEightyDegreeInt_decode_xer; +xer_type_encoder_f Vanetza_Security2_OneEightyDegreeInt_encode_xer; +jer_type_encoder_f Vanetza_Security2_OneEightyDegreeInt_encode_jer; +oer_type_decoder_f Vanetza_Security2_OneEightyDegreeInt_decode_oer; +oer_type_encoder_f Vanetza_Security2_OneEightyDegreeInt_encode_oer; +per_type_decoder_f Vanetza_Security2_OneEightyDegreeInt_decode_uper; +per_type_encoder_f Vanetza_Security2_OneEightyDegreeInt_encode_uper; +per_type_decoder_f Vanetza_Security2_OneEightyDegreeInt_decode_aper; +per_type_encoder_f Vanetza_Security2_OneEightyDegreeInt_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_OneEightyDegreeInt_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Opaque.c b/vanetza/asn1/security/r2/Opaque.c new file mode 100644 index 000000000..8625f60c6 --- /dev/null +++ b/vanetza/asn1/security/r2/Opaque.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Opaque.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Opaque_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Opaque = { + "Opaque", + "Opaque", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_Opaque_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Opaque_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Opaque_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Opaque_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Opaque_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Opaque_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OCTET_STRING_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Opaque.h b/vanetza/asn1/security/r2/Opaque.h new file mode 100644 index 000000000..a462fbb82 --- /dev/null +++ b/vanetza/asn1/security/r2/Opaque.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Opaque_H_ +#define _Vanetza_Security2_Opaque_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Opaque */ +typedef OCTET_STRING_t Vanetza_Security2_Opaque_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Opaque; +asn_struct_free_f Vanetza_Security2_Opaque_free; +asn_struct_print_f Vanetza_Security2_Opaque_print; +asn_constr_check_f Vanetza_Security2_Opaque_constraint; +ber_type_decoder_f Vanetza_Security2_Opaque_decode_ber; +der_type_encoder_f Vanetza_Security2_Opaque_encode_der; +xer_type_decoder_f Vanetza_Security2_Opaque_decode_xer; +xer_type_encoder_f Vanetza_Security2_Opaque_encode_xer; +jer_type_encoder_f Vanetza_Security2_Opaque_encode_jer; +oer_type_decoder_f Vanetza_Security2_Opaque_decode_oer; +oer_type_encoder_f Vanetza_Security2_Opaque_encode_oer; +per_type_decoder_f Vanetza_Security2_Opaque_decode_uper; +per_type_encoder_f Vanetza_Security2_Opaque_encode_uper; +per_type_decoder_f Vanetza_Security2_Opaque_decode_aper; +per_type_encoder_f Vanetza_Security2_Opaque_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Opaque_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/OperatingOrganizationId.c b/vanetza/asn1/security/r2/OperatingOrganizationId.c new file mode 100644 index 000000000..72ab91516 --- /dev/null +++ b/vanetza/asn1/security/r2/OperatingOrganizationId.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "OperatingOrganizationId.h" + +/* + * This type is implemented using OBJECT_IDENTIFIER, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_OperatingOrganizationId = { + "OperatingOrganizationId", + "OperatingOrganizationId", + &asn_OP_OBJECT_IDENTIFIER, + asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_OperatingOrganizationId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OBJECT_IDENTIFIER_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/OperatingOrganizationId.h b/vanetza/asn1/security/r2/OperatingOrganizationId.h new file mode 100644 index 000000000..cb21245f9 --- /dev/null +++ b/vanetza/asn1/security/r2/OperatingOrganizationId.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_OperatingOrganizationId_H_ +#define _Vanetza_Security2_OperatingOrganizationId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OBJECT_IDENTIFIER.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_OperatingOrganizationId */ +typedef OBJECT_IDENTIFIER_t Vanetza_Security2_OperatingOrganizationId_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_OperatingOrganizationId; +asn_struct_free_f Vanetza_Security2_OperatingOrganizationId_free; +asn_struct_print_f Vanetza_Security2_OperatingOrganizationId_print; +asn_constr_check_f Vanetza_Security2_OperatingOrganizationId_constraint; +ber_type_decoder_f Vanetza_Security2_OperatingOrganizationId_decode_ber; +der_type_encoder_f Vanetza_Security2_OperatingOrganizationId_encode_der; +xer_type_decoder_f Vanetza_Security2_OperatingOrganizationId_decode_xer; +xer_type_encoder_f Vanetza_Security2_OperatingOrganizationId_encode_xer; +jer_type_encoder_f Vanetza_Security2_OperatingOrganizationId_encode_jer; +oer_type_decoder_f Vanetza_Security2_OperatingOrganizationId_decode_oer; +oer_type_encoder_f Vanetza_Security2_OperatingOrganizationId_encode_oer; +per_type_decoder_f Vanetza_Security2_OperatingOrganizationId_decode_uper; +per_type_encoder_f Vanetza_Security2_OperatingOrganizationId_encode_uper; +per_type_decoder_f Vanetza_Security2_OperatingOrganizationId_decode_aper; +per_type_encoder_f Vanetza_Security2_OperatingOrganizationId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_OperatingOrganizationId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PKRecipientInfo.c b/vanetza/asn1/security/r2/PKRecipientInfo.c new file mode 100644 index 000000000..593ad057f --- /dev/null +++ b/vanetza/asn1/security/r2/PKRecipientInfo.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PKRecipientInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PKRecipientInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PKRecipientInfo, recipientId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "recipientId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PKRecipientInfo, encKey), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EncryptedDataEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encKey" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PKRecipientInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recipientId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encKey */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PKRecipientInfo_specs_1 = { + sizeof(struct Vanetza_Security2_PKRecipientInfo), + offsetof(struct Vanetza_Security2_PKRecipientInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_PKRecipientInfo_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_Vanetza_Security2_PKRecipientInfo = { + "PKRecipientInfo", + "PKRecipientInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PKRecipientInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PKRecipientInfo_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_PKRecipientInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PKRecipientInfo.h b/vanetza/asn1/security/r2/PKRecipientInfo.h new file mode 100644 index 000000000..a6187781e --- /dev/null +++ b/vanetza/asn1/security/r2/PKRecipientInfo.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PKRecipientInfo_H_ +#define _Vanetza_Security2_PKRecipientInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "EncryptedDataEncryptionKey.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PKRecipientInfo */ +typedef struct Vanetza_Security2_PKRecipientInfo { + Vanetza_Security2_HashedId8_t recipientId; + Vanetza_Security2_EncryptedDataEncryptionKey_t encKey; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PKRecipientInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PKRecipientInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PKRecipientInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PKRecipientInfo_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PKRecipientInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PduFunctionalType.c b/vanetza/asn1/security/r2/PduFunctionalType.c new file mode 100644 index 000000000..030529575 --- /dev/null +++ b/vanetza/asn1/security/r2/PduFunctionalType.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PduFunctionalType.h" + +int +Vanetza_Security2_PduFunctionalType_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_PduFunctionalType_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_PduFunctionalType_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PduFunctionalType = { + "PduFunctionalType", + "PduFunctionalType", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PduFunctionalType_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_PduFunctionalType_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_PduFunctionalType_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_PduFunctionalType_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/PduFunctionalType.h b/vanetza/asn1/security/r2/PduFunctionalType.h new file mode 100644 index 000000000..c405b0f21 --- /dev/null +++ b/vanetza/asn1/security/r2/PduFunctionalType.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PduFunctionalType_H_ +#define _Vanetza_Security2_PduFunctionalType_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PduFunctionalType */ +typedef long Vanetza_Security2_PduFunctionalType_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_PduFunctionalType_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PduFunctionalType; +asn_struct_free_f Vanetza_Security2_PduFunctionalType_free; +asn_struct_print_f Vanetza_Security2_PduFunctionalType_print; +asn_constr_check_f Vanetza_Security2_PduFunctionalType_constraint; +ber_type_decoder_f Vanetza_Security2_PduFunctionalType_decode_ber; +der_type_encoder_f Vanetza_Security2_PduFunctionalType_encode_der; +xer_type_decoder_f Vanetza_Security2_PduFunctionalType_decode_xer; +xer_type_encoder_f Vanetza_Security2_PduFunctionalType_encode_xer; +jer_type_encoder_f Vanetza_Security2_PduFunctionalType_encode_jer; +oer_type_decoder_f Vanetza_Security2_PduFunctionalType_decode_oer; +oer_type_encoder_f Vanetza_Security2_PduFunctionalType_encode_oer; +per_type_decoder_f Vanetza_Security2_PduFunctionalType_decode_uper; +per_type_encoder_f Vanetza_Security2_PduFunctionalType_encode_uper; +per_type_decoder_f Vanetza_Security2_PduFunctionalType_decode_aper; +per_type_encoder_f Vanetza_Security2_PduFunctionalType_encode_aper; +#define Vanetza_Security2_PduFunctionalType_tlsHandshake ((Vanetza_Security2_PduFunctionalType_t)1) +#define Vanetza_Security2_PduFunctionalType_iso21177ExtendedAuth ((Vanetza_Security2_PduFunctionalType_t)2) +#define Vanetza_Security2_PduFunctionalType_iso21177SessionExtension ((Vanetza_Security2_PduFunctionalType_t)3) + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PduFunctionalType_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PgSsp.c b/vanetza/asn1/security/r2/PgSsp.c new file mode 100644 index 000000000..f7f709de8 --- /dev/null +++ b/vanetza/asn1/security/r2/PgSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PgSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PgSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PgSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PgSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PgSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PgSsp_specs_1 = { + sizeof(struct Vanetza_Security2_PgSsp), + offsetof(struct Vanetza_Security2_PgSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_PgSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PgSsp = { + "PgSsp", + "PgSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PgSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PgSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PgSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PgSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PgSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PgSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PgSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_PgSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PgSsp.h b/vanetza/asn1/security/r2/PgSsp.h new file mode 100644 index 000000000..3ef1e7372 --- /dev/null +++ b/vanetza/asn1/security/r2/PgSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PgSsp_H_ +#define _Vanetza_Security2_PgSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PgSsp */ +typedef struct Vanetza_Security2_PgSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PgSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PgSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PgSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PgSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PgSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PolygonalRegion.c b/vanetza/asn1/security/r2/PolygonalRegion.c new file mode 100644 index 000000000..b2caee2c5 --- /dev/null +++ b/vanetza/asn1/security/r2/PolygonalRegion.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PolygonalRegion.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_PolygonalRegion_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(3..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_PolygonalRegion_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 3, 0 } /* (SIZE(3..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PolygonalRegion_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_TwoDLocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_PolygonalRegion_specs_1 = { + sizeof(struct Vanetza_Security2_PolygonalRegion), + offsetof(struct Vanetza_Security2_PolygonalRegion, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PolygonalRegion = { + "PolygonalRegion", + "PolygonalRegion", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PolygonalRegion_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_PolygonalRegion_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_PolygonalRegion_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_PolygonalRegion_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_PolygonalRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PolygonalRegion.h b/vanetza/asn1/security/r2/PolygonalRegion.h new file mode 100644 index 000000000..e9a03cb4b --- /dev/null +++ b/vanetza/asn1/security/r2/PolygonalRegion.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PolygonalRegion_H_ +#define _Vanetza_Security2_PolygonalRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_TwoDLocation; + +/* Vanetza_Security2_PolygonalRegion */ +typedef struct Vanetza_Security2_PolygonalRegion { + A_SEQUENCE_OF(struct Vanetza_Security2_TwoDLocation) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PolygonalRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PolygonalRegion; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_PolygonalRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PolygonalRegion_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_PolygonalRegion_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "TwoDLocation.h" + +#endif /* _Vanetza_Security2_PolygonalRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PreLinkageValue.c b/vanetza/asn1/security/r2/PreLinkageValue.c new file mode 100644 index 000000000..5e583abf9 --- /dev/null +++ b/vanetza/asn1/security/r2/PreLinkageValue.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PreLinkageValue.h" + +int +Vanetza_Security2_PreLinkageValue_constraint(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 == 9UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_PreLinkageValue_constr_1 CC_NOTUSED = { + { 0, 0 }, + 9 /* (SIZE(9..9)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_PreLinkageValue_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 9, 9 } /* (SIZE(9..9)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PreLinkageValue = { + "PreLinkageValue", + "PreLinkageValue", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PreLinkageValue_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_PreLinkageValue_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_PreLinkageValue_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_PreLinkageValue_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PreLinkageValue.h b/vanetza/asn1/security/r2/PreLinkageValue.h new file mode 100644 index 000000000..a0db9b901 --- /dev/null +++ b/vanetza/asn1/security/r2/PreLinkageValue.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PreLinkageValue_H_ +#define _Vanetza_Security2_PreLinkageValue_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PreLinkageValue */ +typedef OCTET_STRING_t Vanetza_Security2_PreLinkageValue_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PreLinkageValue; +asn_struct_free_f Vanetza_Security2_PreLinkageValue_free; +asn_struct_print_f Vanetza_Security2_PreLinkageValue_print; +asn_constr_check_f Vanetza_Security2_PreLinkageValue_constraint; +ber_type_decoder_f Vanetza_Security2_PreLinkageValue_decode_ber; +der_type_encoder_f Vanetza_Security2_PreLinkageValue_encode_der; +xer_type_decoder_f Vanetza_Security2_PreLinkageValue_decode_xer; +xer_type_encoder_f Vanetza_Security2_PreLinkageValue_encode_xer; +jer_type_encoder_f Vanetza_Security2_PreLinkageValue_encode_jer; +oer_type_decoder_f Vanetza_Security2_PreLinkageValue_decode_oer; +oer_type_encoder_f Vanetza_Security2_PreLinkageValue_encode_oer; +per_type_decoder_f Vanetza_Security2_PreLinkageValue_decode_uper; +per_type_encoder_f Vanetza_Security2_PreLinkageValue_encode_uper; +per_type_decoder_f Vanetza_Security2_PreLinkageValue_decode_aper; +per_type_encoder_f Vanetza_Security2_PreLinkageValue_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PreLinkageValue_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PreSharedKeyRecipientInfo.c b/vanetza/asn1/security/r2/PreSharedKeyRecipientInfo.c new file mode 100644 index 000000000..812eff80d --- /dev/null +++ b/vanetza/asn1/security/r2/PreSharedKeyRecipientInfo.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PreSharedKeyRecipientInfo.h" + +int +Vanetza_Security2_PreSharedKeyRecipientInfo_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const Vanetza_Security2_HashedId8_t *st = (const Vanetza_Security2_HashedId8_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 == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_HashedId8, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_PreSharedKeyRecipientInfo_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_PreSharedKeyRecipientInfo_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo = { + "PreSharedKeyRecipientInfo", + "PreSharedKeyRecipientInfo", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_PreSharedKeyRecipientInfo_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_PreSharedKeyRecipientInfo_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_PreSharedKeyRecipientInfo_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PreSharedKeyRecipientInfo.h b/vanetza/asn1/security/r2/PreSharedKeyRecipientInfo.h new file mode 100644 index 000000000..1518864d7 --- /dev/null +++ b/vanetza/asn1/security/r2/PreSharedKeyRecipientInfo.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PreSharedKeyRecipientInfo_H_ +#define _Vanetza_Security2_PreSharedKeyRecipientInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PreSharedKeyRecipientInfo */ +typedef Vanetza_Security2_HashedId8_t Vanetza_Security2_PreSharedKeyRecipientInfo_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_PreSharedKeyRecipientInfo_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo; +asn_struct_free_f Vanetza_Security2_PreSharedKeyRecipientInfo_free; +asn_struct_print_f Vanetza_Security2_PreSharedKeyRecipientInfo_print; +asn_constr_check_f Vanetza_Security2_PreSharedKeyRecipientInfo_constraint; +ber_type_decoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_decode_ber; +der_type_encoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_encode_der; +xer_type_decoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_decode_xer; +xer_type_encoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_encode_xer; +jer_type_encoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_encode_jer; +oer_type_decoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_decode_oer; +oer_type_encoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_encode_oer; +per_type_decoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_decode_uper; +per_type_encoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_encode_uper; +per_type_decoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_decode_aper; +per_type_encoder_f Vanetza_Security2_PreSharedKeyRecipientInfo_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PreSharedKeyRecipientInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Psid.c b/vanetza/asn1/security/r2/Psid.c new file mode 100644 index 000000000..638a65b05 --- /dev/null +++ b/vanetza/asn1/security/r2/Psid.c @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Psid.h" + +int +Vanetza_Security2_Psid_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + unsigned long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if(1 /* No applicable constraints whatsoever */) { + (void)value; /* Unused variable */ + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Psid_constr_1 CC_NOTUSED = { + { 0, 1 } /* (0..MAX) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Psid_constr_1 CC_NOTUSED = { + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (0..MAX) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_Psid_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Psid_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Psid = { + "Psid", + "Psid", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Psid_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Psid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Psid_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Psid_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Psid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Psid_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Psid_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Psid_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Psid_constraint + }, + 0, 0, /* No members */ + &asn_SPC_Vanetza_Security2_Psid_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Psid.h b/vanetza/asn1/security/r2/Psid.h new file mode 100644 index 000000000..8fada495a --- /dev/null +++ b/vanetza/asn1/security/r2/Psid.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Psid_H_ +#define _Vanetza_Security2_Psid_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Psid */ +typedef unsigned long Vanetza_Security2_Psid_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Psid_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Psid; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_Psid_specs_1; +asn_struct_free_f Vanetza_Security2_Psid_free; +asn_struct_print_f Vanetza_Security2_Psid_print; +asn_constr_check_f Vanetza_Security2_Psid_constraint; +ber_type_decoder_f Vanetza_Security2_Psid_decode_ber; +der_type_encoder_f Vanetza_Security2_Psid_encode_der; +xer_type_decoder_f Vanetza_Security2_Psid_decode_xer; +xer_type_encoder_f Vanetza_Security2_Psid_encode_xer; +jer_type_encoder_f Vanetza_Security2_Psid_encode_jer; +oer_type_decoder_f Vanetza_Security2_Psid_decode_oer; +oer_type_encoder_f Vanetza_Security2_Psid_encode_oer; +per_type_decoder_f Vanetza_Security2_Psid_decode_uper; +per_type_encoder_f Vanetza_Security2_Psid_encode_uper; +per_type_decoder_f Vanetza_Security2_Psid_decode_aper; +per_type_encoder_f Vanetza_Security2_Psid_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Psid_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PsidGroupPermissions.c b/vanetza/asn1/security/r2/PsidGroupPermissions.c new file mode 100644 index 000000000..ee023ecaf --- /dev/null +++ b/vanetza/asn1/security/r2/PsidGroupPermissions.c @@ -0,0 +1,183 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PsidGroupPermissions.h" + +static int asn_DFL_3_cmp_1(const void *sptr) { + const long *st = sptr; + + if(!st) { + return -1; /* No value is not a default value */ + } + + /* Test default value 1 */ + return (*st != 1); +} +static int asn_DFL_3_set_1(void **sptr) { + long *st = *sptr; + + if(!st) { + st = (*sptr = CALLOC(1, sizeof(*st))); + if(!st) return -1; + } + + /* Install default value 1 */ + *st = 1; + return 0; +} +static int asn_DFL_4_cmp_0(const void *sptr) { + const long *st = sptr; + + if(!st) { + return -1; /* No value is not a default value */ + } + + /* Test default value 0 */ + return (*st != 0); +} +static int asn_DFL_4_set_0(void **sptr) { + long *st = *sptr; + + if(!st) { + st = (*sptr = CALLOC(1, sizeof(*st))); + if(!st) return -1; + } + + /* Install default value 0 */ + *st = 0; + return 0; +} +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PsidGroupPermissions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PsidGroupPermissions, subjectPermissions), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SubjectPermissions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "subjectPermissions" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_PsidGroupPermissions, minChainLength), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + &asn_DFL_3_cmp_1, /* Compare DEFAULT 1 */ + &asn_DFL_3_set_1, /* Set DEFAULT 1 */ + "minChainLength" + }, + { ATF_NOFLAGS, 2, offsetof(struct Vanetza_Security2_PsidGroupPermissions, chainLengthRange), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NativeInteger, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + &asn_DFL_4_cmp_0, /* Compare DEFAULT 0 */ + &asn_DFL_4_set_0, /* Set DEFAULT 0 */ + "chainLengthRange" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_PsidGroupPermissions, eeType), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EndEntityType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eeType" + }, +}; +static const int asn_MAP_Vanetza_Security2_PsidGroupPermissions_oms_1[] = { 1, 2, 3 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PsidGroupPermissions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* subjectPermissions */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* minChainLength */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* chainLengthRange */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* eeType */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PsidGroupPermissions_specs_1 = { + sizeof(struct Vanetza_Security2_PsidGroupPermissions), + offsetof(struct Vanetza_Security2_PsidGroupPermissions, _asn_ctx), + asn_MAP_Vanetza_Security2_PsidGroupPermissions_tag2el_1, + 4, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_PsidGroupPermissions_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PsidGroupPermissions = { + "PsidGroupPermissions", + "PsidGroupPermissions", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PsidGroupPermissions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PsidGroupPermissions_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_PsidGroupPermissions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PsidGroupPermissions.h b/vanetza/asn1/security/r2/PsidGroupPermissions.h new file mode 100644 index 000000000..9ab51e5fb --- /dev/null +++ b/vanetza/asn1/security/r2/PsidGroupPermissions.h @@ -0,0 +1,45 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PsidGroupPermissions_H_ +#define _Vanetza_Security2_PsidGroupPermissions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SubjectPermissions.h" +#include "NativeInteger.h" +#include "EndEntityType.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PsidGroupPermissions */ +typedef struct Vanetza_Security2_PsidGroupPermissions { + Vanetza_Security2_SubjectPermissions_t subjectPermissions; + long *minChainLength; /* DEFAULT 1 */ + long chainLengthRange; /* DEFAULT 0 */ + Vanetza_Security2_EndEntityType_t *eeType; /* DEFAULT {app} */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PsidGroupPermissions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PsidGroupPermissions; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PsidGroupPermissions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PsidGroupPermissions_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PsidGroupPermissions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PsidSsp.c b/vanetza/asn1/security/r2/PsidSsp.c new file mode 100644 index 000000000..a45e6a876 --- /dev/null +++ b/vanetza/asn1/security/r2/PsidSsp.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PsidSsp.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PsidSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PsidSsp, psid), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Psid, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "psid" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_PsidSsp, ssp), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ServiceSpecificPermissions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ssp" + }, +}; +static const int asn_MAP_Vanetza_Security2_PsidSsp_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PsidSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PsidSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* psid */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* ssp */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PsidSsp_specs_1 = { + sizeof(struct Vanetza_Security2_PsidSsp), + offsetof(struct Vanetza_Security2_PsidSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_PsidSsp_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_PsidSsp_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PsidSsp = { + "PsidSsp", + "PsidSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PsidSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PsidSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PsidSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PsidSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PsidSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PsidSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PsidSsp_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_PsidSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PsidSsp.h b/vanetza/asn1/security/r2/PsidSsp.h new file mode 100644 index 000000000..6aa03eea0 --- /dev/null +++ b/vanetza/asn1/security/r2/PsidSsp.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PsidSsp_H_ +#define _Vanetza_Security2_PsidSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_ServiceSpecificPermissions; + +/* Vanetza_Security2_PsidSsp */ +typedef struct Vanetza_Security2_PsidSsp { + Vanetza_Security2_Psid_t psid; + struct Vanetza_Security2_ServiceSpecificPermissions *ssp; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PsidSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PsidSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PsidSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PsidSsp_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "ServiceSpecificPermissions.h" + +#endif /* _Vanetza_Security2_PsidSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PsidSspRange.c b/vanetza/asn1/security/r2/PsidSspRange.c new file mode 100644 index 000000000..49595e24d --- /dev/null +++ b/vanetza/asn1/security/r2/PsidSspRange.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PsidSspRange.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PsidSspRange_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PsidSspRange, psid), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Psid, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "psid" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_PsidSspRange, sspRange), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SspRange, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sspRange" + }, +}; +static const int asn_MAP_Vanetza_Security2_PsidSspRange_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PsidSspRange_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PsidSspRange_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* psid */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sspRange */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PsidSspRange_specs_1 = { + sizeof(struct Vanetza_Security2_PsidSspRange), + offsetof(struct Vanetza_Security2_PsidSspRange, _asn_ctx), + asn_MAP_Vanetza_Security2_PsidSspRange_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_PsidSspRange_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PsidSspRange = { + "PsidSspRange", + "PsidSspRange", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PsidSspRange_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PsidSspRange_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PsidSspRange_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PsidSspRange_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PsidSspRange_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PsidSspRange_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PsidSspRange_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_PsidSspRange_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PsidSspRange.h b/vanetza/asn1/security/r2/PsidSspRange.h new file mode 100644 index 000000000..859cc9020 --- /dev/null +++ b/vanetza/asn1/security/r2/PsidSspRange.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PsidSspRange_H_ +#define _Vanetza_Security2_PsidSspRange_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_SspRange; + +/* Vanetza_Security2_PsidSspRange */ +typedef struct Vanetza_Security2_PsidSspRange { + Vanetza_Security2_Psid_t psid; + struct Vanetza_Security2_SspRange *sspRange; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PsidSspRange_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PsidSspRange; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PsidSspRange_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PsidSspRange_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SspRange.h" + +#endif /* _Vanetza_Security2_PsidSspRange_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PublicEncryptionKey.c b/vanetza/asn1/security/r2/PublicEncryptionKey.c new file mode 100644 index 000000000..b95fbf89a --- /dev/null +++ b/vanetza/asn1/security/r2/PublicEncryptionKey.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PublicEncryptionKey.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PublicEncryptionKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicEncryptionKey, supportedSymmAlg), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SymmAlgorithm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "supportedSymmAlg" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicEncryptionKey, publicKey), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_BasePublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "publicKey" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PublicEncryptionKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* supportedSymmAlg */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* publicKey */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PublicEncryptionKey_specs_1 = { + sizeof(struct Vanetza_Security2_PublicEncryptionKey), + offsetof(struct Vanetza_Security2_PublicEncryptionKey, _asn_ctx), + asn_MAP_Vanetza_Security2_PublicEncryptionKey_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_Vanetza_Security2_PublicEncryptionKey = { + "PublicEncryptionKey", + "PublicEncryptionKey", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PublicEncryptionKey_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PublicEncryptionKey_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_PublicEncryptionKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PublicEncryptionKey.h b/vanetza/asn1/security/r2/PublicEncryptionKey.h new file mode 100644 index 000000000..7e9ff3950 --- /dev/null +++ b/vanetza/asn1/security/r2/PublicEncryptionKey.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PublicEncryptionKey_H_ +#define _Vanetza_Security2_PublicEncryptionKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SymmAlgorithm.h" +#include "BasePublicEncryptionKey.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_PublicEncryptionKey */ +typedef struct Vanetza_Security2_PublicEncryptionKey { + Vanetza_Security2_SymmAlgorithm_t supportedSymmAlg; + Vanetza_Security2_BasePublicEncryptionKey_t publicKey; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PublicEncryptionKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PublicEncryptionKey; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PublicEncryptionKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PublicEncryptionKey_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PublicEncryptionKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PublicKeys.c b/vanetza/asn1/security/r2/PublicKeys.c new file mode 100644 index 000000000..03366a004 --- /dev/null +++ b/vanetza/asn1/security/r2/PublicKeys.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PublicKeys.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PublicKeys_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicKeys, verificationKey), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicVerificationKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "verificationKey" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_PublicKeys, encryptionKey), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptionKey" + }, +}; +static const int asn_MAP_Vanetza_Security2_PublicKeys_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_PublicKeys_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PublicKeys_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* verificationKey */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encryptionKey */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PublicKeys_specs_1 = { + sizeof(struct Vanetza_Security2_PublicKeys), + offsetof(struct Vanetza_Security2_PublicKeys, _asn_ctx), + asn_MAP_Vanetza_Security2_PublicKeys_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_PublicKeys_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PublicKeys = { + "PublicKeys", + "PublicKeys", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_PublicKeys_tags_1, + sizeof(asn_DEF_Vanetza_Security2_PublicKeys_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PublicKeys_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_PublicKeys_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_PublicKeys_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_PublicKeys_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_PublicKeys_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_PublicKeys_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PublicKeys.h b/vanetza/asn1/security/r2/PublicKeys.h new file mode 100644 index 000000000..2dd501e5a --- /dev/null +++ b/vanetza/asn1/security/r2/PublicKeys.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PublicKeys_H_ +#define _Vanetza_Security2_PublicKeys_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PublicVerificationKey.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_PublicEncryptionKey; + +/* Vanetza_Security2_PublicKeys */ +typedef struct Vanetza_Security2_PublicKeys { + Vanetza_Security2_PublicVerificationKey_t verificationKey; + struct Vanetza_Security2_PublicEncryptionKey *encryptionKey; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PublicKeys_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PublicKeys; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_PublicKeys_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PublicKeys_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "PublicEncryptionKey.h" + +#endif /* _Vanetza_Security2_PublicKeys_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/PublicVerificationKey.c b/vanetza/asn1/security/r2/PublicVerificationKey.c new file mode 100644 index 000000000..a100fdc7f --- /dev/null +++ b/vanetza/asn1/security/r2/PublicVerificationKey.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "PublicVerificationKey.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_PublicVerificationKey_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_PublicVerificationKey_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_PublicVerificationKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicVerificationKey, choice.ecdsaNistP256), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaNistP256" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicVerificationKey, choice.ecdsaBrainpoolP256r1), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaBrainpoolP256r1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicVerificationKey, choice.ecdsaBrainpoolP384r1), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP384CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaBrainpoolP384r1" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicVerificationKey, choice.ecdsaNistP384), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP384CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaNistP384" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_PublicVerificationKey, choice.ecsigSm2), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecsigSm2" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_PublicVerificationKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ecdsaNistP256 */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ecdsaBrainpoolP256r1 */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ecdsaBrainpoolP384r1 */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ecdsaNistP384 */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* ecsigSm2 */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_PublicVerificationKey_specs_1 = { + sizeof(struct Vanetza_Security2_PublicVerificationKey), + offsetof(struct Vanetza_Security2_PublicVerificationKey, _asn_ctx), + offsetof(struct Vanetza_Security2_PublicVerificationKey, present), + sizeof(((struct Vanetza_Security2_PublicVerificationKey *)0)->present), + asn_MAP_Vanetza_Security2_PublicVerificationKey_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PublicVerificationKey = { + "PublicVerificationKey", + "PublicVerificationKey", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_PublicVerificationKey_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_PublicVerificationKey_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_PublicVerificationKey_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_PublicVerificationKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/PublicVerificationKey.h b/vanetza/asn1/security/r2/PublicVerificationKey.h new file mode 100644 index 000000000..b23625316 --- /dev/null +++ b/vanetza/asn1/security/r2/PublicVerificationKey.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_PublicVerificationKey_H_ +#define _Vanetza_Security2_PublicVerificationKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EccP256CurvePoint.h" +#include "EccP384CurvePoint.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_PublicVerificationKey_PR { + Vanetza_Security2_PublicVerificationKey_PR_NOTHING, /* No components present */ + Vanetza_Security2_PublicVerificationKey_PR_ecdsaNistP256, + Vanetza_Security2_PublicVerificationKey_PR_ecdsaBrainpoolP256r1, + /* Extensions may appear below */ + Vanetza_Security2_PublicVerificationKey_PR_ecdsaBrainpoolP384r1, + Vanetza_Security2_PublicVerificationKey_PR_ecdsaNistP384, + Vanetza_Security2_PublicVerificationKey_PR_ecsigSm2 +} Vanetza_Security2_PublicVerificationKey_PR; + +/* Vanetza_Security2_PublicVerificationKey */ +typedef struct Vanetza_Security2_PublicVerificationKey { + Vanetza_Security2_PublicVerificationKey_PR present; + union Vanetza_Security2_PublicVerificationKey_u { + Vanetza_Security2_EccP256CurvePoint_t ecdsaNistP256; + Vanetza_Security2_EccP256CurvePoint_t ecdsaBrainpoolP256r1; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_EccP384CurvePoint_t ecdsaBrainpoolP384r1; + Vanetza_Security2_EccP384CurvePoint_t ecdsaNistP384; + Vanetza_Security2_EccP256CurvePoint_t ecsigSm2; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_PublicVerificationKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_PublicVerificationKey; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_PublicVerificationKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_PublicVerificationKey_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_PublicVerificationKey_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_PublicVerificationKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaAcaCertRequest.c b/vanetza/asn1/security/r2/RaAcaCertRequest.c new file mode 100644 index 000000000..dfe3dccbd --- /dev/null +++ b/vanetza/asn1/security/r2/RaAcaCertRequest.c @@ -0,0 +1,268 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaAcaCertRequest.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_tbsCert_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_tbsCert_constr_8 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_tbsCert_constr_8 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaAcaCertRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaAcaCertRequest, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaAcaCertRequest, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaAcaCertRequest, type), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "type" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaAcaCertRequest, flags), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "flags" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_RaAcaCertRequest, linkageInfo), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LinkageInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "linkageInfo" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_RaAcaCertRequest, certEncKey), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certEncKey" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaAcaCertRequest, tbsCert), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_tbsCert_constr_8, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_tbsCert_constr_8, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_tbsCert_constraint_1 + }, + 0, 0, /* No default value */ + "tbsCert" + }, +}; +static const int asn_MAP_Vanetza_Security2_RaAcaCertRequest_oms_1[] = { 4, 5 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RaAcaCertRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* type */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* flags */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* linkageInfo */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* certEncKey */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* tbsCert */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaAcaCertRequest_specs_1 = { + sizeof(struct Vanetza_Security2_RaAcaCertRequest), + offsetof(struct Vanetza_Security2_RaAcaCertRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_RaAcaCertRequest_tag2el_1, + 7, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_RaAcaCertRequest_oms_1, /* Optional members */ + 2, 0, /* Root/Additions */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaAcaCertRequest = { + "RaAcaCertRequest", + "RaAcaCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RaAcaCertRequest_1, + 7, /* Elements count */ + &asn_SPC_Vanetza_Security2_RaAcaCertRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaAcaCertRequest.h b/vanetza/asn1/security/r2/RaAcaCertRequest.h new file mode 100644 index 000000000..2b3dcf8a7 --- /dev/null +++ b/vanetza/asn1/security/r2/RaAcaCertRequest.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaAcaCertRequest_H_ +#define _Vanetza_Security2_RaAcaCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "CertificateType.h" +#include "RaAcaCertRequestFlags.h" +#include "ToBeSignedCertificate.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_LinkageInfo; +struct Vanetza_Security2_PublicEncryptionKey; + +/* Vanetza_Security2_RaAcaCertRequest */ +typedef struct Vanetza_Security2_RaAcaCertRequest { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_CertificateType_t type; + Vanetza_Security2_RaAcaCertRequestFlags_t flags; + struct Vanetza_Security2_LinkageInfo *linkageInfo; /* OPTIONAL */ + struct Vanetza_Security2_PublicEncryptionKey *certEncKey; /* OPTIONAL */ + Vanetza_Security2_ToBeSignedCertificate_t tbsCert; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RaAcaCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaAcaCertRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaAcaCertRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaAcaCertRequest_1[7]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "LinkageInfo.h" +#include "PublicEncryptionKey.h" + +#endif /* _Vanetza_Security2_RaAcaCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaAcaCertRequestFlags.c b/vanetza/asn1/security/r2/RaAcaCertRequestFlags.c new file mode 100644 index 000000000..72b078a18 --- /dev/null +++ b/vanetza/asn1/security/r2/RaAcaCertRequestFlags.c @@ -0,0 +1,89 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaAcaCertRequestFlags.h" + +int +Vanetza_Security2_RaAcaCertRequestFlags_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_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; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using BIT_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) +static asn_jer_constraints_t asn_JER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1 CC_NOTUSED = { + 8}; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags = { + "RaAcaCertRequestFlags", + "RaAcaCertRequestFlags", + &asn_OP_BIT_STRING, + asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + &asn_JER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RaAcaCertRequestFlags_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_BIT_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaAcaCertRequestFlags.h b/vanetza/asn1/security/r2/RaAcaCertRequestFlags.h new file mode 100644 index 000000000..fef82a7a7 --- /dev/null +++ b/vanetza/asn1/security/r2/RaAcaCertRequestFlags.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1AcaRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1AcaRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaAcaCertRequestFlags_H_ +#define _Vanetza_Security2_RaAcaCertRequestFlags_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "BIT_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_RaAcaCertRequestFlags { + Vanetza_Security2_RaAcaCertRequestFlags_butterflyExplicit = 0, + Vanetza_Security2_RaAcaCertRequestFlags_cubk = 1 +} e_Vanetza_Security2_RaAcaCertRequestFlags; + +/* Vanetza_Security2_RaAcaCertRequestFlags */ +typedef BIT_STRING_t Vanetza_Security2_RaAcaCertRequestFlags_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaAcaCertRequestFlags_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaAcaCertRequestFlags; +asn_struct_free_f Vanetza_Security2_RaAcaCertRequestFlags_free; +asn_struct_print_f Vanetza_Security2_RaAcaCertRequestFlags_print; +asn_constr_check_f Vanetza_Security2_RaAcaCertRequestFlags_constraint; +ber_type_decoder_f Vanetza_Security2_RaAcaCertRequestFlags_decode_ber; +der_type_encoder_f Vanetza_Security2_RaAcaCertRequestFlags_encode_der; +xer_type_decoder_f Vanetza_Security2_RaAcaCertRequestFlags_decode_xer; +xer_type_encoder_f Vanetza_Security2_RaAcaCertRequestFlags_encode_xer; +jer_type_encoder_f Vanetza_Security2_RaAcaCertRequestFlags_encode_jer; +oer_type_decoder_f Vanetza_Security2_RaAcaCertRequestFlags_decode_oer; +oer_type_encoder_f Vanetza_Security2_RaAcaCertRequestFlags_encode_oer; +per_type_decoder_f Vanetza_Security2_RaAcaCertRequestFlags_decode_uper; +per_type_encoder_f Vanetza_Security2_RaAcaCertRequestFlags_encode_uper; +per_type_decoder_f Vanetza_Security2_RaAcaCertRequestFlags_decode_aper; +per_type_encoder_f Vanetza_Security2_RaAcaCertRequestFlags_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaAcaCertRequestFlags_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaAcaCertRequestSpdu.c b/vanetza/asn1/security/r2/RaAcaCertRequestSpdu.c new file mode 100644 index 000000000..cadbd9c63 --- /dev/null +++ b/vanetza/asn1/security/r2/RaAcaCertRequestSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaAcaCertRequestSpdu.h" + +int +Vanetza_Security2_RaAcaCertRequestSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RaAcaCertRequestSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaAcaCertRequestSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu = { + "RaAcaCertRequestSpdu", + "RaAcaCertRequestSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RaAcaCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RaAcaCertRequestSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RaAcaCertRequestSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaAcaCertRequestSpdu.h b/vanetza/asn1/security/r2/RaAcaCertRequestSpdu.h new file mode 100644 index 000000000..e6f7821cd --- /dev/null +++ b/vanetza/asn1/security/r2/RaAcaCertRequestSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaAcaCertRequestSpdu_H_ +#define _Vanetza_Security2_RaAcaCertRequestSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-SignedCertRequest.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaAcaCertRequestSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_SignedCertRequest_290P1_t Vanetza_Security2_RaAcaCertRequestSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaAcaCertRequestSpdu; +asn_struct_free_f Vanetza_Security2_RaAcaCertRequestSpdu_free; +asn_struct_print_f Vanetza_Security2_RaAcaCertRequestSpdu_print; +asn_constr_check_f Vanetza_Security2_RaAcaCertRequestSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_RaAcaCertRequestSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_RaAcaCertRequestSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_RaAcaCertRequestSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_RaAcaCertRequestSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_RaAcaCertRequestSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_RaAcaCertRequestSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_RaAcaCertRequestSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_RaAcaCertRequestSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_RaAcaCertRequestSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_RaAcaCertRequestSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_RaAcaCertRequestSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaAcaCertRequestSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaCamBatchRequest.c b/vanetza/asn1/security/r2/RaCamBatchRequest.c new file mode 100644 index 000000000..58758308c --- /dev/null +++ b/vanetza/asn1/security/r2/RaCamBatchRequest.c @@ -0,0 +1,248 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaCamBatchRequest.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_eeId_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 == 5UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_eeId_constr_3 CC_NOTUSED = { + { 0, 0 }, + 5 /* (SIZE(5..5)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_eeId_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 5, 5 } /* (SIZE(5..5)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_periodList_4[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_periodList_tags_4[] = { + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_periodList_specs_4 = { + sizeof(struct Vanetza_Security2_RaCamBatchRequest__periodList), + offsetof(struct Vanetza_Security2_RaCamBatchRequest__periodList, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_periodList_4 = { + "periodList", + "periodList", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_periodList_tags_4, + sizeof(asn_DEF_Vanetza_Security2_periodList_tags_4) + /sizeof(asn_DEF_Vanetza_Security2_periodList_tags_4[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_periodList_tags_4, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_periodList_tags_4) + /sizeof(asn_DEF_Vanetza_Security2_periodList_tags_4[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_periodList_4, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_periodList_specs_4 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaCamBatchRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaCamBatchRequest, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaCamBatchRequest, eeId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_eeId_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_eeId_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_eeId_constraint_1 + }, + 0, 0, /* No default value */ + "eeId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaCamBatchRequest, periodList), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + 0, + &asn_DEF_Vanetza_Security2_periodList_4, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "periodList" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RaCamBatchRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eeId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* periodList */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaCamBatchRequest_specs_1 = { + sizeof(struct Vanetza_Security2_RaCamBatchRequest), + offsetof(struct Vanetza_Security2_RaCamBatchRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_RaCamBatchRequest_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 3, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaCamBatchRequest = { + "RaCamBatchRequest", + "RaCamBatchRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaCamBatchRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RaCamBatchRequest_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_RaCamBatchRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaCamBatchRequest.h b/vanetza/asn1/security/r2/RaCamBatchRequest.h new file mode 100644 index 000000000..287e75cac --- /dev/null +++ b/vanetza/asn1/security/r2/RaCamBatchRequest.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CamRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1CamRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaCamBatchRequest_H_ +#define _Vanetza_Security2_RaCamBatchRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "OCTET_STRING.h" +#include "IValue.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaCamBatchRequest */ +typedef struct Vanetza_Security2_RaCamBatchRequest { + Vanetza_Security2_Uint8_t version; + OCTET_STRING_t eeId; + struct Vanetza_Security2_RaCamBatchRequest__periodList { + A_SEQUENCE_OF(Vanetza_Security2_IValue_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } periodList; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RaCamBatchRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaCamBatchRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaCamBatchRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaCamBatchRequest_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaCamBatchRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaEeCertAck.c b/vanetza/asn1/security/r2/RaEeCertAck.c new file mode 100644 index 000000000..616d1bc7c --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertAck.c @@ -0,0 +1,195 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaEeCertAck.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaEeCertAck_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertAck, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertAck, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertAck, requestHash), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_RaEeCertAck, firstI), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "firstI" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertAck, nextDlTime), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nextDlTime" + }, +}; +static const int asn_MAP_Vanetza_Security2_RaEeCertAck_oms_1[] = { 3 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RaEeCertAck_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* firstI */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* nextDlTime */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaEeCertAck_specs_1 = { + sizeof(struct Vanetza_Security2_RaEeCertAck), + offsetof(struct Vanetza_Security2_RaEeCertAck, _asn_ctx), + asn_MAP_Vanetza_Security2_RaEeCertAck_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_RaEeCertAck_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 5, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertAck = { + "RaEeCertAck", + "RaEeCertAck", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertAck_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RaEeCertAck_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_RaEeCertAck_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaEeCertAck.h b/vanetza/asn1/security/r2/RaEeCertAck.h new file mode 100644 index 000000000..ebc50ad11 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertAck.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaEeCertAck_H_ +#define _Vanetza_Security2_RaEeCertAck_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "HashedId8.h" +#include "IValue.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaEeCertAck */ +typedef struct Vanetza_Security2_RaEeCertAck { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_HashedId8_t requestHash; + Vanetza_Security2_IValue_t *firstI; /* OPTIONAL */ + Vanetza_Security2_Time32_t nextDlTime; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RaEeCertAck_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertAck; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaEeCertAck_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaEeCertAck_1[5]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaEeCertAck_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaEeCertAckSpdu.c b/vanetza/asn1/security/r2/RaEeCertAckSpdu.c new file mode 100644 index 000000000..90265dc01 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertAckSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaEeCertAckSpdu.h" + +int +Vanetza_Security2_RaEeCertAckSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RaEeCertAckSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaEeCertAckSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertAckSpdu = { + "RaEeCertAckSpdu", + "RaEeCertAckSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertAckSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RaEeCertAckSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RaEeCertAckSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RaEeCertAckSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaEeCertAckSpdu.h b/vanetza/asn1/security/r2/RaEeCertAckSpdu.h new file mode 100644 index 000000000..4ca011aa1 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertAckSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaEeCertAckSpdu_H_ +#define _Vanetza_Security2_RaEeCertAckSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaEeCertAckSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_RaEeCertAckSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertAckSpdu; +asn_struct_free_f Vanetza_Security2_RaEeCertAckSpdu_free; +asn_struct_print_f Vanetza_Security2_RaEeCertAckSpdu_print; +asn_constr_check_f Vanetza_Security2_RaEeCertAckSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_RaEeCertAckSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_RaEeCertAckSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_RaEeCertAckSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_RaEeCertAckSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_RaEeCertAckSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_RaEeCertAckSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_RaEeCertAckSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_RaEeCertAckSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_RaEeCertAckSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_RaEeCertAckSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_RaEeCertAckSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaEeCertAckSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaEeCertAndAcpcInfoSpdu.c b/vanetza/asn1/security/r2/RaEeCertAndAcpcInfoSpdu.c new file mode 100644 index 000000000..aa533399f --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertAndAcpcInfoSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaEeCertAndAcpcInfoSpdu.h" + +int +Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu = { + "RaEeCertAndAcpcInfoSpdu", + "RaEeCertAndAcpcInfoSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaEeCertAndAcpcInfoSpdu.h b/vanetza/asn1/security/r2/RaEeCertAndAcpcInfoSpdu.h new file mode 100644 index 000000000..6443a3fbb --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertAndAcpcInfoSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_H_ +#define _Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaEeCertAndAcpcInfoSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertAndAcpcInfoSpdu; +asn_struct_free_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_free; +asn_struct_print_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_print; +asn_constr_check_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaEeCertAndAcpcInfoSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaEeCertInfo.c b/vanetza/asn1/security/r2/RaEeCertInfo.c new file mode 100644 index 000000000..5caeac123 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertInfo.c @@ -0,0 +1,216 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaEeCertInfo.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaEeCertInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertInfo, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertInfo, generationTime), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "generationTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertInfo, currentI), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "currentI" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertInfo, requestHash), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "requestHash" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaEeCertInfo, nextDlTime), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nextDlTime" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_RaEeCertInfo, acpcTreeId), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcpcTreeId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "acpcTreeId" + }, +}; +static const int asn_MAP_Vanetza_Security2_RaEeCertInfo_oms_1[] = { 5 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RaEeCertInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* generationTime */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* currentI */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* requestHash */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* nextDlTime */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* acpcTreeId */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaEeCertInfo_specs_1 = { + sizeof(struct Vanetza_Security2_RaEeCertInfo), + offsetof(struct Vanetza_Security2_RaEeCertInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_RaEeCertInfo_tag2el_1, + 6, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_RaEeCertInfo_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + 6, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertInfo = { + "RaEeCertInfo", + "RaEeCertInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RaEeCertInfo_1, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_RaEeCertInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaEeCertInfo.h b/vanetza/asn1/security/r2/RaEeCertInfo.h new file mode 100644 index 000000000..94ad89e77 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertInfo.h @@ -0,0 +1,53 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1EeRaInterface" + * found in "build.asn1/ieee/IEEE1609dot2dot1EeRaInterface.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaEeCertInfo_H_ +#define _Vanetza_Security2_RaEeCertInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "Time32.h" +#include "IValue.h" +#include "HashedId8.h" +#include "AcpcTreeId.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaEeCertInfo */ +typedef struct Vanetza_Security2_RaEeCertInfo { + Vanetza_Security2_Uint8_t version; + Vanetza_Security2_Time32_t generationTime; + Vanetza_Security2_IValue_t currentI; + Vanetza_Security2_HashedId8_t requestHash; + Vanetza_Security2_Time32_t nextDlTime; + Vanetza_Security2_AcpcTreeId_t *acpcTreeId; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RaEeCertInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaEeCertInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaEeCertInfo_1[6]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaEeCertInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaEeCertInfoSpdu.c b/vanetza/asn1/security/r2/RaEeCertInfoSpdu.c new file mode 100644 index 000000000..6d1ffdc64 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertInfoSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaEeCertInfoSpdu.h" + +int +Vanetza_Security2_RaEeCertInfoSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RaEeCertInfoSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaEeCertInfoSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu = { + "RaEeCertInfoSpdu", + "RaEeCertInfoSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RaEeCertInfoSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RaEeCertInfoSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RaEeCertInfoSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaEeCertInfoSpdu.h b/vanetza/asn1/security/r2/RaEeCertInfoSpdu.h new file mode 100644 index 000000000..1511f36b3 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeCertInfoSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaEeCertInfoSpdu_H_ +#define _Vanetza_Security2_RaEeCertInfoSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaEeCertInfoSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P0_t Vanetza_Security2_RaEeCertInfoSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeCertInfoSpdu; +asn_struct_free_f Vanetza_Security2_RaEeCertInfoSpdu_free; +asn_struct_print_f Vanetza_Security2_RaEeCertInfoSpdu_print; +asn_constr_check_f Vanetza_Security2_RaEeCertInfoSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_RaEeCertInfoSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_RaEeCertInfoSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_RaEeCertInfoSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_RaEeCertInfoSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_RaEeCertInfoSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_RaEeCertInfoSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_RaEeCertInfoSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_RaEeCertInfoSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_RaEeCertInfoSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_RaEeCertInfoSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_RaEeCertInfoSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaEeCertInfoSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaEeEnrollmentCertAckSpdu.c b/vanetza/asn1/security/r2/RaEeEnrollmentCertAckSpdu.c new file mode 100644 index 000000000..2cc86c7e6 --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeEnrollmentCertAckSpdu.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaEeEnrollmentCertAckSpdu.h" + +int +Vanetza_Security2_RaEeEnrollmentCertAckSpdu_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu = { + "RaEeEnrollmentCertAckSpdu", + "RaEeEnrollmentCertAckSpdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RaEeEnrollmentCertAckSpdu_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RaEeEnrollmentCertAckSpdu_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaEeEnrollmentCertAckSpdu.h b/vanetza/asn1/security/r2/RaEeEnrollmentCertAckSpdu.h new file mode 100644 index 000000000..510d75b2f --- /dev/null +++ b/vanetza/asn1/security/r2/RaEeEnrollmentCertAckSpdu.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaEeEnrollmentCertAckSpdu_H_ +#define _Vanetza_Security2_RaEeEnrollmentCertAckSpdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaEeEnrollmentCertAckSpdu */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P2_t Vanetza_Security2_RaEeEnrollmentCertAckSpdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaEeEnrollmentCertAckSpdu; +asn_struct_free_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_free; +asn_struct_print_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_print; +asn_constr_check_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_constraint; +ber_type_decoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_decode_ber; +der_type_encoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_encode_der; +xer_type_decoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_decode_xer; +xer_type_encoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_encode_xer; +jer_type_encoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_encode_jer; +oer_type_decoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_decode_oer; +oer_type_encoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_encode_oer; +per_type_decoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_decode_uper; +per_type_encoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_encode_uper; +per_type_decoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_decode_aper; +per_type_encoder_f Vanetza_Security2_RaEeEnrollmentCertAckSpdu_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaEeEnrollmentCertAckSpdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RaSsp.c b/vanetza/asn1/security/r2/RaSsp.c new file mode 100644 index 000000000..57755823a --- /dev/null +++ b/vanetza/asn1/security/r2/RaSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_RaSsp), + offsetof(struct Vanetza_Security2_RaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_RaSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaSsp = { + "RaSsp", + "RaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RaSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_RaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RaSsp.h b/vanetza/asn1/security/r2/RaSsp.h new file mode 100644 index 000000000..31092234c --- /dev/null +++ b/vanetza/asn1/security/r2/RaSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RaSsp_H_ +#define _Vanetza_Security2_RaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RaSsp */ +typedef struct Vanetza_Security2_RaSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RaSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RcaDoubleSignedLinkCertificateMessage.c b/vanetza/asn1/security/r2/RcaDoubleSignedLinkCertificateMessage.c new file mode 100644 index 000000000..54e4225ee --- /dev/null +++ b/vanetza/asn1/security/r2/RcaDoubleSignedLinkCertificateMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RcaDoubleSignedLinkCertificateMessage.h" + +int +Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage = { + "RcaDoubleSignedLinkCertificateMessage", + "RcaDoubleSignedLinkCertificateMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RcaDoubleSignedLinkCertificateMessage.h b/vanetza/asn1/security/r2/RcaDoubleSignedLinkCertificateMessage.h new file mode 100644 index 000000000..58c53135e --- /dev/null +++ b/vanetza/asn1/security/r2/RcaDoubleSignedLinkCertificateMessage.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_H_ +#define _Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage; +asn_struct_free_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_free; +asn_struct_print_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_print; +asn_constr_check_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_constraint; +ber_type_decoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RcaDoubleSignedLinkCertificateMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RcaSingleSignedLinkCertificateMessage.c b/vanetza/asn1/security/r2/RcaSingleSignedLinkCertificateMessage.c new file mode 100644 index 000000000..390b8cca0 --- /dev/null +++ b/vanetza/asn1/security/r2/RcaSingleSignedLinkCertificateMessage.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RcaSingleSignedLinkCertificateMessage.h" + +int +Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_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 Vanetza_Security2_EtsiTs103097Data_Signed_63P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage = { + "RcaSingleSignedLinkCertificateMessage", + "RcaSingleSignedLinkCertificateMessage", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RcaSingleSignedLinkCertificateMessage.h b/vanetza/asn1/security/r2/RcaSingleSignedLinkCertificateMessage.h new file mode 100644 index 000000000..46e40c931 --- /dev/null +++ b/vanetza/asn1/security/r2/RcaSingleSignedLinkCertificateMessage.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941MessagesCa" + * found in "asn1/release2/TS102941v221/MessagesCa.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_H_ +#define _Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RcaSingleSignedLinkCertificateMessage */ +typedef Vanetza_Security2_EtsiTs103097Data_Signed_63P0_t Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RcaSingleSignedLinkCertificateMessage; +asn_struct_free_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_free; +asn_struct_print_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_print; +asn_constr_check_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_constraint; +ber_type_decoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_decode_ber; +der_type_encoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_encode_der; +xer_type_decoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_decode_xer; +xer_type_encoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_encode_xer; +jer_type_encoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_encode_jer; +oer_type_decoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_decode_oer; +oer_type_encoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_encode_oer; +per_type_decoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_decode_uper; +per_type_encoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_encode_uper; +per_type_decoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_decode_aper; +per_type_encoder_f Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RcaSingleSignedLinkCertificateMessage_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RecipientInfo.c b/vanetza/asn1/security/r2/RecipientInfo.c new file mode 100644 index 000000000..54934d627 --- /dev/null +++ b/vanetza/asn1/security/r2/RecipientInfo.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RecipientInfo.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_RecipientInfo_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_RecipientInfo_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 3, 3, 0, 4 } /* (0..4) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RecipientInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RecipientInfo, choice.pskRecipInfo), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PreSharedKeyRecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "pskRecipInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RecipientInfo, choice.symmRecipInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SymmRecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "symmRecipInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RecipientInfo, choice.certRecipInfo), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PKRecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certRecipInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RecipientInfo, choice.signedDataRecipInfo), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PKRecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signedDataRecipInfo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RecipientInfo, choice.rekRecipInfo), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PKRecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "rekRecipInfo" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RecipientInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pskRecipInfo */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* symmRecipInfo */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* certRecipInfo */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* signedDataRecipInfo */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* rekRecipInfo */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_RecipientInfo_specs_1 = { + sizeof(struct Vanetza_Security2_RecipientInfo), + offsetof(struct Vanetza_Security2_RecipientInfo, _asn_ctx), + offsetof(struct Vanetza_Security2_RecipientInfo, present), + sizeof(((struct Vanetza_Security2_RecipientInfo *)0)->present), + asn_MAP_Vanetza_Security2_RecipientInfo_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + -1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RecipientInfo = { + "RecipientInfo", + "RecipientInfo", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_RecipientInfo_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_RecipientInfo_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_RecipientInfo_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_RecipientInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RecipientInfo.h b/vanetza/asn1/security/r2/RecipientInfo.h new file mode 100644 index 000000000..92281caaf --- /dev/null +++ b/vanetza/asn1/security/r2/RecipientInfo.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RecipientInfo_H_ +#define _Vanetza_Security2_RecipientInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PreSharedKeyRecipientInfo.h" +#include "SymmRecipientInfo.h" +#include "PKRecipientInfo.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_RecipientInfo_PR { + Vanetza_Security2_RecipientInfo_PR_NOTHING, /* No components present */ + Vanetza_Security2_RecipientInfo_PR_pskRecipInfo, + Vanetza_Security2_RecipientInfo_PR_symmRecipInfo, + Vanetza_Security2_RecipientInfo_PR_certRecipInfo, + Vanetza_Security2_RecipientInfo_PR_signedDataRecipInfo, + Vanetza_Security2_RecipientInfo_PR_rekRecipInfo +} Vanetza_Security2_RecipientInfo_PR; + +/* Vanetza_Security2_RecipientInfo */ +typedef struct Vanetza_Security2_RecipientInfo { + Vanetza_Security2_RecipientInfo_PR present; + union Vanetza_Security2_RecipientInfo_u { + Vanetza_Security2_PreSharedKeyRecipientInfo_t pskRecipInfo; + Vanetza_Security2_SymmRecipientInfo_t symmRecipInfo; + Vanetza_Security2_PKRecipientInfo_t certRecipInfo; + Vanetza_Security2_PKRecipientInfo_t signedDataRecipInfo; + Vanetza_Security2_PKRecipientInfo_t rekRecipInfo; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RecipientInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RecipientInfo; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_RecipientInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RecipientInfo_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_RecipientInfo_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RecipientInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RectangularRegion.c b/vanetza/asn1/security/r2/RectangularRegion.c new file mode 100644 index 000000000..e80e81c3a --- /dev/null +++ b/vanetza/asn1/security/r2/RectangularRegion.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RectangularRegion.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RectangularRegion_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RectangularRegion, northWest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_TwoDLocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "northWest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RectangularRegion, southEast), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_TwoDLocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "southEast" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RectangularRegion_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RectangularRegion_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* northWest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* southEast */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RectangularRegion_specs_1 = { + sizeof(struct Vanetza_Security2_RectangularRegion), + offsetof(struct Vanetza_Security2_RectangularRegion, _asn_ctx), + asn_MAP_Vanetza_Security2_RectangularRegion_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_Vanetza_Security2_RectangularRegion = { + "RectangularRegion", + "RectangularRegion", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RectangularRegion_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RectangularRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RectangularRegion_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RectangularRegion_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RectangularRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RectangularRegion_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RectangularRegion_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_RectangularRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RectangularRegion.h b/vanetza/asn1/security/r2/RectangularRegion.h new file mode 100644 index 000000000..7e6fea0da --- /dev/null +++ b/vanetza/asn1/security/r2/RectangularRegion.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RectangularRegion_H_ +#define _Vanetza_Security2_RectangularRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "TwoDLocation.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RectangularRegion */ +typedef struct Vanetza_Security2_RectangularRegion { + Vanetza_Security2_TwoDLocation_t northWest; + Vanetza_Security2_TwoDLocation_t southEast; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RectangularRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RectangularRegion; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RectangularRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RectangularRegion_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RectangularRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RegionAndSubregions.c b/vanetza/asn1/security/r2/RegionAndSubregions.c new file mode 100644 index 000000000..0fd16c04c --- /dev/null +++ b/vanetza/asn1/security/r2/RegionAndSubregions.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RegionAndSubregions.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RegionAndSubregions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RegionAndSubregions, region), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "region" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RegionAndSubregions, subregions), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfUint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "subregions" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RegionAndSubregions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* region */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* subregions */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RegionAndSubregions_specs_1 = { + sizeof(struct Vanetza_Security2_RegionAndSubregions), + offsetof(struct Vanetza_Security2_RegionAndSubregions, _asn_ctx), + asn_MAP_Vanetza_Security2_RegionAndSubregions_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_Vanetza_Security2_RegionAndSubregions = { + "RegionAndSubregions", + "RegionAndSubregions", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RegionAndSubregions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RegionAndSubregions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_RegionAndSubregions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RegionAndSubregions.h b/vanetza/asn1/security/r2/RegionAndSubregions.h new file mode 100644 index 000000000..156a4f721 --- /dev/null +++ b/vanetza/asn1/security/r2/RegionAndSubregions.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RegionAndSubregions_H_ +#define _Vanetza_Security2_RegionAndSubregions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "SequenceOfUint16.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RegionAndSubregions */ +typedef struct Vanetza_Security2_RegionAndSubregions { + Vanetza_Security2_Uint8_t region; + Vanetza_Security2_SequenceOfUint16_t subregions; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RegionAndSubregions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RegionAndSubregions; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RegionAndSubregions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RegionAndSubregions_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RegionAndSubregions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RootCaEntry.c b/vanetza/asn1/security/r2/RootCaEntry.c new file mode 100644 index 000000000..8be2bb371 --- /dev/null +++ b/vanetza/asn1/security/r2/RootCaEntry.c @@ -0,0 +1,95 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RootCaEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RootCaEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RootCaEntry, selfsignedRootCa), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "selfsignedRootCa" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_RootCaEntry, successorTo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "successorTo" + }, +}; +static const int asn_MAP_Vanetza_Security2_RootCaEntry_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RootCaEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RootCaEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* selfsignedRootCa */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* successorTo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RootCaEntry_specs_1 = { + sizeof(struct Vanetza_Security2_RootCaEntry), + offsetof(struct Vanetza_Security2_RootCaEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_RootCaEntry_tag2el_1, + 2, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_RootCaEntry_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RootCaEntry = { + "RootCaEntry", + "RootCaEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RootCaEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RootCaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RootCaEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RootCaEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RootCaEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RootCaEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RootCaEntry_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_RootCaEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RootCaEntry.h b/vanetza/asn1/security/r2/RootCaEntry.h new file mode 100644 index 000000000..07c9b7557 --- /dev/null +++ b/vanetza/asn1/security/r2/RootCaEntry.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RootCaEntry_H_ +#define _Vanetza_Security2_RootCaEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Certificate.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_EtsiTs103097Certificate; + +/* Vanetza_Security2_RootCaEntry */ +typedef struct Vanetza_Security2_RootCaEntry { + Vanetza_Security2_EtsiTs103097Certificate_t selfsignedRootCa; + struct Vanetza_Security2_EtsiTs103097Certificate *successorTo; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RootCaEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RootCaEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RootCaEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RootCaEntry_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "EtsiTs103097Certificate.h" + +#endif /* _Vanetza_Security2_RootCaEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/RootCaSsp.c b/vanetza/asn1/security/r2/RootCaSsp.c new file mode 100644 index 000000000..1247ccec5 --- /dev/null +++ b/vanetza/asn1/security/r2/RootCaSsp.c @@ -0,0 +1,109 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "RootCaSsp.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_RootCaSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_RootCaSsp, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_RootCaSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_RootCaSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* version */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RootCaSsp_specs_1 = { + sizeof(struct Vanetza_Security2_RootCaSsp), + offsetof(struct Vanetza_Security2_RootCaSsp, _asn_ctx), + asn_MAP_Vanetza_Security2_RootCaSsp_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RootCaSsp = { + "RootCaSsp", + "RootCaSsp", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_RootCaSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_RootCaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RootCaSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_RootCaSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_RootCaSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_RootCaSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_RootCaSsp_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_RootCaSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/RootCaSsp.h b/vanetza/asn1/security/r2/RootCaSsp.h new file mode 100644 index 000000000..8034b5337 --- /dev/null +++ b/vanetza/asn1/security/r2/RootCaSsp.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_RootCaSsp_H_ +#define _Vanetza_Security2_RootCaSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_RootCaSsp */ +typedef struct Vanetza_Security2_RootCaSsp { + Vanetza_Security2_Uint8_t version; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_RootCaSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_RootCaSsp; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_RootCaSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_RootCaSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_RootCaSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScmsPdu-EeEcaCertRequest.c b/vanetza/asn1/security/r2/ScmsPdu-EeEcaCertRequest.c new file mode 100644 index 000000000..1148d4f59 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-EeEcaCertRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScmsPdu-EeEcaCertRequest.h" + +int +Vanetza_Security2_ScmsPdu_EeEcaCertRequest_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 Vanetza_Security2_ScmsPdu_Scoped_204P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest = { + "ScmsPdu-EeEcaCertRequest", + "ScmsPdu-EeEcaCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_EeEcaCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_EeEcaCertRequest_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScmsPdu-EeEcaCertRequest.h b/vanetza/asn1/security/r2/ScmsPdu-EeEcaCertRequest.h new file mode 100644 index 000000000..b433d7eca --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-EeEcaCertRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScmsPdu_EeEcaCertRequest_H_ +#define _Vanetza_Security2_ScmsPdu_EeEcaCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ScmsPdu-Scoped.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ScmsPdu-EeEcaCertRequest */ +typedef Vanetza_Security2_ScmsPdu_Scoped_204P1_t Vanetza_Security2_ScmsPdu_EeEcaCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_EeEcaCertRequest; +asn_struct_free_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_EeEcaCertRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScmsPdu_EeEcaCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScmsPdu-EeRaCertRequest.c b/vanetza/asn1/security/r2/ScmsPdu-EeRaCertRequest.c new file mode 100644 index 000000000..c7b4a6aa7 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-EeRaCertRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScmsPdu-EeRaCertRequest.h" + +int +Vanetza_Security2_ScmsPdu_EeRaCertRequest_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 Vanetza_Security2_ScmsPdu_Scoped_204P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_EeRaCertRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_EeRaCertRequest_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest = { + "ScmsPdu-EeRaCertRequest", + "ScmsPdu-EeRaCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_EeRaCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_EeRaCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_EeRaCertRequest_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScmsPdu-EeRaCertRequest.h b/vanetza/asn1/security/r2/ScmsPdu-EeRaCertRequest.h new file mode 100644 index 000000000..b2ae56f22 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-EeRaCertRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScmsPdu_EeRaCertRequest_H_ +#define _Vanetza_Security2_ScmsPdu_EeRaCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ScmsPdu-Scoped.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ScmsPdu-EeRaCertRequest */ +typedef Vanetza_Security2_ScmsPdu_Scoped_204P2_t Vanetza_Security2_ScmsPdu_EeRaCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_EeRaCertRequest; +asn_struct_free_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaCertRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScmsPdu_EeRaCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.c b/vanetza/asn1/security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.c new file mode 100644 index 000000000..004d6f85d --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScmsPdu-EeRaSuccessorEnrollmentCertRequest.h" + +int +Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_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 Vanetza_Security2_ScmsPdu_Scoped_204P2, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest = { + "ScmsPdu-EeRaSuccessorEnrollmentCertRequest", + "ScmsPdu-EeRaSuccessorEnrollmentCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.h b/vanetza/asn1/security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.h new file mode 100644 index 000000000..2e0f5ebcc --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-EeRaSuccessorEnrollmentCertRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_H_ +#define _Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ScmsPdu-Scoped.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ScmsPdu-EeRaSuccessorEnrollmentCertRequest */ +typedef Vanetza_Security2_ScmsPdu_Scoped_204P2_t Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest; +asn_struct_free_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScmsPdu_EeRaSuccessorEnrollmentCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScmsPdu-RaAcaCertRequest.c b/vanetza/asn1/security/r2/ScmsPdu-RaAcaCertRequest.c new file mode 100644 index 000000000..f286b8357 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-RaAcaCertRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScmsPdu-RaAcaCertRequest.h" + +int +Vanetza_Security2_ScmsPdu_RaAcaCertRequest_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 Vanetza_Security2_ScmsPdu_Scoped_204P0, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest = { + "ScmsPdu-RaAcaCertRequest", + "ScmsPdu-RaAcaCertRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_RaAcaCertRequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_RaAcaCertRequest_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScmsPdu-RaAcaCertRequest.h b/vanetza/asn1/security/r2/ScmsPdu-RaAcaCertRequest.h new file mode 100644 index 000000000..1fa0f7f43 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-RaAcaCertRequest.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScmsPdu_RaAcaCertRequest_H_ +#define _Vanetza_Security2_ScmsPdu_RaAcaCertRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ScmsPdu-Scoped.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ScmsPdu-RaAcaCertRequest */ +typedef Vanetza_Security2_ScmsPdu_Scoped_204P0_t Vanetza_Security2_ScmsPdu_RaAcaCertRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_RaAcaCertRequest; +asn_struct_free_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_RaAcaCertRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScmsPdu_RaAcaCertRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScmsPdu-Scoped.c b/vanetza/asn1/security/r2/ScmsPdu-Scoped.c new file mode 100644 index 000000000..0e3cb8883 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-Scoped.c @@ -0,0 +1,204 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScmsPdu-Scoped.h" + +int +Vanetza_Security2_ScmsPdu_Scoped_204P0_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 Vanetza_Security2_ScmsPdu, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_ScmsPdu_Scoped_204P1_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 Vanetza_Security2_ScmsPdu, + * so here we adjust the DEF accordingly. + */ +int +Vanetza_Security2_ScmsPdu_Scoped_204P2_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 Vanetza_Security2_ScmsPdu, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_Scoped_204P0_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P0_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_Scoped_204P1_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P1_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScmsPdu_Scoped_204P2_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P2_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0 = { + "ScmsPdu-Scoped", + "ScmsPdu-Scoped", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_Scoped_204P0_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P0_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_Scoped_204P0_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1 = { + "ScmsPdu-Scoped", + "ScmsPdu-Scoped", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1_tags_2[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_Scoped_204P1_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P1_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_Scoped_204P1_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2 = { + "ScmsPdu-Scoped", + "ScmsPdu-Scoped", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2_tags_3[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScmsPdu_Scoped_204P2_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P2_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScmsPdu_Scoped_204P2_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScmsPdu-Scoped.h b/vanetza/asn1/security/r2/ScmsPdu-Scoped.h new file mode 100644 index 000000000..2d9d420f6 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu-Scoped.h @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScmsPdu_Scoped_H_ +#define _Vanetza_Security2_ScmsPdu_Scoped_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ScmsPdu.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ScmsPdu-Scoped */ +typedef Vanetza_Security2_ScmsPdu_t Vanetza_Security2_ScmsPdu_Scoped_204P0_t; +typedef Vanetza_Security2_ScmsPdu_t Vanetza_Security2_ScmsPdu_Scoped_204P1_t; +typedef Vanetza_Security2_ScmsPdu_t Vanetza_Security2_ScmsPdu_Scoped_204P2_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P0_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P0; +asn_struct_free_f Vanetza_Security2_ScmsPdu_Scoped_204P0_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_Scoped_204P0_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_Scoped_204P0_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P0_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P1_constr_2; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P1; +asn_struct_free_f Vanetza_Security2_ScmsPdu_Scoped_204P1_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_Scoped_204P1_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_Scoped_204P1_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P1_encode_aper; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScmsPdu_Scoped_204P2_constr_3; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu_Scoped_204P2; +asn_struct_free_f Vanetza_Security2_ScmsPdu_Scoped_204P2_free; +asn_struct_print_f Vanetza_Security2_ScmsPdu_Scoped_204P2_print; +asn_constr_check_f Vanetza_Security2_ScmsPdu_Scoped_204P2_constraint; +ber_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_decode_ber; +der_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_encode_der; +xer_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_encode_oer; +per_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_decode_uper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_encode_uper; +per_type_decoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_decode_aper; +per_type_encoder_f Vanetza_Security2_ScmsPdu_Scoped_204P2_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScmsPdu_Scoped_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScmsPdu.c b/vanetza/asn1/security/r2/ScmsPdu.c new file mode 100644 index 000000000..db2bbd239 --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu.c @@ -0,0 +1,413 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScmsPdu.h" + +static int +memb_Vanetza_Security2_version_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 2L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_content_constr_3 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 10 } /* (0..10,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { 1, 1 } /* (2..2) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_version_constr_2 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 2, 2 } /* (2..2) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_content_3[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.aca_ee), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaEeInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aca-ee" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.aca_la), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaLaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aca-la" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.aca_ma), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaMaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aca-ma" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.aca_ra), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaRaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aca-ra" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.cert), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertManagementPdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cert" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.eca_ee), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcaEeInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eca-ee" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.ee_ma), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeMaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ee-ma" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.ee_ra), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeRaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ee-ra" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.la_ma), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaMaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la-ma" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.la_ra), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaRaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la-ra" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu__content, choice.ma_ra), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_MaRaInterfacePdu, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ma-ra" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_content_tag2el_3[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* aca-ee */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* aca-la */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* aca-ma */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* aca-ra */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* cert */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* eca-ee */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* ee-ma */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* ee-ra */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* la-ma */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* la-ra */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 } /* ma-ra */ +}; +static asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_content_specs_3 = { + sizeof(struct Vanetza_Security2_ScmsPdu__content), + offsetof(struct Vanetza_Security2_ScmsPdu__content, _asn_ctx), + offsetof(struct Vanetza_Security2_ScmsPdu__content, present), + sizeof(((struct Vanetza_Security2_ScmsPdu__content *)0)->present), + asn_MAP_Vanetza_Security2_content_tag2el_3, + 11, /* Count of tags in the map */ + 0, 0, + 11 /* Extensions start */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_content_3 = { + "content", + "content", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_content_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_content_3, + 11, /* Elements count */ + &asn_SPC_Vanetza_Security2_content_specs_3 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ScmsPdu_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_version_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_version_constraint_1 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ScmsPdu, content), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_content_3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "content" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScmsPdu_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ScmsPdu_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* content */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 = { + sizeof(struct Vanetza_Security2_ScmsPdu), + offsetof(struct Vanetza_Security2_ScmsPdu, _asn_ctx), + asn_MAP_Vanetza_Security2_ScmsPdu_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_Vanetza_Security2_ScmsPdu = { + "ScmsPdu", + "ScmsPdu", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScmsPdu_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScmsPdu_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScmsPdu_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScmsPdu.h b/vanetza/asn1/security/r2/ScmsPdu.h new file mode 100644 index 000000000..c13a1208c --- /dev/null +++ b/vanetza/asn1/security/r2/ScmsPdu.h @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScmsPdu_H_ +#define _Vanetza_Security2_ScmsPdu_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "AcaEeInterfacePdu.h" +#include "AcaLaInterfacePdu.h" +#include "AcaMaInterfacePdu.h" +#include "AcaRaInterfacePdu.h" +#include "CertManagementPdu.h" +#include "EcaEeInterfacePdu.h" +#include "EeMaInterfacePdu.h" +#include "EeRaInterfacePdu.h" +#include "LaMaInterfacePdu.h" +#include "LaRaInterfacePdu.h" +#include "MaRaInterfacePdu.h" +#include "constr_CHOICE.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_ScmsPdu__content_PR { + Vanetza_Security2_ScmsPdu__content_PR_NOTHING, /* No components present */ + Vanetza_Security2_ScmsPdu__content_PR_aca_ee, + Vanetza_Security2_ScmsPdu__content_PR_aca_la, + Vanetza_Security2_ScmsPdu__content_PR_aca_ma, + Vanetza_Security2_ScmsPdu__content_PR_aca_ra, + Vanetza_Security2_ScmsPdu__content_PR_cert, + Vanetza_Security2_ScmsPdu__content_PR_eca_ee, + Vanetza_Security2_ScmsPdu__content_PR_ee_ma, + Vanetza_Security2_ScmsPdu__content_PR_ee_ra, + Vanetza_Security2_ScmsPdu__content_PR_la_ma, + Vanetza_Security2_ScmsPdu__content_PR_la_ra, + Vanetza_Security2_ScmsPdu__content_PR_ma_ra + /* Extensions may appear below */ + +} Vanetza_Security2_ScmsPdu__content_PR; + +/* Vanetza_Security2_ScmsPdu */ +typedef struct Vanetza_Security2_ScmsPdu { + Vanetza_Security2_Uint8_t version; + struct Vanetza_Security2_ScmsPdu__content { + Vanetza_Security2_ScmsPdu__content_PR present; + union Vanetza_Security2_ScmsPdu__Vanetza_Security2_content_u { + Vanetza_Security2_AcaEeInterfacePdu_t aca_ee; + Vanetza_Security2_AcaLaInterfacePdu_t aca_la; + Vanetza_Security2_AcaMaInterfacePdu_t aca_ma; + Vanetza_Security2_AcaRaInterfacePdu_t aca_ra; + Vanetza_Security2_CertManagementPdu_t cert; + Vanetza_Security2_EcaEeInterfacePdu_t eca_ee; + Vanetza_Security2_EeMaInterfacePdu_t ee_ma; + Vanetza_Security2_EeRaInterfacePdu_t ee_ra; + Vanetza_Security2_LaMaInterfacePdu_t la_ma; + Vanetza_Security2_LaRaInterfacePdu_t la_ra; + Vanetza_Security2_MaRaInterfacePdu_t ma_ra; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } content; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ScmsPdu_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScmsPdu; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ScmsPdu_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ScmsPdu_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScmsPdu_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ScopedCertificateRequest.c b/vanetza/asn1/security/r2/ScopedCertificateRequest.c new file mode 100644 index 000000000..933de0cff --- /dev/null +++ b/vanetza/asn1/security/r2/ScopedCertificateRequest.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ScopedCertificateRequest.h" + +int +Vanetza_Security2_ScopedCertificateRequest_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 Vanetza_Security2_ScmsPdu, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ScopedCertificateRequest_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScopedCertificateRequest_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScopedCertificateRequest = { + "ScopedCertificateRequest", + "ScopedCertificateRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ScopedCertificateRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ScopedCertificateRequest_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ScopedCertificateRequest_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ScopedCertificateRequest_constraint + }, + asn_MBR_Vanetza_Security2_ScmsPdu_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ScmsPdu_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ScopedCertificateRequest.h b/vanetza/asn1/security/r2/ScopedCertificateRequest.h new file mode 100644 index 000000000..f10f173d1 --- /dev/null +++ b/vanetza/asn1/security/r2/ScopedCertificateRequest.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ScopedCertificateRequest_H_ +#define _Vanetza_Security2_ScopedCertificateRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ScmsPdu.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ScopedCertificateRequest */ +typedef Vanetza_Security2_ScmsPdu_t Vanetza_Security2_ScopedCertificateRequest_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ScopedCertificateRequest_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ScopedCertificateRequest; +asn_struct_free_f Vanetza_Security2_ScopedCertificateRequest_free; +asn_struct_print_f Vanetza_Security2_ScopedCertificateRequest_print; +asn_constr_check_f Vanetza_Security2_ScopedCertificateRequest_constraint; +ber_type_decoder_f Vanetza_Security2_ScopedCertificateRequest_decode_ber; +der_type_encoder_f Vanetza_Security2_ScopedCertificateRequest_encode_der; +xer_type_decoder_f Vanetza_Security2_ScopedCertificateRequest_decode_xer; +xer_type_encoder_f Vanetza_Security2_ScopedCertificateRequest_encode_xer; +jer_type_encoder_f Vanetza_Security2_ScopedCertificateRequest_encode_jer; +oer_type_decoder_f Vanetza_Security2_ScopedCertificateRequest_decode_oer; +oer_type_encoder_f Vanetza_Security2_ScopedCertificateRequest_encode_oer; +per_type_decoder_f Vanetza_Security2_ScopedCertificateRequest_decode_uper; +per_type_encoder_f Vanetza_Security2_ScopedCertificateRequest_encode_uper; +per_type_decoder_f Vanetza_Security2_ScopedCertificateRequest_decode_aper; +per_type_encoder_f Vanetza_Security2_ScopedCertificateRequest_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ScopedCertificateRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SecuredCrl.c b/vanetza/asn1/security/r2/SecuredCrl.c new file mode 100644 index 000000000..a438b2bc7 --- /dev/null +++ b/vanetza/asn1/security/r2/SecuredCrl.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Crl" + * found in "build.asn1/ieee/IEEE1609dot2crl.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SecuredCrl.h" + +int +Vanetza_Security2_SecuredCrl_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 Vanetza_Security2_Ieee1609Dot2Data, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SecuredCrl_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SecuredCrl_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SecuredCrl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SecuredCrl = { + "SecuredCrl", + "SecuredCrl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SecuredCrl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SecuredCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SecuredCrl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SecuredCrl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SecuredCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SecuredCrl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SecuredCrl_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SecuredCrl_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SecuredCrl_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SecuredCrl.h b/vanetza/asn1/security/r2/SecuredCrl.h new file mode 100644 index 000000000..25d054499 --- /dev/null +++ b/vanetza/asn1/security/r2/SecuredCrl.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Crl" + * found in "build.asn1/ieee/IEEE1609dot2crl.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SecuredCrl_H_ +#define _Vanetza_Security2_SecuredCrl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SecuredCrl */ +typedef Vanetza_Security2_Ieee1609Dot2Data_t Vanetza_Security2_SecuredCrl_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SecuredCrl_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SecuredCrl; +asn_struct_free_f Vanetza_Security2_SecuredCrl_free; +asn_struct_print_f Vanetza_Security2_SecuredCrl_print; +asn_constr_check_f Vanetza_Security2_SecuredCrl_constraint; +ber_type_decoder_f Vanetza_Security2_SecuredCrl_decode_ber; +der_type_encoder_f Vanetza_Security2_SecuredCrl_encode_der; +xer_type_decoder_f Vanetza_Security2_SecuredCrl_decode_xer; +xer_type_encoder_f Vanetza_Security2_SecuredCrl_encode_xer; +jer_type_encoder_f Vanetza_Security2_SecuredCrl_encode_jer; +oer_type_decoder_f Vanetza_Security2_SecuredCrl_decode_oer; +oer_type_encoder_f Vanetza_Security2_SecuredCrl_encode_oer; +per_type_decoder_f Vanetza_Security2_SecuredCrl_decode_uper; +per_type_encoder_f Vanetza_Security2_SecuredCrl_encode_uper; +per_type_decoder_f Vanetza_Security2_SecuredCrl_decode_aper; +per_type_encoder_f Vanetza_Security2_SecuredCrl_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SecuredCrl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SecurityMgmtPsid.c b/vanetza/asn1/security/r2/SecurityMgmtPsid.c new file mode 100644 index 000000000..ad3aa08ce --- /dev/null +++ b/vanetza/asn1/security/r2/SecurityMgmtPsid.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SecurityMgmtPsid.h" + +int +Vanetza_Security2_SecurityMgmtPsid_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const unsigned long *)sptr; + + if((value == 35L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Psid, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SecurityMgmtPsid_constr_1 CC_NOTUSED = { + { 1, 1 } /* (35..35) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_SecurityMgmtPsid_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 0, 0, 35, 35 } /* (35..35) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SecurityMgmtPsid = { + "SecurityMgmtPsid", + "SecurityMgmtPsid", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SecurityMgmtPsid_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SecurityMgmtPsid_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SecurityMgmtPsid_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SecurityMgmtPsid_constraint + }, + 0, 0, /* No members */ + &asn_SPC_Vanetza_Security2_Psid_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SecurityMgmtPsid.h b/vanetza/asn1/security/r2/SecurityMgmtPsid.h new file mode 100644 index 000000000..e68131efc --- /dev/null +++ b/vanetza/asn1/security/r2/SecurityMgmtPsid.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SecurityMgmtPsid_H_ +#define _Vanetza_Security2_SecurityMgmtPsid_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SecurityMgmtPsid */ +typedef Vanetza_Security2_Psid_t Vanetza_Security2_SecurityMgmtPsid_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SecurityMgmtPsid; +asn_struct_free_f Vanetza_Security2_SecurityMgmtPsid_free; +asn_struct_print_f Vanetza_Security2_SecurityMgmtPsid_print; +asn_constr_check_f Vanetza_Security2_SecurityMgmtPsid_constraint; +ber_type_decoder_f Vanetza_Security2_SecurityMgmtPsid_decode_ber; +der_type_encoder_f Vanetza_Security2_SecurityMgmtPsid_encode_der; +xer_type_decoder_f Vanetza_Security2_SecurityMgmtPsid_decode_xer; +xer_type_encoder_f Vanetza_Security2_SecurityMgmtPsid_encode_xer; +jer_type_encoder_f Vanetza_Security2_SecurityMgmtPsid_encode_jer; +oer_type_decoder_f Vanetza_Security2_SecurityMgmtPsid_decode_oer; +oer_type_encoder_f Vanetza_Security2_SecurityMgmtPsid_encode_oer; +per_type_decoder_f Vanetza_Security2_SecurityMgmtPsid_decode_uper; +per_type_encoder_f Vanetza_Security2_SecurityMgmtPsid_encode_uper; +per_type_decoder_f Vanetza_Security2_SecurityMgmtPsid_decode_aper; +per_type_encoder_f Vanetza_Security2_SecurityMgmtPsid_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SecurityMgmtPsid_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SecurityMgmtSsp.c b/vanetza/asn1/security/r2/SecurityMgmtSsp.c new file mode 100644 index 000000000..6bd51eb69 --- /dev/null +++ b/vanetza/asn1/security/r2/SecurityMgmtSsp.c @@ -0,0 +1,354 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SecurityMgmtSsp.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SecurityMgmtSsp_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SecurityMgmtSsp_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 12 } /* (0..12,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SecurityMgmtSsp_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.elector), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ElectorSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "elector" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.root), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RootCaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "root" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.pg), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PgSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "pg" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.ica), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IcaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ica" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.eca), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.aca), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_AcaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aca" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.crl), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CrlSignerSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.dcm), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_DcmSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "dcm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.la), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "la" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.lop), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LopSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "lop" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.ma), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_MaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ma" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.ra), + (ASN_TAG_CLASS_CONTEXT | (11 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_RaSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ra" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.ee), + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EeSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ee" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SecurityMgmtSsp, choice.dc), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_DcSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "dc" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SecurityMgmtSsp_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* elector */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* root */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pg */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ica */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* eca */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* aca */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* crl */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* dcm */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* la */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* lop */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* ma */ + { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* ra */ + { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* ee */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 } /* dc */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SecurityMgmtSsp_specs_1 = { + sizeof(struct Vanetza_Security2_SecurityMgmtSsp), + offsetof(struct Vanetza_Security2_SecurityMgmtSsp, _asn_ctx), + offsetof(struct Vanetza_Security2_SecurityMgmtSsp, present), + sizeof(((struct Vanetza_Security2_SecurityMgmtSsp *)0)->present), + asn_MAP_Vanetza_Security2_SecurityMgmtSsp_tag2el_1, + 14, /* Count of tags in the map */ + 0, 0, + 13 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SecurityMgmtSsp = { + "SecurityMgmtSsp", + "SecurityMgmtSsp", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SecurityMgmtSsp_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SecurityMgmtSsp_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SecurityMgmtSsp_1, + 14, /* Elements count */ + &asn_SPC_Vanetza_Security2_SecurityMgmtSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SecurityMgmtSsp.h b/vanetza/asn1/security/r2/SecurityMgmtSsp.h new file mode 100644 index 000000000..505ed5c02 --- /dev/null +++ b/vanetza/asn1/security/r2/SecurityMgmtSsp.h @@ -0,0 +1,94 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SecurityMgmtSsp_H_ +#define _Vanetza_Security2_SecurityMgmtSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ElectorSsp.h" +#include "RootCaSsp.h" +#include "PgSsp.h" +#include "IcaSsp.h" +#include "EcaSsp.h" +#include "AcaSsp.h" +#include "CrlSignerSsp.h" +#include "DcmSsp.h" +#include "LaSsp.h" +#include "LopSsp.h" +#include "MaSsp.h" +#include "RaSsp.h" +#include "EeSsp.h" +#include "DcSsp.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SecurityMgmtSsp_PR { + Vanetza_Security2_SecurityMgmtSsp_PR_NOTHING, /* No components present */ + Vanetza_Security2_SecurityMgmtSsp_PR_elector, + Vanetza_Security2_SecurityMgmtSsp_PR_root, + Vanetza_Security2_SecurityMgmtSsp_PR_pg, + Vanetza_Security2_SecurityMgmtSsp_PR_ica, + Vanetza_Security2_SecurityMgmtSsp_PR_eca, + Vanetza_Security2_SecurityMgmtSsp_PR_aca, + Vanetza_Security2_SecurityMgmtSsp_PR_crl, + Vanetza_Security2_SecurityMgmtSsp_PR_dcm, + Vanetza_Security2_SecurityMgmtSsp_PR_la, + Vanetza_Security2_SecurityMgmtSsp_PR_lop, + Vanetza_Security2_SecurityMgmtSsp_PR_ma, + Vanetza_Security2_SecurityMgmtSsp_PR_ra, + Vanetza_Security2_SecurityMgmtSsp_PR_ee, + /* Extensions may appear below */ + Vanetza_Security2_SecurityMgmtSsp_PR_dc +} Vanetza_Security2_SecurityMgmtSsp_PR; + +/* Vanetza_Security2_SecurityMgmtSsp */ +typedef struct Vanetza_Security2_SecurityMgmtSsp { + Vanetza_Security2_SecurityMgmtSsp_PR present; + union Vanetza_Security2_SecurityMgmtSsp_u { + Vanetza_Security2_ElectorSsp_t elector; + Vanetza_Security2_RootCaSsp_t root; + Vanetza_Security2_PgSsp_t pg; + Vanetza_Security2_IcaSsp_t ica; + Vanetza_Security2_EcaSsp_t eca; + Vanetza_Security2_AcaSsp_t aca; + Vanetza_Security2_CrlSignerSsp_t crl; + Vanetza_Security2_DcmSsp_t dcm; + Vanetza_Security2_LaSsp_t la; + Vanetza_Security2_LopSsp_t lop; + Vanetza_Security2_MaSsp_t ma; + Vanetza_Security2_RaSsp_t ra; + Vanetza_Security2_EeSsp_t ee; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_DcSsp_t dc; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SecurityMgmtSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SecurityMgmtSsp; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SecurityMgmtSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SecurityMgmtSsp_1[14]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SecurityMgmtSsp_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SecurityMgmtSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SeedEvolutionFunctionIdentifier.c b/vanetza/asn1/security/r2/SeedEvolutionFunctionIdentifier.c new file mode 100644 index 000000000..86a440203 --- /dev/null +++ b/vanetza/asn1/security/r2/SeedEvolutionFunctionIdentifier.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SeedEvolutionFunctionIdentifier.h" + +/* + * This type is implemented using NULL, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier = { + "SeedEvolutionFunctionIdentifier", + "SeedEvolutionFunctionIdentifier", + &asn_OP_NULL, + asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NULL_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/SeedEvolutionFunctionIdentifier.h b/vanetza/asn1/security/r2/SeedEvolutionFunctionIdentifier.h new file mode 100644 index 000000000..77ff9fec9 --- /dev/null +++ b/vanetza/asn1/security/r2/SeedEvolutionFunctionIdentifier.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SeedEvolutionFunctionIdentifier_H_ +#define _Vanetza_Security2_SeedEvolutionFunctionIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SeedEvolutionFunctionIdentifier */ +typedef NULL_t Vanetza_Security2_SeedEvolutionFunctionIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier; +asn_struct_free_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_free; +asn_struct_print_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_print; +asn_constr_check_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_constraint; +ber_type_decoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_decode_ber; +der_type_encoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_encode_der; +xer_type_decoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_decode_xer; +xer_type_encoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_encode_xer; +jer_type_encoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_encode_jer; +oer_type_decoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_decode_oer; +oer_type_encoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_encode_oer; +per_type_decoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_decode_uper; +per_type_encoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_encode_uper; +per_type_decoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_decode_aper; +per_type_encoder_f Vanetza_Security2_SeedEvolutionFunctionIdentifier_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SeedEvolutionFunctionIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfAppExtensions.c b/vanetza/asn1/security/r2/SequenceOfAppExtensions.c new file mode 100644 index 000000000..d1bb92205 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfAppExtensions.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfAppExtensions.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SequenceOfAppExtensions_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfAppExtensions_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfAppExtensions_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_AppExtension, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfAppExtensions_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfAppExtensions), + offsetof(struct Vanetza_Security2_SequenceOfAppExtensions, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfAppExtensions = { + "SequenceOfAppExtensions", + "SequenceOfAppExtensions", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfAppExtensions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SequenceOfAppExtensions_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SequenceOfAppExtensions_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfAppExtensions_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfAppExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfAppExtensions.h b/vanetza/asn1/security/r2/SequenceOfAppExtensions.h new file mode 100644 index 000000000..42eff802d --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfAppExtensions.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfAppExtensions_H_ +#define _Vanetza_Security2_SequenceOfAppExtensions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_AppExtension; + +/* Vanetza_Security2_SequenceOfAppExtensions */ +typedef struct Vanetza_Security2_SequenceOfAppExtensions { + A_SEQUENCE_OF(struct Vanetza_Security2_AppExtension) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfAppExtensions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfAppExtensions; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfAppExtensions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfAppExtensions_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfAppExtensions_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "AppExtension.h" + +#endif /* _Vanetza_Security2_SequenceOfAppExtensions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfCertIssueExtensions.c b/vanetza/asn1/security/r2/SequenceOfCertIssueExtensions.c new file mode 100644 index 000000000..fe454720c --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCertIssueExtensions.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfCertIssueExtensions.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SequenceOfCertIssueExtensions_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfCertIssueExtensions_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCertIssueExtensions_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CertIssueExtension, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCertIssueExtensions_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfCertIssueExtensions), + offsetof(struct Vanetza_Security2_SequenceOfCertIssueExtensions, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions = { + "SequenceOfCertIssueExtensions", + "SequenceOfCertIssueExtensions", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SequenceOfCertIssueExtensions_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SequenceOfCertIssueExtensions_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfCertIssueExtensions_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfCertIssueExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfCertIssueExtensions.h b/vanetza/asn1/security/r2/SequenceOfCertIssueExtensions.h new file mode 100644 index 000000000..dd76fed56 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCertIssueExtensions.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfCertIssueExtensions_H_ +#define _Vanetza_Security2_SequenceOfCertIssueExtensions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CertIssueExtension; + +/* Vanetza_Security2_SequenceOfCertIssueExtensions */ +typedef struct Vanetza_Security2_SequenceOfCertIssueExtensions { + A_SEQUENCE_OF(struct Vanetza_Security2_CertIssueExtension) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfCertIssueExtensions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCertIssueExtensions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCertIssueExtensions_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfCertIssueExtensions_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CertIssueExtension.h" + +#endif /* _Vanetza_Security2_SequenceOfCertIssueExtensions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfCertRequestExtensions.c b/vanetza/asn1/security/r2/SequenceOfCertRequestExtensions.c new file mode 100644 index 000000000..c1e512ae9 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCertRequestExtensions.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfCertRequestExtensions.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SequenceOfCertRequestExtensions_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfCertRequestExtensions_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCertRequestExtensions_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CertRequestExtension, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCertRequestExtensions_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfCertRequestExtensions), + offsetof(struct Vanetza_Security2_SequenceOfCertRequestExtensions, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions = { + "SequenceOfCertRequestExtensions", + "SequenceOfCertRequestExtensions", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SequenceOfCertRequestExtensions_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SequenceOfCertRequestExtensions_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfCertRequestExtensions_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfCertRequestExtensions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfCertRequestExtensions.h b/vanetza/asn1/security/r2/SequenceOfCertRequestExtensions.h new file mode 100644 index 000000000..11bd839e3 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCertRequestExtensions.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfCertRequestExtensions_H_ +#define _Vanetza_Security2_SequenceOfCertRequestExtensions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CertRequestExtension; + +/* Vanetza_Security2_SequenceOfCertRequestExtensions */ +typedef struct Vanetza_Security2_SequenceOfCertRequestExtensions { + A_SEQUENCE_OF(struct Vanetza_Security2_CertRequestExtension) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfCertRequestExtensions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCertRequestExtensions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCertRequestExtensions_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfCertRequestExtensions_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CertRequestExtension.h" + +#endif /* _Vanetza_Security2_SequenceOfCertRequestExtensions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfCertificate.c b/vanetza/asn1/security/r2/SequenceOfCertificate.c new file mode 100644 index 000000000..4c094a8e0 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCertificate.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfCertificate.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCertificate_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCertificate_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfCertificate), + offsetof(struct Vanetza_Security2_SequenceOfCertificate, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCertificate = { + "SequenceOfCertificate", + "SequenceOfCertificate", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCertificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfCertificate_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfCertificate_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfCertificate.h b/vanetza/asn1/security/r2/SequenceOfCertificate.h new file mode 100644 index 000000000..f93f51856 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCertificate.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfCertificate_H_ +#define _Vanetza_Security2_SequenceOfCertificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_Certificate; + +/* Vanetza_Security2_SequenceOfCertificate */ +typedef struct Vanetza_Security2_SequenceOfCertificate { + A_SEQUENCE_OF(struct Vanetza_Security2_Certificate) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfCertificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCertificate; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCertificate_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCertificate_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "Certificate.h" + +#endif /* _Vanetza_Security2_SequenceOfCertificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfCrlInfoStatus.c b/vanetza/asn1/security/r2/SequenceOfCrlInfoStatus.c new file mode 100644 index 000000000..3d5154f63 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCrlInfoStatus.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfCrlInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCrlInfoStatus_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CrlInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCrlInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfCrlInfoStatus), + offsetof(struct Vanetza_Security2_SequenceOfCrlInfoStatus, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus = { + "SequenceOfCrlInfoStatus", + "SequenceOfCrlInfoStatus", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfCrlInfoStatus_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfCrlInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfCrlInfoStatus.h b/vanetza/asn1/security/r2/SequenceOfCrlInfoStatus.h new file mode 100644 index 000000000..7157a1a0e --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCrlInfoStatus.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfCrlInfoStatus_H_ +#define _Vanetza_Security2_SequenceOfCrlInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CrlInfoStatus; + +/* Vanetza_Security2_SequenceOfCrlInfoStatus */ +typedef struct Vanetza_Security2_SequenceOfCrlInfoStatus { + A_SEQUENCE_OF(struct Vanetza_Security2_CrlInfoStatus) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfCrlInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCrlInfoStatus; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCrlInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCrlInfoStatus_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CrlInfoStatus.h" + +#endif /* _Vanetza_Security2_SequenceOfCrlInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfCtlInfoStatus.c b/vanetza/asn1/security/r2/SequenceOfCtlInfoStatus.c new file mode 100644 index 000000000..7104b2cbf --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCtlInfoStatus.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfCtlInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCtlInfoStatus_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CtlInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCtlInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfCtlInfoStatus), + offsetof(struct Vanetza_Security2_SequenceOfCtlInfoStatus, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus = { + "SequenceOfCtlInfoStatus", + "SequenceOfCtlInfoStatus", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfCtlInfoStatus_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfCtlInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfCtlInfoStatus.h b/vanetza/asn1/security/r2/SequenceOfCtlInfoStatus.h new file mode 100644 index 000000000..dc6b591dd --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfCtlInfoStatus.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfCtlInfoStatus_H_ +#define _Vanetza_Security2_SequenceOfCtlInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_CtlInfoStatus; + +/* Vanetza_Security2_SequenceOfCtlInfoStatus */ +typedef struct Vanetza_Security2_SequenceOfCtlInfoStatus { + A_SEQUENCE_OF(struct Vanetza_Security2_CtlInfoStatus) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfCtlInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfCtlInfoStatus; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfCtlInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfCtlInfoStatus_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "CtlInfoStatus.h" + +#endif /* _Vanetza_Security2_SequenceOfCtlInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfGroupCrlEntry.c b/vanetza/asn1/security/r2/SequenceOfGroupCrlEntry.c new file mode 100644 index 000000000..b2d691432 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfGroupCrlEntry.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfGroupCrlEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfGroupCrlEntry_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_GroupCrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfGroupCrlEntry_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfGroupCrlEntry), + offsetof(struct Vanetza_Security2_SequenceOfGroupCrlEntry, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry = { + "SequenceOfGroupCrlEntry", + "SequenceOfGroupCrlEntry", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfGroupCrlEntry_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfGroupCrlEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfGroupCrlEntry.h b/vanetza/asn1/security/r2/SequenceOfGroupCrlEntry.h new file mode 100644 index 000000000..2ad1b043f --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfGroupCrlEntry.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfGroupCrlEntry_H_ +#define _Vanetza_Security2_SequenceOfGroupCrlEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_GroupCrlEntry; + +/* Vanetza_Security2_SequenceOfGroupCrlEntry */ +typedef struct Vanetza_Security2_SequenceOfGroupCrlEntry { + A_SEQUENCE_OF(struct Vanetza_Security2_GroupCrlEntry) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfGroupCrlEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfGroupCrlEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfGroupCrlEntry_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "GroupCrlEntry.h" + +#endif /* _Vanetza_Security2_SequenceOfGroupCrlEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfGroupSingleSeedCrlEntry.c b/vanetza/asn1/security/r2/SequenceOfGroupSingleSeedCrlEntry.c new file mode 100644 index 000000000..a39dccab6 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfGroupSingleSeedCrlEntry.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfGroupSingleSeedCrlEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_GroupSingleSeedCrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry), + offsetof(struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry = { + "SequenceOfGroupSingleSeedCrlEntry", + "SequenceOfGroupSingleSeedCrlEntry", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfGroupSingleSeedCrlEntry.h b/vanetza/asn1/security/r2/SequenceOfGroupSingleSeedCrlEntry.h new file mode 100644 index 000000000..826137bc4 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfGroupSingleSeedCrlEntry.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_H_ +#define _Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_GroupSingleSeedCrlEntry; + +/* Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry */ +typedef struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry { + A_SEQUENCE_OF(struct Vanetza_Security2_GroupSingleSeedCrlEntry) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "GroupSingleSeedCrlEntry.h" + +#endif /* _Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfHashBasedRevocationInfo.c b/vanetza/asn1/security/r2/SequenceOfHashBasedRevocationInfo.c new file mode 100644 index 000000000..e0b1e9d50 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfHashBasedRevocationInfo.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfHashBasedRevocationInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_HashBasedRevocationInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfHashBasedRevocationInfo), + offsetof(struct Vanetza_Security2_SequenceOfHashBasedRevocationInfo, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo = { + "SequenceOfHashBasedRevocationInfo", + "SequenceOfHashBasedRevocationInfo", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfHashBasedRevocationInfo.h b/vanetza/asn1/security/r2/SequenceOfHashBasedRevocationInfo.h new file mode 100644 index 000000000..e44b3ba97 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfHashBasedRevocationInfo.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfHashBasedRevocationInfo_H_ +#define _Vanetza_Security2_SequenceOfHashBasedRevocationInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_HashBasedRevocationInfo; + +/* Vanetza_Security2_SequenceOfHashBasedRevocationInfo */ +typedef struct Vanetza_Security2_SequenceOfHashBasedRevocationInfo { + A_SEQUENCE_OF(struct Vanetza_Security2_HashBasedRevocationInfo) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfHashBasedRevocationInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfHashBasedRevocationInfo_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "HashBasedRevocationInfo.h" + +#endif /* _Vanetza_Security2_SequenceOfHashBasedRevocationInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfHashedId3.c b/vanetza/asn1/security/r2/SequenceOfHashedId3.c new file mode 100644 index 000000000..ebb6f0e69 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfHashedId3.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfHashedId3.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfHashedId3_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_HashedId3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfHashedId3_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfHashedId3), + offsetof(struct Vanetza_Security2_SequenceOfHashedId3, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfHashedId3 = { + "SequenceOfHashedId3", + "SequenceOfHashedId3", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfHashedId3_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfHashedId3_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfHashedId3_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfHashedId3.h b/vanetza/asn1/security/r2/SequenceOfHashedId3.h new file mode 100644 index 000000000..201729aa7 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfHashedId3.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfHashedId3_H_ +#define _Vanetza_Security2_SequenceOfHashedId3_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId3.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfHashedId3 */ +typedef struct Vanetza_Security2_SequenceOfHashedId3 { + A_SEQUENCE_OF(Vanetza_Security2_HashedId3_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfHashedId3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfHashedId3; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfHashedId3_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfHashedId3_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfHashedId3_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfIMaxGroup.c b/vanetza/asn1/security/r2/SequenceOfIMaxGroup.c new file mode 100644 index 000000000..86516ba61 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfIMaxGroup.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfIMaxGroup.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfIMaxGroup_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_IMaxGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfIMaxGroup_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfIMaxGroup), + offsetof(struct Vanetza_Security2_SequenceOfIMaxGroup, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup = { + "SequenceOfIMaxGroup", + "SequenceOfIMaxGroup", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfIMaxGroup_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfIMaxGroup_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfIMaxGroup.h b/vanetza/asn1/security/r2/SequenceOfIMaxGroup.h new file mode 100644 index 000000000..11ab9c749 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfIMaxGroup.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfIMaxGroup_H_ +#define _Vanetza_Security2_SequenceOfIMaxGroup_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_IMaxGroup; + +/* Vanetza_Security2_SequenceOfIMaxGroup */ +typedef struct Vanetza_Security2_SequenceOfIMaxGroup { + A_SEQUENCE_OF(struct Vanetza_Security2_IMaxGroup) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfIMaxGroup_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfIMaxGroup; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfIMaxGroup_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfIMaxGroup_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "IMaxGroup.h" + +#endif /* _Vanetza_Security2_SequenceOfIMaxGroup_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfIdentifiedRegion.c b/vanetza/asn1/security/r2/SequenceOfIdentifiedRegion.c new file mode 100644 index 000000000..10f65506d --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfIdentifiedRegion.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfIdentifiedRegion.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfIdentifiedRegion_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Vanetza_Security2_IdentifiedRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfIdentifiedRegion_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfIdentifiedRegion), + offsetof(struct Vanetza_Security2_SequenceOfIdentifiedRegion, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion = { + "SequenceOfIdentifiedRegion", + "SequenceOfIdentifiedRegion", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfIdentifiedRegion_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfIdentifiedRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfIdentifiedRegion.h b/vanetza/asn1/security/r2/SequenceOfIdentifiedRegion.h new file mode 100644 index 000000000..ab7555da1 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfIdentifiedRegion.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfIdentifiedRegion_H_ +#define _Vanetza_Security2_SequenceOfIdentifiedRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_IdentifiedRegion; + +/* Vanetza_Security2_SequenceOfIdentifiedRegion */ +typedef struct Vanetza_Security2_SequenceOfIdentifiedRegion { + A_SEQUENCE_OF(struct Vanetza_Security2_IdentifiedRegion) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfIdentifiedRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfIdentifiedRegion; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfIdentifiedRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfIdentifiedRegion_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "IdentifiedRegion.h" + +#endif /* _Vanetza_Security2_SequenceOfIdentifiedRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfIndividualRevocation.c b/vanetza/asn1/security/r2/SequenceOfIndividualRevocation.c new file mode 100644 index 000000000..04f9b5d4b --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfIndividualRevocation.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfIndividualRevocation.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SequenceOfIndividualRevocation_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfIndividualRevocation_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfIndividualRevocation_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_IndividualRevocation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfIndividualRevocation_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfIndividualRevocation), + offsetof(struct Vanetza_Security2_SequenceOfIndividualRevocation, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation = { + "SequenceOfIndividualRevocation", + "SequenceOfIndividualRevocation", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SequenceOfIndividualRevocation_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SequenceOfIndividualRevocation_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfIndividualRevocation_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfIndividualRevocation_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfIndividualRevocation.h b/vanetza/asn1/security/r2/SequenceOfIndividualRevocation.h new file mode 100644 index 000000000..822283d95 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfIndividualRevocation.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfIndividualRevocation_H_ +#define _Vanetza_Security2_SequenceOfIndividualRevocation_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_IndividualRevocation; + +/* Vanetza_Security2_SequenceOfIndividualRevocation */ +typedef struct Vanetza_Security2_SequenceOfIndividualRevocation { + A_SEQUENCE_OF(struct Vanetza_Security2_IndividualRevocation) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfIndividualRevocation_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfIndividualRevocation; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfIndividualRevocation_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfIndividualRevocation_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfIndividualRevocation_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "IndividualRevocation.h" + +#endif /* _Vanetza_Security2_SequenceOfIndividualRevocation_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfJMaxGroup.c b/vanetza/asn1/security/r2/SequenceOfJMaxGroup.c new file mode 100644 index 000000000..de4b87d0c --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfJMaxGroup.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfJMaxGroup.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfJMaxGroup_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_JMaxGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfJMaxGroup_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfJMaxGroup), + offsetof(struct Vanetza_Security2_SequenceOfJMaxGroup, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup = { + "SequenceOfJMaxGroup", + "SequenceOfJMaxGroup", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfJMaxGroup_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfJMaxGroup_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfJMaxGroup.h b/vanetza/asn1/security/r2/SequenceOfJMaxGroup.h new file mode 100644 index 000000000..b159e83c0 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfJMaxGroup.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfJMaxGroup_H_ +#define _Vanetza_Security2_SequenceOfJMaxGroup_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_JMaxGroup; + +/* Vanetza_Security2_SequenceOfJMaxGroup */ +typedef struct Vanetza_Security2_SequenceOfJMaxGroup { + A_SEQUENCE_OF(struct Vanetza_Security2_JMaxGroup) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfJMaxGroup_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfJMaxGroup_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfJMaxGroup_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "JMaxGroup.h" + +#endif /* _Vanetza_Security2_SequenceOfJMaxGroup_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfLAGroup.c b/vanetza/asn1/security/r2/SequenceOfLAGroup.c new file mode 100644 index 000000000..35fb3902c --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfLAGroup.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfLAGroup.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfLAGroup_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_LAGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfLAGroup_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfLAGroup), + offsetof(struct Vanetza_Security2_SequenceOfLAGroup, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfLAGroup = { + "SequenceOfLAGroup", + "SequenceOfLAGroup", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfLAGroup_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfLAGroup_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfLAGroup_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfLAGroup.h b/vanetza/asn1/security/r2/SequenceOfLAGroup.h new file mode 100644 index 000000000..979481a25 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfLAGroup.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfLAGroup_H_ +#define _Vanetza_Security2_SequenceOfLAGroup_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_LAGroup; + +/* Vanetza_Security2_SequenceOfLAGroup */ +typedef struct Vanetza_Security2_SequenceOfLAGroup { + A_SEQUENCE_OF(struct Vanetza_Security2_LAGroup) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfLAGroup_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfLAGroup; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfLAGroup_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfLAGroup_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "LAGroup.h" + +#endif /* _Vanetza_Security2_SequenceOfLAGroup_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfLinkageSeed.c b/vanetza/asn1/security/r2/SequenceOfLinkageSeed.c new file mode 100644 index 000000000..1d47b2764 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfLinkageSeed.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfLinkageSeed.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfLinkageSeed_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_LinkageSeed, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfLinkageSeed_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfLinkageSeed), + offsetof(struct Vanetza_Security2_SequenceOfLinkageSeed, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed = { + "SequenceOfLinkageSeed", + "SequenceOfLinkageSeed", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfLinkageSeed_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfLinkageSeed_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfLinkageSeed.h b/vanetza/asn1/security/r2/SequenceOfLinkageSeed.h new file mode 100644 index 000000000..2779fc226 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfLinkageSeed.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfLinkageSeed_H_ +#define _Vanetza_Security2_SequenceOfLinkageSeed_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "LinkageSeed.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfLinkageSeed */ +typedef struct Vanetza_Security2_SequenceOfLinkageSeed { + A_SEQUENCE_OF(Vanetza_Security2_LinkageSeed_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfLinkageSeed_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfLinkageSeed; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfLinkageSeed_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfLinkageSeed_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfLinkageSeed_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfMaInfoStatus.c b/vanetza/asn1/security/r2/SequenceOfMaInfoStatus.c new file mode 100644 index 000000000..9f772a91a --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfMaInfoStatus.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfMaInfoStatus.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfMaInfoStatus_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_MaInfoStatus, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfMaInfoStatus_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfMaInfoStatus), + offsetof(struct Vanetza_Security2_SequenceOfMaInfoStatus, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus = { + "SequenceOfMaInfoStatus", + "SequenceOfMaInfoStatus", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfMaInfoStatus_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfMaInfoStatus_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfMaInfoStatus.h b/vanetza/asn1/security/r2/SequenceOfMaInfoStatus.h new file mode 100644 index 000000000..633381a60 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfMaInfoStatus.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfMaInfoStatus_H_ +#define _Vanetza_Security2_SequenceOfMaInfoStatus_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_MaInfoStatus; + +/* Vanetza_Security2_SequenceOfMaInfoStatus */ +typedef struct Vanetza_Security2_SequenceOfMaInfoStatus { + A_SEQUENCE_OF(struct Vanetza_Security2_MaInfoStatus) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfMaInfoStatus_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfMaInfoStatus; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfMaInfoStatus_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfMaInfoStatus_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "MaInfoStatus.h" + +#endif /* _Vanetza_Security2_SequenceOfMaInfoStatus_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfOctetString.c b/vanetza/asn1/security/r2/SequenceOfOctetString.c new file mode 100644 index 000000000..2154edf29 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfOctetString.c @@ -0,0 +1,111 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfOctetString.h" + +static int +memb_OCTET_STRING_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; + + 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 */) { + (void)st; /* Unused variable */ + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_Member_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_Member_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SequenceOfOctetString_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfOctetString_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfOctetString_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_Member_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_Member_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_OCTET_STRING_constraint_1 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfOctetString_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfOctetString), + offsetof(struct Vanetza_Security2_SequenceOfOctetString, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfOctetString = { + "SequenceOfOctetString", + "SequenceOfOctetString", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfOctetString_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SequenceOfOctetString_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SequenceOfOctetString_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfOctetString_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfOctetString_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfOctetString.h b/vanetza/asn1/security/r2/SequenceOfOctetString.h new file mode 100644 index 000000000..9d53c36e2 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfOctetString.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfOctetString_H_ +#define _Vanetza_Security2_SequenceOfOctetString_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfOctetString */ +typedef struct Vanetza_Security2_SequenceOfOctetString { + A_SEQUENCE_OF(OCTET_STRING_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfOctetString_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfOctetString; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfOctetString_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfOctetString_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfOctetString_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfOctetString_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfPsid.c b/vanetza/asn1/security/r2/SequenceOfPsid.c new file mode 100644 index 000000000..d6119aca8 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsid.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfPsid.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsid_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Vanetza_Security2_Psid, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsid_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfPsid), + offsetof(struct Vanetza_Security2_SequenceOfPsid, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsid = { + "SequenceOfPsid", + "SequenceOfPsid", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsid_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfPsid_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfPsid_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfPsid.h b/vanetza/asn1/security/r2/SequenceOfPsid.h new file mode 100644 index 000000000..c74e51c59 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsid.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfPsid_H_ +#define _Vanetza_Security2_SequenceOfPsid_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Psid.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfPsid */ +typedef struct Vanetza_Security2_SequenceOfPsid { + A_SEQUENCE_OF(Vanetza_Security2_Psid_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfPsid_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsid; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsid_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsid_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfPsid_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfPsidGroupPermissions.c b/vanetza/asn1/security/r2/SequenceOfPsidGroupPermissions.c new file mode 100644 index 000000000..599a9b7a9 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsidGroupPermissions.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfPsidGroupPermissions.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsidGroupPermissions_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_PsidGroupPermissions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsidGroupPermissions_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfPsidGroupPermissions), + offsetof(struct Vanetza_Security2_SequenceOfPsidGroupPermissions, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions = { + "SequenceOfPsidGroupPermissions", + "SequenceOfPsidGroupPermissions", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfPsidGroupPermissions_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfPsidGroupPermissions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfPsidGroupPermissions.h b/vanetza/asn1/security/r2/SequenceOfPsidGroupPermissions.h new file mode 100644 index 000000000..781e9e877 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsidGroupPermissions.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfPsidGroupPermissions_H_ +#define _Vanetza_Security2_SequenceOfPsidGroupPermissions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_PsidGroupPermissions; + +/* Vanetza_Security2_SequenceOfPsidGroupPermissions */ +typedef struct Vanetza_Security2_SequenceOfPsidGroupPermissions { + A_SEQUENCE_OF(struct Vanetza_Security2_PsidGroupPermissions) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfPsidGroupPermissions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsidGroupPermissions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsidGroupPermissions_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "PsidGroupPermissions.h" + +#endif /* _Vanetza_Security2_SequenceOfPsidGroupPermissions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfPsidSsp.c b/vanetza/asn1/security/r2/SequenceOfPsidSsp.c new file mode 100644 index 000000000..f06bf524f --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsidSsp.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfPsidSsp.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsidSsp_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_PsidSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsidSsp_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfPsidSsp), + offsetof(struct Vanetza_Security2_SequenceOfPsidSsp, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsidSsp = { + "SequenceOfPsidSsp", + "SequenceOfPsidSsp", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSsp_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfPsidSsp_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfPsidSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfPsidSsp.h b/vanetza/asn1/security/r2/SequenceOfPsidSsp.h new file mode 100644 index 000000000..9a64e7a0c --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsidSsp.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfPsidSsp_H_ +#define _Vanetza_Security2_SequenceOfPsidSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_PsidSsp; + +/* Vanetza_Security2_SequenceOfPsidSsp */ +typedef struct Vanetza_Security2_SequenceOfPsidSsp { + A_SEQUENCE_OF(struct Vanetza_Security2_PsidSsp) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfPsidSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsidSsp; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsidSsp_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsidSsp_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "PsidSsp.h" + +#endif /* _Vanetza_Security2_SequenceOfPsidSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfPsidSspRange.c b/vanetza/asn1/security/r2/SequenceOfPsidSspRange.c new file mode 100644 index 000000000..5a37793b7 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsidSspRange.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfPsidSspRange.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsidSspRange_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_PsidSspRange, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsidSspRange_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfPsidSspRange), + offsetof(struct Vanetza_Security2_SequenceOfPsidSspRange, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange = { + "SequenceOfPsidSspRange", + "SequenceOfPsidSspRange", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfPsidSspRange_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfPsidSspRange_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfPsidSspRange.h b/vanetza/asn1/security/r2/SequenceOfPsidSspRange.h new file mode 100644 index 000000000..a27206724 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfPsidSspRange.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfPsidSspRange_H_ +#define _Vanetza_Security2_SequenceOfPsidSspRange_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_PsidSspRange; + +/* Vanetza_Security2_SequenceOfPsidSspRange */ +typedef struct Vanetza_Security2_SequenceOfPsidSspRange { + A_SEQUENCE_OF(struct Vanetza_Security2_PsidSspRange) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfPsidSspRange_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfPsidSspRange_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfPsidSspRange_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "PsidSspRange.h" + +#endif /* _Vanetza_Security2_SequenceOfPsidSspRange_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfRecipientInfo.c b/vanetza/asn1/security/r2/SequenceOfRecipientInfo.c new file mode 100644 index 000000000..0aa3d7979 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfRecipientInfo.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfRecipientInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfRecipientInfo_1[] = { + { ATF_POINTER, 0, 0, + -1 /* Ambiguous tag (CHOICE?) */, + 0, + &asn_DEF_Vanetza_Security2_RecipientInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfRecipientInfo_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfRecipientInfo), + offsetof(struct Vanetza_Security2_SequenceOfRecipientInfo, _asn_ctx), + 2, /* XER encoding is XMLValueList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo = { + "SequenceOfRecipientInfo", + "SequenceOfRecipientInfo", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfRecipientInfo_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfRecipientInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfRecipientInfo.h b/vanetza/asn1/security/r2/SequenceOfRecipientInfo.h new file mode 100644 index 000000000..1ff043c6f --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfRecipientInfo.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfRecipientInfo_H_ +#define _Vanetza_Security2_SequenceOfRecipientInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_RecipientInfo; + +/* Vanetza_Security2_SequenceOfRecipientInfo */ +typedef struct Vanetza_Security2_SequenceOfRecipientInfo { + A_SEQUENCE_OF(struct Vanetza_Security2_RecipientInfo) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfRecipientInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfRecipientInfo; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfRecipientInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfRecipientInfo_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "RecipientInfo.h" + +#endif /* _Vanetza_Security2_SequenceOfRecipientInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfRectangularRegion.c b/vanetza/asn1/security/r2/SequenceOfRectangularRegion.c new file mode 100644 index 000000000..5f9b5448b --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfRectangularRegion.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfRectangularRegion.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfRectangularRegion_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_RectangularRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfRectangularRegion_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfRectangularRegion), + offsetof(struct Vanetza_Security2_SequenceOfRectangularRegion, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion = { + "SequenceOfRectangularRegion", + "SequenceOfRectangularRegion", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfRectangularRegion_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfRectangularRegion_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfRectangularRegion.h b/vanetza/asn1/security/r2/SequenceOfRectangularRegion.h new file mode 100644 index 000000000..d847634b2 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfRectangularRegion.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfRectangularRegion_H_ +#define _Vanetza_Security2_SequenceOfRectangularRegion_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_RectangularRegion; + +/* Vanetza_Security2_SequenceOfRectangularRegion */ +typedef struct Vanetza_Security2_SequenceOfRectangularRegion { + A_SEQUENCE_OF(struct Vanetza_Security2_RectangularRegion) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfRectangularRegion_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfRectangularRegion; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfRectangularRegion_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfRectangularRegion_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "RectangularRegion.h" + +#endif /* _Vanetza_Security2_SequenceOfRectangularRegion_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfRegionAndSubregions.c b/vanetza/asn1/security/r2/SequenceOfRegionAndSubregions.c new file mode 100644 index 000000000..1a1115a7c --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfRegionAndSubregions.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfRegionAndSubregions.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfRegionAndSubregions_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), + 0, + &asn_DEF_Vanetza_Security2_RegionAndSubregions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfRegionAndSubregions_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfRegionAndSubregions), + offsetof(struct Vanetza_Security2_SequenceOfRegionAndSubregions, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions = { + "SequenceOfRegionAndSubregions", + "SequenceOfRegionAndSubregions", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfRegionAndSubregions_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfRegionAndSubregions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfRegionAndSubregions.h b/vanetza/asn1/security/r2/SequenceOfRegionAndSubregions.h new file mode 100644 index 000000000..95bd27140 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfRegionAndSubregions.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfRegionAndSubregions_H_ +#define _Vanetza_Security2_SequenceOfRegionAndSubregions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_RegionAndSubregions; + +/* Vanetza_Security2_SequenceOfRegionAndSubregions */ +typedef struct Vanetza_Security2_SequenceOfRegionAndSubregions { + A_SEQUENCE_OF(struct Vanetza_Security2_RegionAndSubregions) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfRegionAndSubregions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfRegionAndSubregions; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfRegionAndSubregions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfRegionAndSubregions_1[1]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "RegionAndSubregions.h" + +#endif /* _Vanetza_Security2_SequenceOfRegionAndSubregions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfUint16.c b/vanetza/asn1/security/r2/SequenceOfUint16.c new file mode 100644 index 000000000..0b6ebd372 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfUint16.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfUint16.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfUint16_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Vanetza_Security2_Uint16, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfUint16_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfUint16), + offsetof(struct Vanetza_Security2_SequenceOfUint16, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfUint16 = { + "SequenceOfUint16", + "SequenceOfUint16", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint16_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfUint16_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfUint16_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfUint16.h b/vanetza/asn1/security/r2/SequenceOfUint16.h new file mode 100644 index 000000000..7b98ac318 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfUint16.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfUint16_H_ +#define _Vanetza_Security2_SequenceOfUint16_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfUint16 */ +typedef struct Vanetza_Security2_SequenceOfUint16 { + A_SEQUENCE_OF(Vanetza_Security2_Uint16_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfUint16_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfUint16; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfUint16_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfUint16_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfUint16_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfUint8.c b/vanetza/asn1/security/r2/SequenceOfUint8.c new file mode 100644 index 000000000..f3f6f5807 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfUint8.c @@ -0,0 +1,66 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfUint8.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfUint8_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), + 0, + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfUint8_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfUint8), + offsetof(struct Vanetza_Security2_SequenceOfUint8, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfUint8 = { + "SequenceOfUint8", + "SequenceOfUint8", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfUint8_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfUint8_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfUint8_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfUint8.h b/vanetza/asn1/security/r2/SequenceOfUint8.h new file mode 100644 index 000000000..a05905a86 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfUint8.h @@ -0,0 +1,41 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfUint8_H_ +#define _Vanetza_Security2_SequenceOfUint8_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint8.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfUint8 */ +typedef struct Vanetza_Security2_SequenceOfUint8 { + A_SEQUENCE_OF(Vanetza_Security2_Uint8_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfUint8_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfUint8; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfUint8_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfUint8_1[1]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfUint8_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SequenceOfX509Certificate.c b/vanetza/asn1/security/r2/SequenceOfX509Certificate.c new file mode 100644 index 000000000..3f878d347 --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfX509Certificate.c @@ -0,0 +1,78 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SequenceOfX509Certificate.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SequenceOfX509Certificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(1..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfX509Certificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 1, 0 } /* (SIZE(1..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfX509Certificate_1[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_X509Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfX509Certificate_specs_1 = { + sizeof(struct Vanetza_Security2_SequenceOfX509Certificate), + offsetof(struct Vanetza_Security2_SequenceOfX509Certificate, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfX509Certificate = { + "SequenceOfX509Certificate", + "SequenceOfX509Certificate", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SequenceOfX509Certificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SequenceOfX509Certificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SequenceOfX509Certificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_SequenceOfX509Certificate_1, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_SequenceOfX509Certificate_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SequenceOfX509Certificate.h b/vanetza/asn1/security/r2/SequenceOfX509Certificate.h new file mode 100644 index 000000000..35b98ccab --- /dev/null +++ b/vanetza/asn1/security/r2/SequenceOfX509Certificate.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SequenceOfX509Certificate_H_ +#define _Vanetza_Security2_SequenceOfX509Certificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "X509Certificate.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SequenceOfX509Certificate */ +typedef struct Vanetza_Security2_SequenceOfX509Certificate { + A_SEQUENCE_OF(Vanetza_Security2_X509Certificate_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SequenceOfX509Certificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SequenceOfX509Certificate; +extern asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_SequenceOfX509Certificate_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SequenceOfX509Certificate_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SequenceOfX509Certificate_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SequenceOfX509Certificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ServiceSpecificPermissions.c b/vanetza/asn1/security/r2/ServiceSpecificPermissions.c new file mode 100644 index 000000000..36448af2b --- /dev/null +++ b/vanetza/asn1/security/r2/ServiceSpecificPermissions.c @@ -0,0 +1,135 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ServiceSpecificPermissions.h" + +static int +memb_Vanetza_Security2_opaque_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; + + 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 */) { + (void)st; /* Unused variable */ + /* Nothing is here. See below */ + } + + return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_opaque_constr_2 CC_NOTUSED = { + { 0, 0 }, + -1 /* (SIZE(0..MAX)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_opaque_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ServiceSpecificPermissions_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ServiceSpecificPermissions_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ServiceSpecificPermissions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ServiceSpecificPermissions, choice.opaque), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_opaque_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_opaque_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_opaque_constraint_1 + }, + 0, 0, /* No default value */ + "opaque" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ServiceSpecificPermissions, choice.bitmapSsp), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_BitmapSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "bitmapSsp" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ServiceSpecificPermissions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* opaque */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* bitmapSsp */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_ServiceSpecificPermissions_specs_1 = { + sizeof(struct Vanetza_Security2_ServiceSpecificPermissions), + offsetof(struct Vanetza_Security2_ServiceSpecificPermissions, _asn_ctx), + offsetof(struct Vanetza_Security2_ServiceSpecificPermissions, present), + sizeof(((struct Vanetza_Security2_ServiceSpecificPermissions *)0)->present), + asn_MAP_Vanetza_Security2_ServiceSpecificPermissions_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ServiceSpecificPermissions = { + "ServiceSpecificPermissions", + "ServiceSpecificPermissions", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ServiceSpecificPermissions_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ServiceSpecificPermissions_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_ServiceSpecificPermissions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ServiceSpecificPermissions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ServiceSpecificPermissions.h b/vanetza/asn1/security/r2/ServiceSpecificPermissions.h new file mode 100644 index 000000000..f7f5cb293 --- /dev/null +++ b/vanetza/asn1/security/r2/ServiceSpecificPermissions.h @@ -0,0 +1,58 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ServiceSpecificPermissions_H_ +#define _Vanetza_Security2_ServiceSpecificPermissions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "BitmapSsp.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_ServiceSpecificPermissions_PR { + Vanetza_Security2_ServiceSpecificPermissions_PR_NOTHING, /* No components present */ + Vanetza_Security2_ServiceSpecificPermissions_PR_opaque, + /* Extensions may appear below */ + Vanetza_Security2_ServiceSpecificPermissions_PR_bitmapSsp +} Vanetza_Security2_ServiceSpecificPermissions_PR; + +/* Vanetza_Security2_ServiceSpecificPermissions */ +typedef struct Vanetza_Security2_ServiceSpecificPermissions { + Vanetza_Security2_ServiceSpecificPermissions_PR present; + union Vanetza_Security2_ServiceSpecificPermissions_u { + OCTET_STRING_t opaque; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_BitmapSsp_t bitmapSsp; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ServiceSpecificPermissions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ServiceSpecificPermissions; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_ServiceSpecificPermissions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ServiceSpecificPermissions_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ServiceSpecificPermissions_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ServiceSpecificPermissions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SharedAtRequest.c b/vanetza/asn1/security/r2/SharedAtRequest.c new file mode 100644 index 000000000..659992bc6 --- /dev/null +++ b/vanetza/asn1/security/r2/SharedAtRequest.c @@ -0,0 +1,204 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SharedAtRequest.h" + +static int +memb_Vanetza_Security2_keyTag_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_requestedSubjectAttributes_constraint_1(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); +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_keyTag_constr_3 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_keyTag_constr_3 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SharedAtRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SharedAtRequest, eaId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "eaId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SharedAtRequest, keyTag), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_keyTag_constr_3, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_keyTag_constr_3, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_keyTag_constraint_1 + }, + 0, 0, /* No default value */ + "keyTag" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SharedAtRequest, certificateFormat), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateFormat, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateFormat" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SharedAtRequest, requestedSubjectAttributes), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateSubjectAttributes, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_requestedSubjectAttributes_constr_5, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_requestedSubjectAttributes_constraint_1 + }, + 0, 0, /* No default value */ + "requestedSubjectAttributes" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SharedAtRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eaId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* keyTag */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* certificateFormat */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* requestedSubjectAttributes */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SharedAtRequest_specs_1 = { + sizeof(struct Vanetza_Security2_SharedAtRequest), + offsetof(struct Vanetza_Security2_SharedAtRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_SharedAtRequest_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SharedAtRequest = { + "SharedAtRequest", + "SharedAtRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SharedAtRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_SharedAtRequest_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_SharedAtRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SharedAtRequest.h b/vanetza/asn1/security/r2/SharedAtRequest.h new file mode 100644 index 000000000..13290854d --- /dev/null +++ b/vanetza/asn1/security/r2/SharedAtRequest.h @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesAuthorization" + * found in "asn1/release2/TS102941v221/TypesAuthorization.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SharedAtRequest_H_ +#define _Vanetza_Security2_SharedAtRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "OCTET_STRING.h" +#include "CertificateFormat.h" +#include "CertificateSubjectAttributes.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SharedAtRequest */ +typedef struct Vanetza_Security2_SharedAtRequest { + Vanetza_Security2_HashedId8_t eaId; + OCTET_STRING_t keyTag; + Vanetza_Security2_CertificateFormat_t certificateFormat; + Vanetza_Security2_CertificateSubjectAttributes_t requestedSubjectAttributes; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SharedAtRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SharedAtRequest; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SharedAtRequest_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SharedAtRequest_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SharedAtRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Signature.c b/vanetza/asn1/security/r2/Signature.c new file mode 100644 index 000000000..7a27dd1aa --- /dev/null +++ b/vanetza/asn1/security/r2/Signature.c @@ -0,0 +1,165 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Signature.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Signature_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Signature_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_Signature_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Signature, choice.ecdsaNistP256Signature), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcdsaP256Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaNistP256Signature" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Signature, choice.ecdsaBrainpoolP256r1Signature), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcdsaP256Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaBrainpoolP256r1Signature" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Signature, choice.ecdsaBrainpoolP384r1Signature), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcdsaP384Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaBrainpoolP384r1Signature" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Signature, choice.ecdsaNistP384Signature), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcdsaP384Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ecdsaNistP384Signature" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_Signature, choice.sm2Signature), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EcsigP256Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sm2Signature" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_Signature_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ecdsaNistP256Signature */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ecdsaBrainpoolP256r1Signature */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* ecdsaBrainpoolP384r1Signature */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* ecdsaNistP384Signature */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* sm2Signature */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_Signature_specs_1 = { + sizeof(struct Vanetza_Security2_Signature), + offsetof(struct Vanetza_Security2_Signature, _asn_ctx), + offsetof(struct Vanetza_Security2_Signature, present), + sizeof(((struct Vanetza_Security2_Signature *)0)->present), + asn_MAP_Vanetza_Security2_Signature_tag2el_1, + 5, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Signature = { + "Signature", + "Signature", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Signature_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Signature_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_Signature_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_Signature_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Signature.h b/vanetza/asn1/security/r2/Signature.h new file mode 100644 index 000000000..f415e07cf --- /dev/null +++ b/vanetza/asn1/security/r2/Signature.h @@ -0,0 +1,65 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Signature_H_ +#define _Vanetza_Security2_Signature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EcdsaP256Signature.h" +#include "EcdsaP384Signature.h" +#include "EcsigP256Signature.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_Signature_PR { + Vanetza_Security2_Signature_PR_NOTHING, /* No components present */ + Vanetza_Security2_Signature_PR_ecdsaNistP256Signature, + Vanetza_Security2_Signature_PR_ecdsaBrainpoolP256r1Signature, + /* Extensions may appear below */ + Vanetza_Security2_Signature_PR_ecdsaBrainpoolP384r1Signature, + Vanetza_Security2_Signature_PR_ecdsaNistP384Signature, + Vanetza_Security2_Signature_PR_sm2Signature +} Vanetza_Security2_Signature_PR; + +/* Vanetza_Security2_Signature */ +typedef struct Vanetza_Security2_Signature { + Vanetza_Security2_Signature_PR present; + union Vanetza_Security2_Signature_u { + Vanetza_Security2_EcdsaP256Signature_t ecdsaNistP256Signature; + Vanetza_Security2_EcdsaP256Signature_t ecdsaBrainpoolP256r1Signature; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_EcdsaP384Signature_t ecdsaBrainpoolP384r1Signature; + Vanetza_Security2_EcdsaP384Signature_t ecdsaNistP384Signature; + Vanetza_Security2_EcsigP256Signature_t sm2Signature; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_Signature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Signature; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_Signature_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_Signature_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Signature_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Signature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignedAprvBinaryTree.c b/vanetza/asn1/security/r2/SignedAprvBinaryTree.c new file mode 100644 index 000000000..b8eb6ad18 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedAprvBinaryTree.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignedAprvBinaryTree.h" + +int +Vanetza_Security2_SignedAprvBinaryTree_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignedAprvBinaryTree_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignedAprvBinaryTree_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedAprvBinaryTree = { + "SignedAprvBinaryTree", + "SignedAprvBinaryTree", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedAprvBinaryTree_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignedAprvBinaryTree_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignedAprvBinaryTree_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SignedAprvBinaryTree_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignedAprvBinaryTree.h b/vanetza/asn1/security/r2/SignedAprvBinaryTree.h new file mode 100644 index 000000000..7e058fb62 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedAprvBinaryTree.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignedAprvBinaryTree_H_ +#define _Vanetza_Security2_SignedAprvBinaryTree_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignedAprvBinaryTree */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_t Vanetza_Security2_SignedAprvBinaryTree_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedAprvBinaryTree; +asn_struct_free_f Vanetza_Security2_SignedAprvBinaryTree_free; +asn_struct_print_f Vanetza_Security2_SignedAprvBinaryTree_print; +asn_constr_check_f Vanetza_Security2_SignedAprvBinaryTree_constraint; +ber_type_decoder_f Vanetza_Security2_SignedAprvBinaryTree_decode_ber; +der_type_encoder_f Vanetza_Security2_SignedAprvBinaryTree_encode_der; +xer_type_decoder_f Vanetza_Security2_SignedAprvBinaryTree_decode_xer; +xer_type_encoder_f Vanetza_Security2_SignedAprvBinaryTree_encode_xer; +jer_type_encoder_f Vanetza_Security2_SignedAprvBinaryTree_encode_jer; +oer_type_decoder_f Vanetza_Security2_SignedAprvBinaryTree_decode_oer; +oer_type_encoder_f Vanetza_Security2_SignedAprvBinaryTree_encode_oer; +per_type_decoder_f Vanetza_Security2_SignedAprvBinaryTree_decode_uper; +per_type_encoder_f Vanetza_Security2_SignedAprvBinaryTree_encode_uper; +per_type_decoder_f Vanetza_Security2_SignedAprvBinaryTree_decode_aper; +per_type_encoder_f Vanetza_Security2_SignedAprvBinaryTree_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignedAprvBinaryTree_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignedCertificateRequest.c b/vanetza/asn1/security/r2/SignedCertificateRequest.c new file mode 100644 index 000000000..5b3c52cd0 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedCertificateRequest.c @@ -0,0 +1,135 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignedCertificateRequest.h" + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignedCertificateRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedCertificateRequest, hashAlgorithmId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashAlgorithm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "hashAlgorithmId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedCertificateRequest, tbsRequest), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ScopedCertificateRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tbsRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedCertificateRequest, signer), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SignerIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signer" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedCertificateRequest, signature), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signature" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SignedCertificateRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* hashAlgorithmId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tbsRequest */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* signer */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* signature */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SignedCertificateRequest_specs_1 = { + sizeof(struct Vanetza_Security2_SignedCertificateRequest), + offsetof(struct Vanetza_Security2_SignedCertificateRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_SignedCertificateRequest_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedCertificateRequest = { + "SignedCertificateRequest", + "SignedCertificateRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedCertificateRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_SignedCertificateRequest_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignedCertificateRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignedCertificateRequest.h b/vanetza/asn1/security/r2/SignedCertificateRequest.h new file mode 100644 index 000000000..a8f6ea26d --- /dev/null +++ b/vanetza/asn1/security/r2/SignedCertificateRequest.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignedCertificateRequest_H_ +#define _Vanetza_Security2_SignedCertificateRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashAlgorithm.h" +#include "ScopedCertificateRequest.h" +#include "SignerIdentifier.h" +#include "Signature.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignedCertificateRequest */ +typedef struct Vanetza_Security2_SignedCertificateRequest { + Vanetza_Security2_HashAlgorithm_t hashAlgorithmId; + Vanetza_Security2_ScopedCertificateRequest_t tbsRequest; + Vanetza_Security2_SignerIdentifier_t signer; + Vanetza_Security2_Signature_t signature; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SignedCertificateRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedCertificateRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignedCertificateRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignedData.c b/vanetza/asn1/security/r2/SignedData.c new file mode 100644 index 000000000..3974f39fc --- /dev/null +++ b/vanetza/asn1/security/r2/SignedData.c @@ -0,0 +1,135 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignedData.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignedData_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedData, hashId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashAlgorithm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "hashId" + }, + { ATF_POINTER, 0, offsetof(struct Vanetza_Security2_SignedData, tbsData), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedData, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tbsData" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedData, signer), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SignerIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signer" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedData, signature), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signature" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SignedData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SignedData_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* hashId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tbsData */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* signer */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* signature */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SignedData_specs_1 = { + sizeof(struct Vanetza_Security2_SignedData), + offsetof(struct Vanetza_Security2_SignedData, _asn_ctx), + asn_MAP_Vanetza_Security2_SignedData_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedData = { + "SignedData", + "SignedData", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SignedData_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SignedData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedData_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SignedData_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SignedData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedData_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_SignedData_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignedData_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignedData.h b/vanetza/asn1/security/r2/SignedData.h new file mode 100644 index 000000000..fb5360e23 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedData.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignedData_H_ +#define _Vanetza_Security2_SignedData_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashAlgorithm.h" +#include "SignerIdentifier.h" +#include "Signature.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_ToBeSignedData; + +/* Vanetza_Security2_SignedData */ +typedef struct Vanetza_Security2_SignedData { + Vanetza_Security2_HashAlgorithm_t hashId; + struct Vanetza_Security2_ToBeSignedData *tbsData; + Vanetza_Security2_SignerIdentifier_t signer; + Vanetza_Security2_Signature_t signature; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SignedData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedData; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SignedData_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignedData_1[4]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "ToBeSignedData.h" + +#endif /* _Vanetza_Security2_SignedData_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignedDataPayload.c b/vanetza/asn1/security/r2/SignedDataPayload.c new file mode 100644 index 000000000..64da3a4e1 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedDataPayload.c @@ -0,0 +1,128 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignedDataPayload.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignedDataPayload_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignedDataPayload_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignedDataPayload_1[] = { + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_SignedDataPayload, data), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609Dot2Data, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "data" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_SignedDataPayload, extDataHash), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedData, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "extDataHash" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_SignedDataPayload, omitted), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "omitted" + }, +}; +static const int asn_MAP_Vanetza_Security2_SignedDataPayload_oms_1[] = { 0, 1, 2 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SignedDataPayload_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* data */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* extDataHash */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* omitted */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SignedDataPayload_specs_1 = { + sizeof(struct Vanetza_Security2_SignedDataPayload), + offsetof(struct Vanetza_Security2_SignedDataPayload, _asn_ctx), + asn_MAP_Vanetza_Security2_SignedDataPayload_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_SignedDataPayload_oms_1, /* Optional members */ + 2, 1, /* Root/Additions */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedDataPayload = { + "SignedDataPayload", + "SignedDataPayload", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedDataPayload_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignedDataPayload_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignedDataPayload_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_SignedDataPayload_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignedDataPayload_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignedDataPayload.h b/vanetza/asn1/security/r2/SignedDataPayload.h new file mode 100644 index 000000000..f641426c0 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedDataPayload.h @@ -0,0 +1,55 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignedDataPayload_H_ +#define _Vanetza_Security2_SignedDataPayload_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NULL.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_Ieee1609Dot2Data; +struct Vanetza_Security2_HashedData; + +/* Vanetza_Security2_SignedDataPayload */ +typedef struct Vanetza_Security2_SignedDataPayload { + struct Vanetza_Security2_Ieee1609Dot2Data *data; /* OPTIONAL */ + struct Vanetza_Security2_HashedData *extDataHash; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + NULL_t *omitted; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SignedDataPayload_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedDataPayload; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SignedDataPayload_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignedDataPayload_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignedDataPayload_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "Ieee1609Dot2Data.h" +#include "HashedData.h" + +#endif /* _Vanetza_Security2_SignedDataPayload_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignedIndividualAprv.c b/vanetza/asn1/security/r2/SignedIndividualAprv.c new file mode 100644 index 000000000..62bd06df4 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedIndividualAprv.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignedIndividualAprv.h" + +int +Vanetza_Security2_SignedIndividualAprv_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 Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignedIndividualAprv_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignedIndividualAprv_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedIndividualAprv = { + "SignedIndividualAprv", + "SignedIndividualAprv", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedIndividualAprv_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignedIndividualAprv_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignedIndividualAprv_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SignedIndividualAprv_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignedIndividualAprv.h b/vanetza/asn1/security/r2/SignedIndividualAprv.h new file mode 100644 index 000000000..034704322 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedIndividualAprv.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignedIndividualAprv_H_ +#define _Vanetza_Security2_SignedIndividualAprv_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Signed.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignedIndividualAprv */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Signed_228P1_t Vanetza_Security2_SignedIndividualAprv_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedIndividualAprv; +asn_struct_free_f Vanetza_Security2_SignedIndividualAprv_free; +asn_struct_print_f Vanetza_Security2_SignedIndividualAprv_print; +asn_constr_check_f Vanetza_Security2_SignedIndividualAprv_constraint; +ber_type_decoder_f Vanetza_Security2_SignedIndividualAprv_decode_ber; +der_type_encoder_f Vanetza_Security2_SignedIndividualAprv_encode_der; +xer_type_decoder_f Vanetza_Security2_SignedIndividualAprv_decode_xer; +xer_type_encoder_f Vanetza_Security2_SignedIndividualAprv_encode_xer; +jer_type_encoder_f Vanetza_Security2_SignedIndividualAprv_encode_jer; +oer_type_decoder_f Vanetza_Security2_SignedIndividualAprv_decode_oer; +oer_type_encoder_f Vanetza_Security2_SignedIndividualAprv_encode_oer; +per_type_decoder_f Vanetza_Security2_SignedIndividualAprv_decode_uper; +per_type_encoder_f Vanetza_Security2_SignedIndividualAprv_encode_uper; +per_type_decoder_f Vanetza_Security2_SignedIndividualAprv_decode_aper; +per_type_encoder_f Vanetza_Security2_SignedIndividualAprv_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignedIndividualAprv_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignedX509CertificateRequest.c b/vanetza/asn1/security/r2/SignedX509CertificateRequest.c new file mode 100644 index 000000000..bacec3bd9 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedX509CertificateRequest.c @@ -0,0 +1,135 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignedX509CertificateRequest.h" + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignedX509CertificateRequest_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedX509CertificateRequest, hashAlgorithmId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashAlgorithm, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "hashAlgorithmId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedX509CertificateRequest, tbsRequest), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ScopedCertificateRequest, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tbsRequest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedX509CertificateRequest, signer), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_X509SignerIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signer" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignedX509CertificateRequest, signature), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Signature, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "signature" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SignedX509CertificateRequest_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* hashAlgorithmId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tbsRequest */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* signer */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* signature */ +}; +static asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SignedX509CertificateRequest_specs_1 = { + sizeof(struct Vanetza_Security2_SignedX509CertificateRequest), + offsetof(struct Vanetza_Security2_SignedX509CertificateRequest, _asn_ctx), + asn_MAP_Vanetza_Security2_SignedX509CertificateRequest_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedX509CertificateRequest = { + "SignedX509CertificateRequest", + "SignedX509CertificateRequest", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SignedX509CertificateRequest_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_SignedX509CertificateRequest_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignedX509CertificateRequest_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignedX509CertificateRequest.h b/vanetza/asn1/security/r2/SignedX509CertificateRequest.h new file mode 100644 index 000000000..249f1a673 --- /dev/null +++ b/vanetza/asn1/security/r2/SignedX509CertificateRequest.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignedX509CertificateRequest_H_ +#define _Vanetza_Security2_SignedX509CertificateRequest_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashAlgorithm.h" +#include "ScopedCertificateRequest.h" +#include "X509SignerIdentifier.h" +#include "Signature.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignedX509CertificateRequest */ +typedef struct Vanetza_Security2_SignedX509CertificateRequest { + Vanetza_Security2_HashAlgorithm_t hashAlgorithmId; + Vanetza_Security2_ScopedCertificateRequest_t tbsRequest; + Vanetza_Security2_X509SignerIdentifier_t signer; + Vanetza_Security2_Signature_t signature; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SignedX509CertificateRequest_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignedX509CertificateRequest; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignedX509CertificateRequest_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignerIdentifier.c b/vanetza/asn1/security/r2/SignerIdentifier.c new file mode 100644 index 000000000..9429946d1 --- /dev/null +++ b/vanetza/asn1/security/r2/SignerIdentifier.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignerIdentifier.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignerIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignerIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignerIdentifier_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignerIdentifier, choice.digest), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "digest" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignerIdentifier, choice.certificate), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfCertificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SignerIdentifier, choice.self), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "self" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SignerIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* digest */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* certificate */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* self */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SignerIdentifier_specs_1 = { + sizeof(struct Vanetza_Security2_SignerIdentifier), + offsetof(struct Vanetza_Security2_SignerIdentifier, _asn_ctx), + offsetof(struct Vanetza_Security2_SignerIdentifier, present), + sizeof(((struct Vanetza_Security2_SignerIdentifier *)0)->present), + asn_MAP_Vanetza_Security2_SignerIdentifier_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 3 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerIdentifier = { + "SignerIdentifier", + "SignerIdentifier", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignerIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignerIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SignerIdentifier_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignerIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignerIdentifier.h b/vanetza/asn1/security/r2/SignerIdentifier.h new file mode 100644 index 000000000..85bf548ea --- /dev/null +++ b/vanetza/asn1/security/r2/SignerIdentifier.h @@ -0,0 +1,62 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignerIdentifier_H_ +#define _Vanetza_Security2_SignerIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "SequenceOfCertificate.h" +#include "NULL.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SignerIdentifier_PR { + Vanetza_Security2_SignerIdentifier_PR_NOTHING, /* No components present */ + Vanetza_Security2_SignerIdentifier_PR_digest, + Vanetza_Security2_SignerIdentifier_PR_certificate, + Vanetza_Security2_SignerIdentifier_PR_self + /* Extensions may appear below */ + +} Vanetza_Security2_SignerIdentifier_PR; + +/* Vanetza_Security2_SignerIdentifier */ +typedef struct Vanetza_Security2_SignerIdentifier { + Vanetza_Security2_SignerIdentifier_PR present; + union Vanetza_Security2_SignerIdentifier_u { + Vanetza_Security2_HashedId8_t digest; + Vanetza_Security2_SequenceOfCertificate_t certificate; + NULL_t self; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SignerIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerIdentifier; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SignerIdentifier_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SignerIdentifier_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignerIdentifier_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignerIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignerSelf.c b/vanetza/asn1/security/r2/SignerSelf.c new file mode 100644 index 000000000..e28c3203d --- /dev/null +++ b/vanetza/asn1/security/r2/SignerSelf.c @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignerSelf.h" + +int +Vanetza_Security2_SignerSelf_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 Vanetza_Security2_SignerIdentifier, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignerSelf_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignerSelf_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerSelf = { + "SignerSelf", + "SignerSelf", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignerSelf_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignerSelf_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SignerSelf_constraint + }, + asn_MBR_Vanetza_Security2_SignerIdentifier_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignerIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignerSelf.h b/vanetza/asn1/security/r2/SignerSelf.h new file mode 100644 index 000000000..f7c0b97f8 --- /dev/null +++ b/vanetza/asn1/security/r2/SignerSelf.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignerSelf_H_ +#define _Vanetza_Security2_SignerSelf_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SignerIdentifier.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignerSelf */ +typedef Vanetza_Security2_SignerIdentifier_t Vanetza_Security2_SignerSelf_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerSelf; +asn_struct_free_f Vanetza_Security2_SignerSelf_free; +asn_struct_print_f Vanetza_Security2_SignerSelf_print; +asn_constr_check_f Vanetza_Security2_SignerSelf_constraint; +ber_type_decoder_f Vanetza_Security2_SignerSelf_decode_ber; +der_type_encoder_f Vanetza_Security2_SignerSelf_encode_der; +xer_type_decoder_f Vanetza_Security2_SignerSelf_decode_xer; +xer_type_encoder_f Vanetza_Security2_SignerSelf_encode_xer; +jer_type_encoder_f Vanetza_Security2_SignerSelf_encode_jer; +oer_type_decoder_f Vanetza_Security2_SignerSelf_decode_oer; +oer_type_encoder_f Vanetza_Security2_SignerSelf_encode_oer; +per_type_decoder_f Vanetza_Security2_SignerSelf_decode_uper; +per_type_encoder_f Vanetza_Security2_SignerSelf_encode_uper; +per_type_decoder_f Vanetza_Security2_SignerSelf_decode_aper; +per_type_encoder_f Vanetza_Security2_SignerSelf_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignerSelf_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignerSingleCert.c b/vanetza/asn1/security/r2/SignerSingleCert.c new file mode 100644 index 000000000..20b7a6c13 --- /dev/null +++ b/vanetza/asn1/security/r2/SignerSingleCert.c @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignerSingleCert.h" + +int +Vanetza_Security2_SignerSingleCert_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 Vanetza_Security2_SignerIdentifier, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignerSingleCert_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignerSingleCert_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerSingleCert = { + "SignerSingleCert", + "SignerSingleCert", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignerSingleCert_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignerSingleCert_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SignerSingleCert_constraint + }, + asn_MBR_Vanetza_Security2_SignerIdentifier_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_SignerIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignerSingleCert.h b/vanetza/asn1/security/r2/SignerSingleCert.h new file mode 100644 index 000000000..81eb975e6 --- /dev/null +++ b/vanetza/asn1/security/r2/SignerSingleCert.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignerSingleCert_H_ +#define _Vanetza_Security2_SignerSingleCert_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SignerIdentifier.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignerSingleCert */ +typedef Vanetza_Security2_SignerIdentifier_t Vanetza_Security2_SignerSingleCert_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerSingleCert; +asn_struct_free_f Vanetza_Security2_SignerSingleCert_free; +asn_struct_print_f Vanetza_Security2_SignerSingleCert_print; +asn_constr_check_f Vanetza_Security2_SignerSingleCert_constraint; +ber_type_decoder_f Vanetza_Security2_SignerSingleCert_decode_ber; +der_type_encoder_f Vanetza_Security2_SignerSingleCert_encode_der; +xer_type_decoder_f Vanetza_Security2_SignerSingleCert_decode_xer; +xer_type_encoder_f Vanetza_Security2_SignerSingleCert_encode_xer; +jer_type_encoder_f Vanetza_Security2_SignerSingleCert_encode_jer; +oer_type_decoder_f Vanetza_Security2_SignerSingleCert_decode_oer; +oer_type_encoder_f Vanetza_Security2_SignerSingleCert_encode_oer; +per_type_decoder_f Vanetza_Security2_SignerSingleCert_decode_uper; +per_type_encoder_f Vanetza_Security2_SignerSingleCert_encode_uper; +per_type_decoder_f Vanetza_Security2_SignerSingleCert_decode_aper; +per_type_encoder_f Vanetza_Security2_SignerSingleCert_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignerSingleCert_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SignerSingleX509Cert.c b/vanetza/asn1/security/r2/SignerSingleX509Cert.c new file mode 100644 index 000000000..679535e46 --- /dev/null +++ b/vanetza/asn1/security/r2/SignerSingleX509Cert.c @@ -0,0 +1,69 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SignerSingleX509Cert.h" + +int +Vanetza_Security2_SignerSingleX509Cert_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 Vanetza_Security2_X509SignerIdentifier, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SignerSingleX509Cert_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_SignerSingleX509Cert_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerSingleX509Cert = { + "SignerSingleX509Cert", + "SignerSingleX509Cert", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SignerSingleX509Cert_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SignerSingleX509Cert_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SignerSingleX509Cert_constraint + }, + asn_MBR_Vanetza_Security2_X509SignerIdentifier_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_X509SignerIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SignerSingleX509Cert.h b/vanetza/asn1/security/r2/SignerSingleX509Cert.h new file mode 100644 index 000000000..7deb0db93 --- /dev/null +++ b/vanetza/asn1/security/r2/SignerSingleX509Cert.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SignerSingleX509Cert_H_ +#define _Vanetza_Security2_SignerSingleX509Cert_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "X509SignerIdentifier.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SignerSingleX509Cert */ +typedef Vanetza_Security2_X509SignerIdentifier_t Vanetza_Security2_SignerSingleX509Cert_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SignerSingleX509Cert; +asn_struct_free_f Vanetza_Security2_SignerSingleX509Cert_free; +asn_struct_print_f Vanetza_Security2_SignerSingleX509Cert_print; +asn_constr_check_f Vanetza_Security2_SignerSingleX509Cert_constraint; +ber_type_decoder_f Vanetza_Security2_SignerSingleX509Cert_decode_ber; +der_type_encoder_f Vanetza_Security2_SignerSingleX509Cert_encode_der; +xer_type_decoder_f Vanetza_Security2_SignerSingleX509Cert_decode_xer; +xer_type_encoder_f Vanetza_Security2_SignerSingleX509Cert_encode_xer; +jer_type_encoder_f Vanetza_Security2_SignerSingleX509Cert_encode_jer; +oer_type_decoder_f Vanetza_Security2_SignerSingleX509Cert_decode_oer; +oer_type_encoder_f Vanetza_Security2_SignerSingleX509Cert_encode_oer; +per_type_decoder_f Vanetza_Security2_SignerSingleX509Cert_decode_uper; +per_type_encoder_f Vanetza_Security2_SignerSingleX509Cert_encode_uper; +per_type_decoder_f Vanetza_Security2_SignerSingleX509Cert_decode_aper; +per_type_encoder_f Vanetza_Security2_SignerSingleX509Cert_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SignerSingleX509Cert_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SspRange.c b/vanetza/asn1/security/r2/SspRange.c new file mode 100644 index 000000000..1bc315f23 --- /dev/null +++ b/vanetza/asn1/security/r2/SspRange.c @@ -0,0 +1,123 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SspRange.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SspRange_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SspRange_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SspRange_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SspRange, choice.opaque), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfOctetString, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "opaque" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SspRange, choice.all), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "all" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SspRange, choice.bitmapSspRange), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_BitmapSspRange, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "bitmapSspRange" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SspRange_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* opaque */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* all */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* bitmapSspRange */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SspRange_specs_1 = { + sizeof(struct Vanetza_Security2_SspRange), + offsetof(struct Vanetza_Security2_SspRange, _asn_ctx), + offsetof(struct Vanetza_Security2_SspRange, present), + sizeof(((struct Vanetza_Security2_SspRange *)0)->present), + asn_MAP_Vanetza_Security2_SspRange_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SspRange = { + "SspRange", + "SspRange", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SspRange_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SspRange_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SspRange_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_SspRange_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SspRange.h b/vanetza/asn1/security/r2/SspRange.h new file mode 100644 index 000000000..9fcd4c6c7 --- /dev/null +++ b/vanetza/asn1/security/r2/SspRange.h @@ -0,0 +1,61 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SspRange_H_ +#define _Vanetza_Security2_SspRange_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SequenceOfOctetString.h" +#include "NULL.h" +#include "BitmapSspRange.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SspRange_PR { + Vanetza_Security2_SspRange_PR_NOTHING, /* No components present */ + Vanetza_Security2_SspRange_PR_opaque, + Vanetza_Security2_SspRange_PR_all, + /* Extensions may appear below */ + Vanetza_Security2_SspRange_PR_bitmapSspRange +} Vanetza_Security2_SspRange_PR; + +/* Vanetza_Security2_SspRange */ +typedef struct Vanetza_Security2_SspRange { + Vanetza_Security2_SspRange_PR present; + union Vanetza_Security2_SspRange_u { + Vanetza_Security2_SequenceOfOctetString_t opaque; + NULL_t all; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_BitmapSspRange_t bitmapSspRange; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SspRange_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SspRange; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SspRange_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SspRange_1[3]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SspRange_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SspRange_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SubjectAssurance.c b/vanetza/asn1/security/r2/SubjectAssurance.c new file mode 100644 index 000000000..8d3af1d46 --- /dev/null +++ b/vanetza/asn1/security/r2/SubjectAssurance.c @@ -0,0 +1,80 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SubjectAssurance.h" + +int +Vanetza_Security2_SubjectAssurance_constraint(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 == 1UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SubjectAssurance_constr_1 CC_NOTUSED = { + { 0, 0 }, + 1 /* (SIZE(1..1)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SubjectAssurance_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SubjectAssurance = { + "SubjectAssurance", + "SubjectAssurance", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SubjectAssurance_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SubjectAssurance_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SubjectAssurance_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_SubjectAssurance_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SubjectAssurance.h b/vanetza/asn1/security/r2/SubjectAssurance.h new file mode 100644 index 000000000..db6e5c8cf --- /dev/null +++ b/vanetza/asn1/security/r2/SubjectAssurance.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SubjectAssurance_H_ +#define _Vanetza_Security2_SubjectAssurance_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SubjectAssurance */ +typedef OCTET_STRING_t Vanetza_Security2_SubjectAssurance_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SubjectAssurance_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SubjectAssurance; +asn_struct_free_f Vanetza_Security2_SubjectAssurance_free; +asn_struct_print_f Vanetza_Security2_SubjectAssurance_print; +asn_constr_check_f Vanetza_Security2_SubjectAssurance_constraint; +ber_type_decoder_f Vanetza_Security2_SubjectAssurance_decode_ber; +der_type_encoder_f Vanetza_Security2_SubjectAssurance_encode_der; +xer_type_decoder_f Vanetza_Security2_SubjectAssurance_decode_xer; +xer_type_encoder_f Vanetza_Security2_SubjectAssurance_encode_xer; +jer_type_encoder_f Vanetza_Security2_SubjectAssurance_encode_jer; +oer_type_decoder_f Vanetza_Security2_SubjectAssurance_decode_oer; +oer_type_encoder_f Vanetza_Security2_SubjectAssurance_encode_oer; +per_type_decoder_f Vanetza_Security2_SubjectAssurance_decode_uper; +per_type_encoder_f Vanetza_Security2_SubjectAssurance_encode_uper; +per_type_decoder_f Vanetza_Security2_SubjectAssurance_decode_aper; +per_type_encoder_f Vanetza_Security2_SubjectAssurance_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SubjectAssurance_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SubjectPermissions.c b/vanetza/asn1/security/r2/SubjectPermissions.c new file mode 100644 index 000000000..9beb8c8fc --- /dev/null +++ b/vanetza/asn1/security/r2/SubjectPermissions.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SubjectPermissions.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SubjectPermissions_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SubjectPermissions_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SubjectPermissions_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SubjectPermissions, choice.Explicit), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsidSspRange, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "explicit" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SubjectPermissions, choice.all), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "all" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SubjectPermissions_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* explicit */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* all */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SubjectPermissions_specs_1 = { + sizeof(struct Vanetza_Security2_SubjectPermissions), + offsetof(struct Vanetza_Security2_SubjectPermissions, _asn_ctx), + offsetof(struct Vanetza_Security2_SubjectPermissions, present), + sizeof(((struct Vanetza_Security2_SubjectPermissions *)0)->present), + asn_MAP_Vanetza_Security2_SubjectPermissions_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SubjectPermissions = { + "SubjectPermissions", + "SubjectPermissions", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SubjectPermissions_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SubjectPermissions_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SubjectPermissions_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_SubjectPermissions_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SubjectPermissions.h b/vanetza/asn1/security/r2/SubjectPermissions.h new file mode 100644 index 000000000..620521b54 --- /dev/null +++ b/vanetza/asn1/security/r2/SubjectPermissions.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SubjectPermissions_H_ +#define _Vanetza_Security2_SubjectPermissions_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SequenceOfPsidSspRange.h" +#include "NULL.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SubjectPermissions_PR { + Vanetza_Security2_SubjectPermissions_PR_NOTHING, /* No components present */ + Vanetza_Security2_SubjectPermissions_PR_explicit, + Vanetza_Security2_SubjectPermissions_PR_all + /* Extensions may appear below */ + +} Vanetza_Security2_SubjectPermissions_PR; + +/* Vanetza_Security2_SubjectPermissions */ +typedef struct Vanetza_Security2_SubjectPermissions { + Vanetza_Security2_SubjectPermissions_PR present; + union Vanetza_Security2_SubjectPermissions_u { + Vanetza_Security2_SequenceOfPsidSspRange_t Explicit; + NULL_t all; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SubjectPermissions_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SubjectPermissions; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SubjectPermissions_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SubjectPermissions_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SubjectPermissions_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SubjectPermissions_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SymmAlgorithm.c b/vanetza/asn1/security/r2/SymmAlgorithm.c new file mode 100644 index 000000000..38ff4937d --- /dev/null +++ b/vanetza/asn1/security/r2/SymmAlgorithm.c @@ -0,0 +1,73 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SymmAlgorithm.h" + +/* + * This type is implemented using NativeEnumerated, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SymmAlgorithm_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SymmAlgorithm_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const asn_INTEGER_enum_map_t asn_MAP_Vanetza_Security2_SymmAlgorithm_value2enum_1[] = { + { 0, 9, "aes128Ccm" }, + { 1, 6, "sm4Ccm" } + /* This list is extensible */ +}; +static const unsigned int asn_MAP_Vanetza_Security2_SymmAlgorithm_enum2value_1[] = { + 0, /* aes128Ccm(0) */ + 1 /* sm4Ccm(1) */ + /* This list is extensible */ +}; +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_SymmAlgorithm_specs_1 = { + asn_MAP_Vanetza_Security2_SymmAlgorithm_value2enum_1, /* "tag" => N; sorted by tag */ + asn_MAP_Vanetza_Security2_SymmAlgorithm_enum2value_1, /* N => "tag"; sorted by N */ + 2, /* Number of elements in the maps */ + 2, /* Extensions before this member */ + 1, /* Strict enumeration */ + 0, /* Native long size */ + 0 +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmAlgorithm = { + "SymmAlgorithm", + "SymmAlgorithm", + &asn_OP_NativeEnumerated, + asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SymmAlgorithm_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SymmAlgorithm_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SymmAlgorithm_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeEnumerated_constraint + }, + 0, 0, /* Defined elsewhere */ + &asn_SPC_Vanetza_Security2_SymmAlgorithm_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SymmAlgorithm.h b/vanetza/asn1/security/r2/SymmAlgorithm.h new file mode 100644 index 000000000..d09c2ca37 --- /dev/null +++ b/vanetza/asn1/security/r2/SymmAlgorithm.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SymmAlgorithm_H_ +#define _Vanetza_Security2_SymmAlgorithm_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeEnumerated.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SymmAlgorithm { + Vanetza_Security2_SymmAlgorithm_aes128Ccm = 0, + /* + * Enumeration is extensible + */ + Vanetza_Security2_SymmAlgorithm_sm4Ccm = 1 +} e_Vanetza_Security2_SymmAlgorithm; + +/* Vanetza_Security2_SymmAlgorithm */ +typedef long Vanetza_Security2_SymmAlgorithm_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SymmAlgorithm_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmAlgorithm; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_SymmAlgorithm_specs_1; +asn_struct_free_f Vanetza_Security2_SymmAlgorithm_free; +asn_struct_print_f Vanetza_Security2_SymmAlgorithm_print; +asn_constr_check_f Vanetza_Security2_SymmAlgorithm_constraint; +ber_type_decoder_f Vanetza_Security2_SymmAlgorithm_decode_ber; +der_type_encoder_f Vanetza_Security2_SymmAlgorithm_encode_der; +xer_type_decoder_f Vanetza_Security2_SymmAlgorithm_decode_xer; +xer_type_encoder_f Vanetza_Security2_SymmAlgorithm_encode_xer; +jer_type_encoder_f Vanetza_Security2_SymmAlgorithm_encode_jer; +oer_type_decoder_f Vanetza_Security2_SymmAlgorithm_decode_oer; +oer_type_encoder_f Vanetza_Security2_SymmAlgorithm_encode_oer; +per_type_decoder_f Vanetza_Security2_SymmAlgorithm_decode_uper; +per_type_encoder_f Vanetza_Security2_SymmAlgorithm_encode_uper; +per_type_decoder_f Vanetza_Security2_SymmAlgorithm_decode_aper; +per_type_encoder_f Vanetza_Security2_SymmAlgorithm_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SymmAlgorithm_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SymmRecipientInfo.c b/vanetza/asn1/security/r2/SymmRecipientInfo.c new file mode 100644 index 000000000..1de890d6b --- /dev/null +++ b/vanetza/asn1/security/r2/SymmRecipientInfo.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SymmRecipientInfo.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SymmRecipientInfo_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SymmRecipientInfo, recipientId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "recipientId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SymmRecipientInfo, encKey), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SymmetricCiphertext, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encKey" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SymmRecipientInfo_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recipientId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* encKey */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SymmRecipientInfo_specs_1 = { + sizeof(struct Vanetza_Security2_SymmRecipientInfo), + offsetof(struct Vanetza_Security2_SymmRecipientInfo, _asn_ctx), + asn_MAP_Vanetza_Security2_SymmRecipientInfo_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_Vanetza_Security2_SymmRecipientInfo = { + "SymmRecipientInfo", + "SymmRecipientInfo", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1, + sizeof(asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_SymmRecipientInfo_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_SymmRecipientInfo_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_SymmRecipientInfo_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SymmRecipientInfo.h b/vanetza/asn1/security/r2/SymmRecipientInfo.h new file mode 100644 index 000000000..7fdc27a1d --- /dev/null +++ b/vanetza/asn1/security/r2/SymmRecipientInfo.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SymmRecipientInfo_H_ +#define _Vanetza_Security2_SymmRecipientInfo_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HashedId8.h" +#include "SymmetricCiphertext.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_SymmRecipientInfo */ +typedef struct Vanetza_Security2_SymmRecipientInfo { + Vanetza_Security2_HashedId8_t recipientId; + Vanetza_Security2_SymmetricCiphertext_t encKey; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SymmRecipientInfo_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmRecipientInfo; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_SymmRecipientInfo_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SymmRecipientInfo_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SymmRecipientInfo_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SymmetricCiphertext.c b/vanetza/asn1/security/r2/SymmetricCiphertext.c new file mode 100644 index 000000000..33702b8da --- /dev/null +++ b/vanetza/asn1/security/r2/SymmetricCiphertext.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SymmetricCiphertext.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SymmetricCiphertext_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SymmetricCiphertext_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SymmetricCiphertext_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SymmetricCiphertext, choice.aes128ccm), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_One28BitCcmCiphertext, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "aes128ccm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SymmetricCiphertext, choice.sm4Ccm), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_One28BitCcmCiphertext, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sm4Ccm" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SymmetricCiphertext_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* aes128ccm */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sm4Ccm */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SymmetricCiphertext_specs_1 = { + sizeof(struct Vanetza_Security2_SymmetricCiphertext), + offsetof(struct Vanetza_Security2_SymmetricCiphertext, _asn_ctx), + offsetof(struct Vanetza_Security2_SymmetricCiphertext, present), + sizeof(((struct Vanetza_Security2_SymmetricCiphertext *)0)->present), + asn_MAP_Vanetza_Security2_SymmetricCiphertext_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmetricCiphertext = { + "SymmetricCiphertext", + "SymmetricCiphertext", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SymmetricCiphertext_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SymmetricCiphertext_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SymmetricCiphertext_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_SymmetricCiphertext_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SymmetricCiphertext.h b/vanetza/asn1/security/r2/SymmetricCiphertext.h new file mode 100644 index 000000000..99ffb23e8 --- /dev/null +++ b/vanetza/asn1/security/r2/SymmetricCiphertext.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SymmetricCiphertext_H_ +#define _Vanetza_Security2_SymmetricCiphertext_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "One28BitCcmCiphertext.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SymmetricCiphertext_PR { + Vanetza_Security2_SymmetricCiphertext_PR_NOTHING, /* No components present */ + Vanetza_Security2_SymmetricCiphertext_PR_aes128ccm, + /* Extensions may appear below */ + Vanetza_Security2_SymmetricCiphertext_PR_sm4Ccm +} Vanetza_Security2_SymmetricCiphertext_PR; + +/* Vanetza_Security2_SymmetricCiphertext */ +typedef struct Vanetza_Security2_SymmetricCiphertext { + Vanetza_Security2_SymmetricCiphertext_PR present; + union Vanetza_Security2_SymmetricCiphertext_u { + Vanetza_Security2_One28BitCcmCiphertext_t aes128ccm; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_One28BitCcmCiphertext_t sm4Ccm; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SymmetricCiphertext_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmetricCiphertext; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SymmetricCiphertext_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SymmetricCiphertext_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SymmetricCiphertext_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SymmetricCiphertext_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/SymmetricEncryptionKey.c b/vanetza/asn1/security/r2/SymmetricEncryptionKey.c new file mode 100644 index 000000000..a683b87c9 --- /dev/null +++ b/vanetza/asn1/security/r2/SymmetricEncryptionKey.c @@ -0,0 +1,178 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "SymmetricEncryptionKey.h" + +static int +memb_Vanetza_Security2_aes128Ccm_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +static int +memb_Vanetza_Security2_sm4Ccm_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 == 16UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_aes128Ccm_constr_2 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_aes128Ccm_constr_2 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_sm4Ccm_constr_4 CC_NOTUSED = { + { 0, 0 }, + 16 /* (SIZE(16..16)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_sm4Ccm_constr_4 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_SymmetricEncryptionKey_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_SymmetricEncryptionKey_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_SymmetricEncryptionKey_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SymmetricEncryptionKey, choice.aes128Ccm), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_aes128Ccm_constr_2, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_aes128Ccm_constr_2, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_aes128Ccm_constraint_1 + }, + 0, 0, /* No default value */ + "aes128Ccm" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_SymmetricEncryptionKey, choice.sm4Ccm), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_OCTET_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_sm4Ccm_constr_4, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_sm4Ccm_constr_4, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_sm4Ccm_constraint_1 + }, + 0, 0, /* No default value */ + "sm4Ccm" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_SymmetricEncryptionKey_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* aes128Ccm */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* sm4Ccm */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SymmetricEncryptionKey_specs_1 = { + sizeof(struct Vanetza_Security2_SymmetricEncryptionKey), + offsetof(struct Vanetza_Security2_SymmetricEncryptionKey, _asn_ctx), + offsetof(struct Vanetza_Security2_SymmetricEncryptionKey, present), + sizeof(((struct Vanetza_Security2_SymmetricEncryptionKey *)0)->present), + asn_MAP_Vanetza_Security2_SymmetricEncryptionKey_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmetricEncryptionKey = { + "SymmetricEncryptionKey", + "SymmetricEncryptionKey", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_SymmetricEncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_SymmetricEncryptionKey_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SymmetricEncryptionKey_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_SymmetricEncryptionKey_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/SymmetricEncryptionKey.h b/vanetza/asn1/security/r2/SymmetricEncryptionKey.h new file mode 100644 index 000000000..37df5b86a --- /dev/null +++ b/vanetza/asn1/security/r2/SymmetricEncryptionKey.h @@ -0,0 +1,57 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_SymmetricEncryptionKey_H_ +#define _Vanetza_Security2_SymmetricEncryptionKey_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_SymmetricEncryptionKey_PR { + Vanetza_Security2_SymmetricEncryptionKey_PR_NOTHING, /* No components present */ + Vanetza_Security2_SymmetricEncryptionKey_PR_aes128Ccm, + /* Extensions may appear below */ + Vanetza_Security2_SymmetricEncryptionKey_PR_sm4Ccm +} Vanetza_Security2_SymmetricEncryptionKey_PR; + +/* Vanetza_Security2_SymmetricEncryptionKey */ +typedef struct Vanetza_Security2_SymmetricEncryptionKey { + Vanetza_Security2_SymmetricEncryptionKey_PR present; + union Vanetza_Security2_SymmetricEncryptionKey_u { + OCTET_STRING_t aes128Ccm; + /* + * This type is extensible, + * possible extensions are below. + */ + OCTET_STRING_t sm4Ccm; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_SymmetricEncryptionKey_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_SymmetricEncryptionKey; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_SymmetricEncryptionKey_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_SymmetricEncryptionKey_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_SymmetricEncryptionKey_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_SymmetricEncryptionKey_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/TestCertificate.c b/vanetza/asn1/security/r2/TestCertificate.c new file mode 100644 index 000000000..0a1b04076 --- /dev/null +++ b/vanetza/asn1/security/r2/TestCertificate.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "TestCertificate.h" + +int +Vanetza_Security2_TestCertificate_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 Vanetza_Security2_Certificate, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_TestCertificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_TestCertificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_TestCertificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TestCertificate = { + "TestCertificate", + "TestCertificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_TestCertificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_TestCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_TestCertificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_TestCertificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_TestCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_TestCertificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_TestCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_TestCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_TestCertificate_constraint + }, + asn_MBR_Vanetza_Security2_CertificateBase_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CertificateBase_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/TestCertificate.h b/vanetza/asn1/security/r2/TestCertificate.h new file mode 100644 index 000000000..29dccb1b3 --- /dev/null +++ b/vanetza/asn1/security/r2/TestCertificate.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_TestCertificate_H_ +#define _Vanetza_Security2_TestCertificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Certificate.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_TestCertificate */ +typedef Vanetza_Security2_Certificate_t Vanetza_Security2_TestCertificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TestCertificate; +asn_struct_free_f Vanetza_Security2_TestCertificate_free; +asn_struct_print_f Vanetza_Security2_TestCertificate_print; +asn_constr_check_f Vanetza_Security2_TestCertificate_constraint; +ber_type_decoder_f Vanetza_Security2_TestCertificate_decode_ber; +der_type_encoder_f Vanetza_Security2_TestCertificate_encode_der; +xer_type_decoder_f Vanetza_Security2_TestCertificate_decode_xer; +xer_type_encoder_f Vanetza_Security2_TestCertificate_encode_xer; +jer_type_encoder_f Vanetza_Security2_TestCertificate_encode_jer; +oer_type_decoder_f Vanetza_Security2_TestCertificate_decode_oer; +oer_type_encoder_f Vanetza_Security2_TestCertificate_encode_oer; +per_type_decoder_f Vanetza_Security2_TestCertificate_decode_uper; +per_type_encoder_f Vanetza_Security2_TestCertificate_encode_uper; +per_type_decoder_f Vanetza_Security2_TestCertificate_decode_aper; +per_type_encoder_f Vanetza_Security2_TestCertificate_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_TestCertificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/TestSecurityMgmtSsp.c b/vanetza/asn1/security/r2/TestSecurityMgmtSsp.c new file mode 100644 index 000000000..e5ec6fbb9 --- /dev/null +++ b/vanetza/asn1/security/r2/TestSecurityMgmtSsp.c @@ -0,0 +1,50 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "TestSecurityMgmtSsp.h" + +/* + * This type is implemented using Vanetza_Security2_SecurityMgmtSsp, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_TestSecurityMgmtSsp_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_TestSecurityMgmtSsp_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 12 } /* (0..12,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TestSecurityMgmtSsp = { + "TestSecurityMgmtSsp", + "TestSecurityMgmtSsp", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_SecurityMgmtSsp_1, + 14, /* Elements count */ + &asn_SPC_Vanetza_Security2_SecurityMgmtSsp_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/TestSecurityMgmtSsp.h b/vanetza/asn1/security/r2/TestSecurityMgmtSsp.h new file mode 100644 index 000000000..7d092b2ae --- /dev/null +++ b/vanetza/asn1/security/r2/TestSecurityMgmtSsp.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_TestSecurityMgmtSsp_H_ +#define _Vanetza_Security2_TestSecurityMgmtSsp_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SecurityMgmtSsp.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_TestSecurityMgmtSsp */ +typedef Vanetza_Security2_SecurityMgmtSsp_t Vanetza_Security2_TestSecurityMgmtSsp_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TestSecurityMgmtSsp; +asn_struct_free_f Vanetza_Security2_TestSecurityMgmtSsp_free; +asn_struct_print_f Vanetza_Security2_TestSecurityMgmtSsp_print; +asn_constr_check_f Vanetza_Security2_TestSecurityMgmtSsp_constraint; +ber_type_decoder_f Vanetza_Security2_TestSecurityMgmtSsp_decode_ber; +der_type_encoder_f Vanetza_Security2_TestSecurityMgmtSsp_encode_der; +xer_type_decoder_f Vanetza_Security2_TestSecurityMgmtSsp_decode_xer; +xer_type_encoder_f Vanetza_Security2_TestSecurityMgmtSsp_encode_xer; +jer_type_encoder_f Vanetza_Security2_TestSecurityMgmtSsp_encode_jer; +oer_type_decoder_f Vanetza_Security2_TestSecurityMgmtSsp_decode_oer; +oer_type_encoder_f Vanetza_Security2_TestSecurityMgmtSsp_encode_oer; +per_type_decoder_f Vanetza_Security2_TestSecurityMgmtSsp_decode_uper; +per_type_encoder_f Vanetza_Security2_TestSecurityMgmtSsp_encode_uper; +per_type_decoder_f Vanetza_Security2_TestSecurityMgmtSsp_decode_aper; +per_type_encoder_f Vanetza_Security2_TestSecurityMgmtSsp_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_TestSecurityMgmtSsp_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ThreeDLocation.c b/vanetza/asn1/security/r2/ThreeDLocation.c new file mode 100644 index 000000000..c01aec77b --- /dev/null +++ b/vanetza/asn1/security/r2/ThreeDLocation.c @@ -0,0 +1,114 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ThreeDLocation.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ThreeDLocation_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ThreeDLocation, latitude), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Latitude, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "latitude" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ThreeDLocation, longitude), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Longitude, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "longitude" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ThreeDLocation, elevation), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Elevation, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "elevation" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ThreeDLocation_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* latitude */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* longitude */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* elevation */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ThreeDLocation_specs_1 = { + sizeof(struct Vanetza_Security2_ThreeDLocation), + offsetof(struct Vanetza_Security2_ThreeDLocation, _asn_ctx), + asn_MAP_Vanetza_Security2_ThreeDLocation_tag2el_1, + 3, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ThreeDLocation = { + "ThreeDLocation", + "ThreeDLocation", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ThreeDLocation_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ThreeDLocation_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_ThreeDLocation_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ThreeDLocation.h b/vanetza/asn1/security/r2/ThreeDLocation.h new file mode 100644 index 000000000..7b8c62ddb --- /dev/null +++ b/vanetza/asn1/security/r2/ThreeDLocation.h @@ -0,0 +1,44 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ThreeDLocation_H_ +#define _Vanetza_Security2_ThreeDLocation_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Latitude.h" +#include "Longitude.h" +#include "Elevation.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ThreeDLocation */ +typedef struct Vanetza_Security2_ThreeDLocation { + Vanetza_Security2_Latitude_t latitude; + Vanetza_Security2_Longitude_t longitude; + Vanetza_Security2_Elevation_t elevation; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ThreeDLocation_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ThreeDLocation; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ThreeDLocation_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ThreeDLocation_1[3]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ThreeDLocation_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Time32.c b/vanetza/asn1/security/r2/Time32.c new file mode 100644 index 000000000..89c42736c --- /dev/null +++ b/vanetza/asn1/security/r2/Time32.c @@ -0,0 +1,70 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Time32.h" + +int +Vanetza_Security2_Time32_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; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using Vanetza_Security2_Uint32, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Time32_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Time32_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Time32_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Time32 = { + "Time32", + "Time32", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Time32_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Time32_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Time32_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Time32_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Time32_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Time32_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Time32_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Time32_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Time32_constraint + }, + 0, 0, /* No members */ + &asn_SPC_Vanetza_Security2_Uint32_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Time32.h b/vanetza/asn1/security/r2/Time32.h new file mode 100644 index 000000000..744e60fe5 --- /dev/null +++ b/vanetza/asn1/security/r2/Time32.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Time32_H_ +#define _Vanetza_Security2_Time32_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint32.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Time32 */ +typedef Vanetza_Security2_Uint32_t Vanetza_Security2_Time32_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Time32_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Time32; +asn_struct_free_f Vanetza_Security2_Time32_free; +asn_struct_print_f Vanetza_Security2_Time32_print; +asn_constr_check_f Vanetza_Security2_Time32_constraint; +ber_type_decoder_f Vanetza_Security2_Time32_decode_ber; +der_type_encoder_f Vanetza_Security2_Time32_encode_der; +xer_type_decoder_f Vanetza_Security2_Time32_decode_xer; +xer_type_encoder_f Vanetza_Security2_Time32_encode_xer; +jer_type_encoder_f Vanetza_Security2_Time32_encode_jer; +oer_type_decoder_f Vanetza_Security2_Time32_decode_oer; +oer_type_encoder_f Vanetza_Security2_Time32_encode_oer; +per_type_decoder_f Vanetza_Security2_Time32_decode_uper; +per_type_encoder_f Vanetza_Security2_Time32_encode_uper; +per_type_decoder_f Vanetza_Security2_Time32_decode_aper; +per_type_encoder_f Vanetza_Security2_Time32_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Time32_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Time64.c b/vanetza/asn1/security/r2/Time64.c new file mode 100644 index 000000000..19bc49219 --- /dev/null +++ b/vanetza/asn1/security/r2/Time64.c @@ -0,0 +1,85 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Time64.h" + +int +Vanetza_Security2_Time64_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const Vanetza_Security2_Uint64_t *st = (const Vanetza_Security2_Uint64_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0L && value <= 18446744073709551615L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Uint64, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Time64_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..18446744073709551615) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Time64_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 64, -1, 0, 18446744073709551615 } /* (0..18446744073709551615) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Time64_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Time64 = { + "Time64", + "Time64", + &asn_OP_INTEGER, + asn_DEF_Vanetza_Security2_Time64_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Time64_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Time64_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Time64_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Time64_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Time64_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Time64_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Time64_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Time64_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Time64.h b/vanetza/asn1/security/r2/Time64.h new file mode 100644 index 000000000..f355ffd50 --- /dev/null +++ b/vanetza/asn1/security/r2/Time64.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Time64_H_ +#define _Vanetza_Security2_Time64_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint64.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Time64 */ +typedef Vanetza_Security2_Uint64_t Vanetza_Security2_Time64_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Time64_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Time64; +asn_struct_free_f Vanetza_Security2_Time64_free; +asn_struct_print_f Vanetza_Security2_Time64_print; +asn_constr_check_f Vanetza_Security2_Time64_constraint; +ber_type_decoder_f Vanetza_Security2_Time64_decode_ber; +der_type_encoder_f Vanetza_Security2_Time64_encode_der; +xer_type_decoder_f Vanetza_Security2_Time64_decode_xer; +xer_type_encoder_f Vanetza_Security2_Time64_encode_xer; +jer_type_encoder_f Vanetza_Security2_Time64_encode_jer; +oer_type_decoder_f Vanetza_Security2_Time64_decode_oer; +oer_type_encoder_f Vanetza_Security2_Time64_encode_oer; +per_type_decoder_f Vanetza_Security2_Time64_decode_uper; +per_type_encoder_f Vanetza_Security2_Time64_encode_uper; +per_type_decoder_f Vanetza_Security2_Time64_decode_aper; +per_type_encoder_f Vanetza_Security2_Time64_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Time64_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/TlmEntry.c b/vanetza/asn1/security/r2/TlmEntry.c new file mode 100644 index 000000000..2f43f895a --- /dev/null +++ b/vanetza/asn1/security/r2/TlmEntry.c @@ -0,0 +1,116 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "TlmEntry.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_TlmEntry_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TlmEntry, selfSignedTLMCertificate), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "selfSignedTLMCertificate" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_TlmEntry, successorTo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EtsiTs103097Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "successorTo" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TlmEntry, accessPoint), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Url, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "accessPoint" + }, +}; +static const int asn_MAP_Vanetza_Security2_TlmEntry_oms_1[] = { 1 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_TlmEntry_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_TlmEntry_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* selfSignedTLMCertificate */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* successorTo */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* accessPoint */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_TlmEntry_specs_1 = { + sizeof(struct Vanetza_Security2_TlmEntry), + offsetof(struct Vanetza_Security2_TlmEntry, _asn_ctx), + asn_MAP_Vanetza_Security2_TlmEntry_tag2el_1, + 3, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_TlmEntry_oms_1, /* Optional members */ + 1, 0, /* Root/Additions */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TlmEntry = { + "TlmEntry", + "TlmEntry", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_TlmEntry_tags_1, + sizeof(asn_DEF_Vanetza_Security2_TlmEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_TlmEntry_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_TlmEntry_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_TlmEntry_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_TlmEntry_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_TlmEntry_1, + 3, /* Elements count */ + &asn_SPC_Vanetza_Security2_TlmEntry_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/TlmEntry.h b/vanetza/asn1/security/r2/TlmEntry.h new file mode 100644 index 000000000..f45378dbb --- /dev/null +++ b/vanetza/asn1/security/r2/TlmEntry.h @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_TlmEntry_H_ +#define _Vanetza_Security2_TlmEntry_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "EtsiTs103097Certificate.h" +#include "Url.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_EtsiTs103097Certificate; + +/* Vanetza_Security2_TlmEntry */ +typedef struct Vanetza_Security2_TlmEntry { + Vanetza_Security2_EtsiTs103097Certificate_t selfSignedTLMCertificate; + struct Vanetza_Security2_EtsiTs103097Certificate *successorTo; /* OPTIONAL */ + Vanetza_Security2_Url_t accessPoint; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_TlmEntry_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TlmEntry; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_TlmEntry_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_TlmEntry_1[3]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "EtsiTs103097Certificate.h" + +#endif /* _Vanetza_Security2_TlmEntry_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedCertificate.c b/vanetza/asn1/security/r2/ToBeSignedCertificate.c new file mode 100644 index 000000000..b01fd48e9 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedCertificate.c @@ -0,0 +1,448 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedCertificate.h" + +static int +memb_Vanetza_Security2_flags_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const BIT_STRING_t *st = (const BIT_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; + } + + if(st->size > 0) { + /* Size in bits */ + size = 8 * st->size - (st->bits_unused & 0x07); + } else { + size = 0; + } + + if((size == 8UL)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_memb_Vanetza_Security2_flags_constr_15 CC_NOTUSED = { + { 0, 0 }, + 8 /* (SIZE(8..8)) */}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_memb_Vanetza_Security2_flags_constr_15 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) +static asn_jer_constraints_t asn_JER_memb_Vanetza_Security2_flags_constr_15 CC_NOTUSED = { + 8}; +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ToBeSignedCertificate_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedCertificate_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedCertificate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, id), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CertificateId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "id" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, cracaId), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId3, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "cracaId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, crlSeries), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CrlSeries, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crlSeries" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, validityPeriod), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ValidityPeriod, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "validityPeriod" + }, + { ATF_POINTER, 7, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, region), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_GeographicRegion, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "region" + }, + { ATF_POINTER, 6, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, assuranceLevel), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SubjectAssurance, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "assuranceLevel" + }, + { ATF_POINTER, 5, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, appPermissions), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsidSsp, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "appPermissions" + }, + { ATF_POINTER, 4, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, certIssuePermissions), + (ASN_TAG_CLASS_CONTEXT | (7 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certIssuePermissions" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, certRequestPermissions), + (ASN_TAG_CLASS_CONTEXT | (8 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfPsidGroupPermissions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certRequestPermissions" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, canRequestRollover), + (ASN_TAG_CLASS_CONTEXT | (9 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_NULL, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "canRequestRollover" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, encryptionKey), + (ASN_TAG_CLASS_CONTEXT | (10 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicEncryptionKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "encryptionKey" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, verifyKeyIndicator), + (ASN_TAG_CLASS_CONTEXT | (11 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_VerificationKeyIndicator, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "verifyKeyIndicator" + }, + { ATF_POINTER, 4, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, flags), + (ASN_TAG_CLASS_CONTEXT | (12 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_BIT_STRING, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_memb_Vanetza_Security2_flags_constr_15, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_memb_Vanetza_Security2_flags_constr_15, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + &asn_JER_memb_Vanetza_Security2_flags_constr_15, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + memb_Vanetza_Security2_flags_constraint_1 + }, + 0, 0, /* No default value */ + "flags" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, appExtensions), + (ASN_TAG_CLASS_CONTEXT | (13 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfAppExtensions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "appExtensions" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, certIssueExtensions), + (ASN_TAG_CLASS_CONTEXT | (14 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfCertIssueExtensions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certIssueExtensions" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_ToBeSignedCertificate, certRequestExtension), + (ASN_TAG_CLASS_CONTEXT | (15 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfCertRequestExtensions, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certRequestExtension" + }, +}; +static const int asn_MAP_Vanetza_Security2_ToBeSignedCertificate_oms_1[] = { 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedCertificate_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cracaId */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* crlSeries */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* validityPeriod */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* region */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* assuranceLevel */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* appPermissions */ + { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 }, /* certIssuePermissions */ + { (ASN_TAG_CLASS_CONTEXT | (8 << 2)), 8, 0, 0 }, /* certRequestPermissions */ + { (ASN_TAG_CLASS_CONTEXT | (9 << 2)), 9, 0, 0 }, /* canRequestRollover */ + { (ASN_TAG_CLASS_CONTEXT | (10 << 2)), 10, 0, 0 }, /* encryptionKey */ + { (ASN_TAG_CLASS_CONTEXT | (11 << 2)), 11, 0, 0 }, /* verifyKeyIndicator */ + { (ASN_TAG_CLASS_CONTEXT | (12 << 2)), 12, 0, 0 }, /* flags */ + { (ASN_TAG_CLASS_CONTEXT | (13 << 2)), 13, 0, 0 }, /* appExtensions */ + { (ASN_TAG_CLASS_CONTEXT | (14 << 2)), 14, 0, 0 }, /* certIssueExtensions */ + { (ASN_TAG_CLASS_CONTEXT | (15 << 2)), 15, 0, 0 } /* certRequestExtension */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedCertificate_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedCertificate), + offsetof(struct Vanetza_Security2_ToBeSignedCertificate, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedCertificate_tag2el_1, + 16, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_ToBeSignedCertificate_oms_1, /* Optional members */ + 7, 4, /* Root/Additions */ + 12, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedCertificate = { + "ToBeSignedCertificate", + "ToBeSignedCertificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCertificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ToBeSignedCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ToBeSignedCertificate_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedCertificate_1, + 16, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedCertificate_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedCertificate.h b/vanetza/asn1/security/r2/ToBeSignedCertificate.h new file mode 100644 index 000000000..232ef26f1 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedCertificate.h @@ -0,0 +1,90 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedCertificate_H_ +#define _Vanetza_Security2_ToBeSignedCertificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CertificateId.h" +#include "HashedId3.h" +#include "CrlSeries.h" +#include "ValidityPeriod.h" +#include "SubjectAssurance.h" +#include "NULL.h" +#include "VerificationKeyIndicator.h" +#include "BIT_STRING.h" +#include "SequenceOfAppExtensions.h" +#include "SequenceOfCertIssueExtensions.h" +#include "SequenceOfCertRequestExtensions.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_ToBeSignedCertificate__flags { + Vanetza_Security2_ToBeSignedCertificate__flags_usesCubk = 0 +} e_Vanetza_Security2_ToBeSignedCertificate__flags; + +/* Forward declarations */ +struct Vanetza_Security2_GeographicRegion; +struct Vanetza_Security2_SequenceOfPsidSsp; +struct Vanetza_Security2_SequenceOfPsidGroupPermissions; +struct Vanetza_Security2_PublicEncryptionKey; +struct Vanetza_Security2_SequenceOfAppExtensions; +struct Vanetza_Security2_SequenceOfCertIssueExtensions; +struct Vanetza_Security2_SequenceOfCertRequestExtensions; + +/* Vanetza_Security2_ToBeSignedCertificate */ +typedef struct Vanetza_Security2_ToBeSignedCertificate { + Vanetza_Security2_CertificateId_t id; + Vanetza_Security2_HashedId3_t cracaId; + Vanetza_Security2_CrlSeries_t crlSeries; + Vanetza_Security2_ValidityPeriod_t validityPeriod; + struct Vanetza_Security2_GeographicRegion *region; /* OPTIONAL */ + Vanetza_Security2_SubjectAssurance_t *assuranceLevel; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfPsidSsp *appPermissions; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfPsidGroupPermissions *certIssuePermissions; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfPsidGroupPermissions *certRequestPermissions; /* OPTIONAL */ + NULL_t *canRequestRollover; /* OPTIONAL */ + struct Vanetza_Security2_PublicEncryptionKey *encryptionKey; /* OPTIONAL */ + Vanetza_Security2_VerificationKeyIndicator_t verifyKeyIndicator; + /* + * This type is extensible, + * possible extensions are below. + */ + BIT_STRING_t *flags; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfAppExtensions *appExtensions; + struct Vanetza_Security2_SequenceOfCertIssueExtensions *certIssueExtensions; + struct Vanetza_Security2_SequenceOfCertRequestExtensions *certRequestExtension; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedCertificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedCertificate; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedCertificate_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedCertificate_1[16]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedCertificate_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "GeographicRegion.h" +#include "SequenceOfPsidSsp.h" +#include "SequenceOfPsidGroupPermissions.h" +#include "PublicEncryptionKey.h" + +#endif /* _Vanetza_Security2_ToBeSignedCertificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedCrl.c b/vanetza/asn1/security/r2/ToBeSignedCrl.c new file mode 100644 index 000000000..01a76ab6d --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedCrl.c @@ -0,0 +1,194 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedCrl.h" + +static asn_TYPE_member_t asn_MBR_Vanetza_Security2_entries_5[] = { + { ATF_POINTER, 0, 0, + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), + 0, + &asn_DEF_Vanetza_Security2_CrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_entries_tags_5[] = { + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static asn_SET_OF_specifics_t asn_SPC_Vanetza_Security2_entries_specs_5 = { + sizeof(struct Vanetza_Security2_ToBeSignedCrl__entries), + offsetof(struct Vanetza_Security2_ToBeSignedCrl__entries, _asn_ctx), + 0, /* XER encoding is XMLDelimitedItemList */ +}; +static /* Use -fall-defs-global to expose */ +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_entries_5 = { + "entries", + "entries", + &asn_OP_SEQUENCE_OF, + asn_DEF_Vanetza_Security2_entries_tags_5, + sizeof(asn_DEF_Vanetza_Security2_entries_tags_5) + /sizeof(asn_DEF_Vanetza_Security2_entries_tags_5[0]) - 1, /* 1 */ + asn_DEF_Vanetza_Security2_entries_tags_5, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_entries_tags_5) + /sizeof(asn_DEF_Vanetza_Security2_entries_tags_5[0]), /* 2 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_OF_constraint + }, + asn_MBR_Vanetza_Security2_entries_5, + 1, /* Single element */ + &asn_SPC_Vanetza_Security2_entries_specs_5 /* Additional specs */ +}; + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedCrl_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCrl, version), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Version, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "version" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCrl, thisUpdate), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "thisUpdate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCrl, nextUpdate), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "nextUpdate" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCrl, entries), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + 0, + &asn_DEF_Vanetza_Security2_entries_5, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "entries" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedCrl_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* version */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* thisUpdate */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nextUpdate */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* entries */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedCrl_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedCrl), + offsetof(struct Vanetza_Security2_ToBeSignedCrl, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedCrl_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedCrl = { + "ToBeSignedCrl", + "ToBeSignedCrl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCrl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedCrl_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedCrl_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedCrl.h b/vanetza/asn1/security/r2/ToBeSignedCrl.h new file mode 100644 index 000000000..6540af217 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedCrl.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedCrl_H_ +#define _Vanetza_Security2_ToBeSignedCrl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Version.h" +#include "Time32.h" +#include "CrlEntry.h" +#include "asn_SEQUENCE_OF.h" +#include "constr_SEQUENCE_OF.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedCrl */ +typedef struct Vanetza_Security2_ToBeSignedCrl { + Vanetza_Security2_Version_t version; + Vanetza_Security2_Time32_t thisUpdate; + Vanetza_Security2_Time32_t nextUpdate; + struct Vanetza_Security2_ToBeSignedCrl__entries { + A_SEQUENCE_OF(Vanetza_Security2_CrlEntry_t) list; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; + } entries; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedCrl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedCrl; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedCrl_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedCrl_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedCrl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedCtlSignature.c b/vanetza/asn1/security/r2/ToBeSignedCtlSignature.c new file mode 100644 index 000000000..0e61d8a50 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedCtlSignature.c @@ -0,0 +1,135 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedCtlSignature.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedCtlSignature_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCtlSignature, ctlSeriesId), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlSeriesId, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ctlSeriesId" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCtlSignature, ctlType), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Ieee1609dot2dot1MsctlType, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "ctlType" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCtlSignature, sequenceNumber), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_CtlSequenceNumber, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "sequenceNumber" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedCtlSignature, tbsCtlHash), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedId48, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "tbsCtlHash" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedCtlSignature_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ctlSeriesId */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ctlType */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sequenceNumber */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* tbsCtlHash */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedCtlSignature_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedCtlSignature), + offsetof(struct Vanetza_Security2_ToBeSignedCtlSignature, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedCtlSignature_tag2el_1, + 4, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + -1, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature = { + "ToBeSignedCtlSignature", + "ToBeSignedCtlSignature", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedCtlSignature_1, + 4, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedCtlSignature_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedCtlSignature.h b/vanetza/asn1/security/r2/ToBeSignedCtlSignature.h new file mode 100644 index 000000000..97ca31f33 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedCtlSignature.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1CertManagement" + * found in "build.asn1/ieee/IEEE1609dot2dot1CertManagement.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedCtlSignature_H_ +#define _Vanetza_Security2_ToBeSignedCtlSignature_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlSeriesId.h" +#include "Ieee1609dot2dot1MsctlType.h" +#include "CtlSequenceNumber.h" +#include "HashedId48.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedCtlSignature */ +typedef struct Vanetza_Security2_ToBeSignedCtlSignature { + Vanetza_Security2_CtlSeriesId_t ctlSeriesId; + Vanetza_Security2_Ieee1609dot2dot1MsctlType_t ctlType; + Vanetza_Security2_CtlSequenceNumber_t sequenceNumber; + Vanetza_Security2_HashedId48_t tbsCtlHash; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedCtlSignature_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedCtlSignature; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedCtlSignature_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedCtlSignature_1[4]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedCtlSignature_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedData.c b/vanetza/asn1/security/r2/ToBeSignedData.c new file mode 100644 index 000000000..e202ca4ae --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedData.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedData.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedData_1[] = { + { ATF_POINTER, 0, offsetof(struct Vanetza_Security2_ToBeSignedData, payload), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SignedDataPayload, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "payload" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedData, headerInfo), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HeaderInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "headerInfo" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedData_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* payload */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* headerInfo */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedData_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedData), + offsetof(struct Vanetza_Security2_ToBeSignedData, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedData_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_Vanetza_Security2_ToBeSignedData = { + "ToBeSignedData", + "ToBeSignedData", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedData_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedData_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedData_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedData.h b/vanetza/asn1/security/r2/ToBeSignedData.h new file mode 100644 index 000000000..a7eb2bc90 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedData.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedData_H_ +#define _Vanetza_Security2_ToBeSignedData_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "HeaderInfo.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_SignedDataPayload; + +/* Vanetza_Security2_ToBeSignedData */ +typedef struct Vanetza_Security2_ToBeSignedData { + struct Vanetza_Security2_SignedDataPayload *payload; + Vanetza_Security2_HeaderInfo_t headerInfo; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedData_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedData; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedData_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedData_1[2]; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SignedDataPayload.h" + +#endif /* _Vanetza_Security2_ToBeSignedData_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedHashIdCrl.c b/vanetza/asn1/security/r2/ToBeSignedHashIdCrl.c new file mode 100644 index 000000000..6134e1bac --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedHashIdCrl.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedHashIdCrl.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedHashIdCrl_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedHashIdCrl, crlSerial), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "crlSerial" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedHashIdCrl, entries), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfHashBasedRevocationInfo, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "entries" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedHashIdCrl_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* crlSerial */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* entries */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedHashIdCrl_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedHashIdCrl), + offsetof(struct Vanetza_Security2_ToBeSignedHashIdCrl, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedHashIdCrl_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl = { + "ToBeSignedHashIdCrl", + "ToBeSignedHashIdCrl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedHashIdCrl_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedHashIdCrl_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedHashIdCrl.h b/vanetza/asn1/security/r2/ToBeSignedHashIdCrl.h new file mode 100644 index 000000000..ec3e36f43 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedHashIdCrl.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedHashIdCrl_H_ +#define _Vanetza_Security2_ToBeSignedHashIdCrl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint32.h" +#include "SequenceOfHashBasedRevocationInfo.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedHashIdCrl */ +typedef struct Vanetza_Security2_ToBeSignedHashIdCrl { + Vanetza_Security2_Uint32_t crlSerial; + Vanetza_Security2_SequenceOfHashBasedRevocationInfo_t entries; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedHashIdCrl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedHashIdCrl_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedHashIdCrl_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedHashIdCrl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkCertificate.c b/vanetza/asn1/security/r2/ToBeSignedLinkCertificate.c new file mode 100644 index 000000000..99da1ae8d --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkCertificate.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesLinkCertificate" + * found in "asn1/release2/TS102941v221/TypesLinkCertificate.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedLinkCertificate.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedLinkCertificate_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkCertificate, expiryTime), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "expiryTime" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkCertificate, certificateHash), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_HashedData, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificateHash" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedLinkCertificate_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* expiryTime */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* certificateHash */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedLinkCertificate_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedLinkCertificate), + offsetof(struct Vanetza_Security2_ToBeSignedLinkCertificate, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedLinkCertificate_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, 0, /* Optional elements (not needed) */ + 2, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate = { + "ToBeSignedLinkCertificate", + "ToBeSignedLinkCertificate", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedLinkCertificate_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedLinkCertificate_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkCertificate.h b/vanetza/asn1/security/r2/ToBeSignedLinkCertificate.h new file mode 100644 index 000000000..af97aa17f --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkCertificate.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesLinkCertificate" + * found in "asn1/release2/TS102941v221/TypesLinkCertificate.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedLinkCertificate_H_ +#define _Vanetza_Security2_ToBeSignedLinkCertificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Time32.h" +#include "HashedData.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedLinkCertificate */ +typedef struct Vanetza_Security2_ToBeSignedLinkCertificate { + Vanetza_Security2_Time32_t expiryTime; + Vanetza_Security2_HashedData_t certificateHash; + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedLinkCertificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificate; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedLinkCertificate_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedLinkCertificate_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedLinkCertificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkCertificateRca.c b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateRca.c new file mode 100644 index 000000000..6f03642b0 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateRca.c @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesLinkCertificate" + * found in "asn1/release2/TS102941v221/TypesLinkCertificate.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedLinkCertificateRca.h" + +/* + * This type is implemented using Vanetza_Security2_ToBeSignedLinkCertificate, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca = { + "ToBeSignedLinkCertificateRca", + "ToBeSignedLinkCertificateRca", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedLinkCertificate_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedLinkCertificate_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkCertificateRca.h b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateRca.h new file mode 100644 index 000000000..47425d4c1 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateRca.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesLinkCertificate" + * found in "asn1/release2/TS102941v221/TypesLinkCertificate.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedLinkCertificateRca_H_ +#define _Vanetza_Security2_ToBeSignedLinkCertificateRca_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ToBeSignedLinkCertificate.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedLinkCertificateRca */ +typedef Vanetza_Security2_ToBeSignedLinkCertificate_t Vanetza_Security2_ToBeSignedLinkCertificateRca_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateRca; +asn_struct_free_f Vanetza_Security2_ToBeSignedLinkCertificateRca_free; +asn_struct_print_f Vanetza_Security2_ToBeSignedLinkCertificateRca_print; +asn_constr_check_f Vanetza_Security2_ToBeSignedLinkCertificateRca_constraint; +ber_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_decode_ber; +der_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_encode_der; +xer_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_decode_xer; +xer_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_encode_xer; +jer_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_encode_jer; +oer_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_decode_oer; +oer_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_encode_oer; +per_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_decode_uper; +per_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_encode_uper; +per_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_decode_aper; +per_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateRca_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedLinkCertificateRca_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkCertificateTlm.c b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateTlm.c new file mode 100644 index 000000000..c0fb56234 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateTlm.c @@ -0,0 +1,43 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesLinkCertificate" + * found in "asn1/release2/TS102941v221/TypesLinkCertificate.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedLinkCertificateTlm.h" + +/* + * This type is implemented using Vanetza_Security2_ToBeSignedLinkCertificate, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm = { + "ToBeSignedLinkCertificateTlm", + "ToBeSignedLinkCertificateTlm", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedLinkCertificate_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedLinkCertificate_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkCertificateTlm.h b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateTlm.h new file mode 100644 index 000000000..272b684a9 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkCertificateTlm.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TypesLinkCertificate" + * found in "asn1/release2/TS102941v221/TypesLinkCertificate.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedLinkCertificateTlm_H_ +#define _Vanetza_Security2_ToBeSignedLinkCertificateTlm_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ToBeSignedLinkCertificate.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedLinkCertificateTlm */ +typedef Vanetza_Security2_ToBeSignedLinkCertificate_t Vanetza_Security2_ToBeSignedLinkCertificateTlm_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkCertificateTlm; +asn_struct_free_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_free; +asn_struct_print_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_print; +asn_constr_check_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_constraint; +ber_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_decode_ber; +der_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_encode_der; +xer_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_decode_xer; +xer_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_encode_xer; +jer_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_encode_jer; +oer_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_decode_oer; +oer_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_encode_oer; +per_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_decode_uper; +per_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_encode_uper; +per_type_decoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_decode_aper; +per_type_encoder_f Vanetza_Security2_ToBeSignedLinkCertificateTlm_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedLinkCertificateTlm_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrl.c b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrl.c new file mode 100644 index 000000000..661a01489 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrl.c @@ -0,0 +1,170 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedLinkageValueCrl.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ToBeSignedLinkageValueCrl_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedLinkageValueCrl_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedLinkageValueCrl_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl, iRev), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "iRev" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl, indexWithinI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "indexWithinI" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl, individual), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "individual" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl, groups), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "groups" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl, groupsSingleSeed), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "groupsSingleSeed" + }, +}; +static const int asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrl_oms_1[] = { 2, 3, 4 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrl_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iRev */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* indexWithinI */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* individual */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* groups */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* groupsSingleSeed */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedLinkageValueCrl_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl), + offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrl, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrl_tag2el_1, + 5, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrl_oms_1, /* Optional members */ + 2, 1, /* Root/Additions */ + 4, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl = { + "ToBeSignedLinkageValueCrl", + "ToBeSignedLinkageValueCrl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ToBeSignedLinkageValueCrl_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ToBeSignedLinkageValueCrl_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedLinkageValueCrl_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedLinkageValueCrl_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrl.h b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrl.h new file mode 100644 index 000000000..58f4ddd30 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrl.h @@ -0,0 +1,60 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedLinkageValueCrl_H_ +#define _Vanetza_Security2_ToBeSignedLinkageValueCrl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "IValue.h" +#include "Uint8.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_SequenceOfJMaxGroup; +struct Vanetza_Security2_SequenceOfGroupCrlEntry; +struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry; + +/* Vanetza_Security2_ToBeSignedLinkageValueCrl */ +typedef struct Vanetza_Security2_ToBeSignedLinkageValueCrl { + Vanetza_Security2_IValue_t iRev; + Vanetza_Security2_Uint8_t indexWithinI; + struct Vanetza_Security2_SequenceOfJMaxGroup *individual; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfGroupCrlEntry *groups; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry *groupsSingleSeed; /* OPTIONAL */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedLinkageValueCrl_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedLinkageValueCrl_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedLinkageValueCrl_1[5]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedLinkageValueCrl_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SequenceOfJMaxGroup.h" +#include "SequenceOfGroupCrlEntry.h" +#include "SequenceOfGroupSingleSeedCrlEntry.h" + +#endif /* _Vanetza_Security2_ToBeSignedLinkageValueCrl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.c b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.c new file mode 100644 index 000000000..0fd1d3b3e --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.c @@ -0,0 +1,212 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedLinkageValueCrlWithAlgIdentifier.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, iRev), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_IValue, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "iRev" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, indexWithinI), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Uint8, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "indexWithinI" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, seedEvolution), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SeedEvolutionFunctionIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "seedEvolution" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, lvGeneration), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_LvGenerationFunctionIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "lvGeneration" + }, + { ATF_POINTER, 3, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, individual), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfJMaxGroup, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "individual" + }, + { ATF_POINTER, 2, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, groups), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfGroupCrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "groups" + }, + { ATF_POINTER, 1, offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, groupsSingleSeed), + (ASN_TAG_CLASS_CONTEXT | (6 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "groupsSingleSeed" + }, +}; +static const int asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_oms_1[] = { 4, 5, 6 }; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iRev */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* indexWithinI */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* seedEvolution */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* lvGeneration */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* individual */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* groups */ + { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 } /* groupsSingleSeed */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_specs_1 = { + sizeof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier), + offsetof(struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, _asn_ctx), + asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tag2el_1, + 7, /* Count of tags in the map */ + asn_MAP_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_oms_1, /* Optional members */ + 3, 0, /* Root/Additions */ + 7, /* First extension addition */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier = { + "ToBeSignedLinkageValueCrlWithAlgIdentifier", + "ToBeSignedLinkageValueCrlWithAlgIdentifier", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_1, + 7, /* Elements count */ + &asn_SPC_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.h b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.h new file mode 100644 index 000000000..5dc1a1442 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedLinkageValueCrlWithAlgIdentifier.h @@ -0,0 +1,64 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_H_ +#define _Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "IValue.h" +#include "Uint8.h" +#include "SeedEvolutionFunctionIdentifier.h" +#include "LvGenerationFunctionIdentifier.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Forward declarations */ +struct Vanetza_Security2_SequenceOfJMaxGroup; +struct Vanetza_Security2_SequenceOfGroupCrlEntry; +struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry; + +/* Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier */ +typedef struct Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier { + Vanetza_Security2_IValue_t iRev; + Vanetza_Security2_Uint8_t indexWithinI; + Vanetza_Security2_SeedEvolutionFunctionIdentifier_t seedEvolution; + Vanetza_Security2_LvGenerationFunctionIdentifier_t lvGeneration; + struct Vanetza_Security2_SequenceOfJMaxGroup *individual; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfGroupCrlEntry *groups; /* OPTIONAL */ + struct Vanetza_Security2_SequenceOfGroupSingleSeedCrlEntry *groupsSingleSeed; /* OPTIONAL */ + /* + * This type is extensible, + * possible extensions are below. + */ + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_1[7]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_constr_1; + +#ifdef __cplusplus +} +#endif + +/* Referred external types */ +#include "SequenceOfJMaxGroup.h" +#include "SequenceOfGroupCrlEntry.h" +#include "SequenceOfGroupSingleSeedCrlEntry.h" + +#endif /* _Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedRcaCtl.c b/vanetza/asn1/security/r2/ToBeSignedRcaCtl.c new file mode 100644 index 000000000..f314ada35 --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedRcaCtl.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedRcaCtl.h" + +int +Vanetza_Security2_ToBeSignedRcaCtl_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 Vanetza_Security2_CtlFormat, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ToBeSignedRcaCtl_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedRcaCtl_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl = { + "ToBeSignedRcaCtl", + "ToBeSignedRcaCtl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ToBeSignedRcaCtl_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ToBeSignedRcaCtl_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ToBeSignedRcaCtl_constraint + }, + asn_MBR_Vanetza_Security2_CtlFormat_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlFormat_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedRcaCtl.h b/vanetza/asn1/security/r2/ToBeSignedRcaCtl.h new file mode 100644 index 000000000..30c89776a --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedRcaCtl.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedRcaCtl_H_ +#define _Vanetza_Security2_ToBeSignedRcaCtl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlFormat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedRcaCtl */ +typedef Vanetza_Security2_CtlFormat_t Vanetza_Security2_ToBeSignedRcaCtl_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedRcaCtl_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedRcaCtl; +asn_struct_free_f Vanetza_Security2_ToBeSignedRcaCtl_free; +asn_struct_print_f Vanetza_Security2_ToBeSignedRcaCtl_print; +asn_constr_check_f Vanetza_Security2_ToBeSignedRcaCtl_constraint; +ber_type_decoder_f Vanetza_Security2_ToBeSignedRcaCtl_decode_ber; +der_type_encoder_f Vanetza_Security2_ToBeSignedRcaCtl_encode_der; +xer_type_decoder_f Vanetza_Security2_ToBeSignedRcaCtl_decode_xer; +xer_type_encoder_f Vanetza_Security2_ToBeSignedRcaCtl_encode_xer; +jer_type_encoder_f Vanetza_Security2_ToBeSignedRcaCtl_encode_jer; +oer_type_decoder_f Vanetza_Security2_ToBeSignedRcaCtl_decode_oer; +oer_type_encoder_f Vanetza_Security2_ToBeSignedRcaCtl_encode_oer; +per_type_decoder_f Vanetza_Security2_ToBeSignedRcaCtl_decode_uper; +per_type_encoder_f Vanetza_Security2_ToBeSignedRcaCtl_encode_uper; +per_type_decoder_f Vanetza_Security2_ToBeSignedRcaCtl_decode_aper; +per_type_encoder_f Vanetza_Security2_ToBeSignedRcaCtl_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedRcaCtl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ToBeSignedTlmCtl.c b/vanetza/asn1/security/r2/ToBeSignedTlmCtl.c new file mode 100644 index 000000000..227b86bbb --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedTlmCtl.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ToBeSignedTlmCtl.h" + +int +Vanetza_Security2_ToBeSignedTlmCtl_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 Vanetza_Security2_CtlFormat, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_ToBeSignedTlmCtl_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedTlmCtl_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl = { + "ToBeSignedTlmCtl", + "ToBeSignedTlmCtl", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_ToBeSignedTlmCtl_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_ToBeSignedTlmCtl_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_ToBeSignedTlmCtl_constraint + }, + asn_MBR_Vanetza_Security2_CtlFormat_1, + 5, /* Elements count */ + &asn_SPC_Vanetza_Security2_CtlFormat_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ToBeSignedTlmCtl.h b/vanetza/asn1/security/r2/ToBeSignedTlmCtl.h new file mode 100644 index 000000000..a08e454df --- /dev/null +++ b/vanetza/asn1/security/r2/ToBeSignedTlmCtl.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ToBeSignedTlmCtl_H_ +#define _Vanetza_Security2_ToBeSignedTlmCtl_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "CtlFormat.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ToBeSignedTlmCtl */ +typedef Vanetza_Security2_CtlFormat_t Vanetza_Security2_ToBeSignedTlmCtl_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_ToBeSignedTlmCtl_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ToBeSignedTlmCtl; +asn_struct_free_f Vanetza_Security2_ToBeSignedTlmCtl_free; +asn_struct_print_f Vanetza_Security2_ToBeSignedTlmCtl_print; +asn_constr_check_f Vanetza_Security2_ToBeSignedTlmCtl_constraint; +ber_type_decoder_f Vanetza_Security2_ToBeSignedTlmCtl_decode_ber; +der_type_encoder_f Vanetza_Security2_ToBeSignedTlmCtl_encode_der; +xer_type_decoder_f Vanetza_Security2_ToBeSignedTlmCtl_decode_xer; +xer_type_encoder_f Vanetza_Security2_ToBeSignedTlmCtl_encode_xer; +jer_type_encoder_f Vanetza_Security2_ToBeSignedTlmCtl_encode_jer; +oer_type_decoder_f Vanetza_Security2_ToBeSignedTlmCtl_decode_oer; +oer_type_encoder_f Vanetza_Security2_ToBeSignedTlmCtl_encode_oer; +per_type_decoder_f Vanetza_Security2_ToBeSignedTlmCtl_decode_uper; +per_type_encoder_f Vanetza_Security2_ToBeSignedTlmCtl_encode_uper; +per_type_decoder_f Vanetza_Security2_ToBeSignedTlmCtl_decode_aper; +per_type_encoder_f Vanetza_Security2_ToBeSignedTlmCtl_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ToBeSignedTlmCtl_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/TwoDLocation.c b/vanetza/asn1/security/r2/TwoDLocation.c new file mode 100644 index 000000000..970ef39fd --- /dev/null +++ b/vanetza/asn1/security/r2/TwoDLocation.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "TwoDLocation.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_TwoDLocation_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TwoDLocation, latitude), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Latitude, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "latitude" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TwoDLocation, longitude), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Longitude, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "longitude" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_TwoDLocation_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_TwoDLocation_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* latitude */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* longitude */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_TwoDLocation_specs_1 = { + sizeof(struct Vanetza_Security2_TwoDLocation), + offsetof(struct Vanetza_Security2_TwoDLocation, _asn_ctx), + asn_MAP_Vanetza_Security2_TwoDLocation_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_Vanetza_Security2_TwoDLocation = { + "TwoDLocation", + "TwoDLocation", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_TwoDLocation_tags_1, + sizeof(asn_DEF_Vanetza_Security2_TwoDLocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_TwoDLocation_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_TwoDLocation_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_TwoDLocation_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_TwoDLocation_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_TwoDLocation_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_TwoDLocation_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/TwoDLocation.h b/vanetza/asn1/security/r2/TwoDLocation.h new file mode 100644 index 000000000..d21f9a8e4 --- /dev/null +++ b/vanetza/asn1/security/r2/TwoDLocation.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_TwoDLocation_H_ +#define _Vanetza_Security2_TwoDLocation_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Latitude.h" +#include "Longitude.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_TwoDLocation */ +typedef struct Vanetza_Security2_TwoDLocation { + Vanetza_Security2_Latitude_t latitude; + Vanetza_Security2_Longitude_t longitude; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_TwoDLocation_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TwoDLocation; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_TwoDLocation_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_TwoDLocation_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_TwoDLocation_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/TypeSpecificCrlContents.c b/vanetza/asn1/security/r2/TypeSpecificCrlContents.c new file mode 100644 index 000000000..8d104de15 --- /dev/null +++ b/vanetza/asn1/security/r2/TypeSpecificCrlContents.c @@ -0,0 +1,186 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "TypeSpecificCrlContents.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_TypeSpecificCrlContents_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_TypeSpecificCrlContents_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_TypeSpecificCrlContents_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, choice.fullHashCrl), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "fullHashCrl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, choice.deltaHashCrl), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedHashIdCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "deltaHashCrl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, choice.fullLinkedCrl), + (ASN_TAG_CLASS_CONTEXT | (2 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "fullLinkedCrl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, choice.deltaLinkedCrl), + (ASN_TAG_CLASS_CONTEXT | (3 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrl, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "deltaLinkedCrl" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, choice.fullLinkedCrlWithAlg), + (ASN_TAG_CLASS_CONTEXT | (4 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "fullLinkedCrlWithAlg" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, choice.deltaLinkedCrlWithAlg), + (ASN_TAG_CLASS_CONTEXT | (5 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "deltaLinkedCrlWithAlg" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_TypeSpecificCrlContents_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* fullHashCrl */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* deltaHashCrl */ + { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* fullLinkedCrl */ + { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* deltaLinkedCrl */ + { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* fullLinkedCrlWithAlg */ + { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* deltaLinkedCrlWithAlg */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_TypeSpecificCrlContents_specs_1 = { + sizeof(struct Vanetza_Security2_TypeSpecificCrlContents), + offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, _asn_ctx), + offsetof(struct Vanetza_Security2_TypeSpecificCrlContents, present), + sizeof(((struct Vanetza_Security2_TypeSpecificCrlContents *)0)->present), + asn_MAP_Vanetza_Security2_TypeSpecificCrlContents_tag2el_1, + 6, /* Count of tags in the map */ + 0, 0, + 4 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TypeSpecificCrlContents = { + "TypeSpecificCrlContents", + "TypeSpecificCrlContents", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_TypeSpecificCrlContents_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_TypeSpecificCrlContents_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_TypeSpecificCrlContents_1, + 6, /* Elements count */ + &asn_SPC_Vanetza_Security2_TypeSpecificCrlContents_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/TypeSpecificCrlContents.h b/vanetza/asn1/security/r2/TypeSpecificCrlContents.h new file mode 100644 index 000000000..4e3a3d2f1 --- /dev/null +++ b/vanetza/asn1/security/r2/TypeSpecificCrlContents.h @@ -0,0 +1,67 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2CrlBaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2crlBaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_TypeSpecificCrlContents_H_ +#define _Vanetza_Security2_TypeSpecificCrlContents_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "ToBeSignedHashIdCrl.h" +#include "ToBeSignedLinkageValueCrl.h" +#include "ToBeSignedLinkageValueCrlWithAlgIdentifier.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_TypeSpecificCrlContents_PR { + Vanetza_Security2_TypeSpecificCrlContents_PR_NOTHING, /* No components present */ + Vanetza_Security2_TypeSpecificCrlContents_PR_fullHashCrl, + Vanetza_Security2_TypeSpecificCrlContents_PR_deltaHashCrl, + Vanetza_Security2_TypeSpecificCrlContents_PR_fullLinkedCrl, + Vanetza_Security2_TypeSpecificCrlContents_PR_deltaLinkedCrl, + /* Extensions may appear below */ + Vanetza_Security2_TypeSpecificCrlContents_PR_fullLinkedCrlWithAlg, + Vanetza_Security2_TypeSpecificCrlContents_PR_deltaLinkedCrlWithAlg +} Vanetza_Security2_TypeSpecificCrlContents_PR; + +/* Vanetza_Security2_TypeSpecificCrlContents */ +typedef struct Vanetza_Security2_TypeSpecificCrlContents { + Vanetza_Security2_TypeSpecificCrlContents_PR present; + union Vanetza_Security2_TypeSpecificCrlContents_u { + Vanetza_Security2_ToBeSignedHashIdCrl_t fullHashCrl; + Vanetza_Security2_ToBeSignedHashIdCrl_t deltaHashCrl; + Vanetza_Security2_ToBeSignedLinkageValueCrl_t fullLinkedCrl; + Vanetza_Security2_ToBeSignedLinkageValueCrl_t deltaLinkedCrl; + /* + * This type is extensible, + * possible extensions are below. + */ + Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_t fullLinkedCrlWithAlg; + Vanetza_Security2_ToBeSignedLinkageValueCrlWithAlgIdentifier_t deltaLinkedCrlWithAlg; + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_TypeSpecificCrlContents_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_TypeSpecificCrlContents; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_TypeSpecificCrlContents_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_TypeSpecificCrlContents_1[6]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_TypeSpecificCrlContents_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_TypeSpecificCrlContents_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Uint16.c b/vanetza/asn1/security/r2/Uint16.c new file mode 100644 index 000000000..786c9628c --- /dev/null +++ b/vanetza/asn1/security/r2/Uint16.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Uint16.h" + +int +Vanetza_Security2_Uint16_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Uint16_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint16_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Uint16_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint16 = { + "Uint16", + "Uint16", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Uint16_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Uint16_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint16_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Uint16_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Uint16_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint16_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Uint16_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Uint16_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Uint16_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Uint16.h b/vanetza/asn1/security/r2/Uint16.h new file mode 100644 index 000000000..5019fb9e3 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint16.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Uint16_H_ +#define _Vanetza_Security2_Uint16_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Uint16 */ +typedef long Vanetza_Security2_Uint16_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint16_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint16; +asn_struct_free_f Vanetza_Security2_Uint16_free; +asn_struct_print_f Vanetza_Security2_Uint16_print; +asn_constr_check_f Vanetza_Security2_Uint16_constraint; +ber_type_decoder_f Vanetza_Security2_Uint16_decode_ber; +der_type_encoder_f Vanetza_Security2_Uint16_encode_der; +xer_type_decoder_f Vanetza_Security2_Uint16_decode_xer; +xer_type_encoder_f Vanetza_Security2_Uint16_encode_xer; +jer_type_encoder_f Vanetza_Security2_Uint16_encode_jer; +oer_type_decoder_f Vanetza_Security2_Uint16_decode_oer; +oer_type_encoder_f Vanetza_Security2_Uint16_encode_oer; +per_type_decoder_f Vanetza_Security2_Uint16_decode_uper; +per_type_encoder_f Vanetza_Security2_Uint16_encode_uper; +per_type_decoder_f Vanetza_Security2_Uint16_decode_aper; +per_type_encoder_f Vanetza_Security2_Uint16_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Uint16_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Uint3.c b/vanetza/asn1/security/r2/Uint3.c new file mode 100644 index 000000000..29383cc33 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint3.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Uint3.h" + +int +Vanetza_Security2_Uint3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 7L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Uint3_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..7) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint3_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Uint3_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint3 = { + "Uint3", + "Uint3", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Uint3_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Uint3_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint3_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Uint3_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Uint3_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint3_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Uint3_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Uint3_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Uint3_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Uint3.h b/vanetza/asn1/security/r2/Uint3.h new file mode 100644 index 000000000..e57cd9551 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint3.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Uint3_H_ +#define _Vanetza_Security2_Uint3_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Uint3 */ +typedef long Vanetza_Security2_Uint3_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint3; +asn_struct_free_f Vanetza_Security2_Uint3_free; +asn_struct_print_f Vanetza_Security2_Uint3_print; +asn_constr_check_f Vanetza_Security2_Uint3_constraint; +ber_type_decoder_f Vanetza_Security2_Uint3_decode_ber; +der_type_encoder_f Vanetza_Security2_Uint3_encode_der; +xer_type_decoder_f Vanetza_Security2_Uint3_decode_xer; +xer_type_encoder_f Vanetza_Security2_Uint3_encode_xer; +jer_type_encoder_f Vanetza_Security2_Uint3_encode_jer; +oer_type_decoder_f Vanetza_Security2_Uint3_decode_oer; +oer_type_encoder_f Vanetza_Security2_Uint3_encode_oer; +per_type_decoder_f Vanetza_Security2_Uint3_decode_uper; +per_type_encoder_f Vanetza_Security2_Uint3_encode_uper; +per_type_decoder_f Vanetza_Security2_Uint3_decode_aper; +per_type_encoder_f Vanetza_Security2_Uint3_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Uint3_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Uint32.c b/vanetza/asn1/security/r2/Uint32.c new file mode 100644 index 000000000..15eab82d4 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint32.c @@ -0,0 +1,75 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Uint32.h" + +int +Vanetza_Security2_Uint32_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; + } + + + /* Constraint check succeeded */ + return 0; +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Uint32_constr_1 CC_NOTUSED = { + { 4, 1 } /* (0..4294967295) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint32_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_Uint32_specs_1 = { + 0, 0, 0, 0, 0, + 0, /* Native long size */ + 1 /* Unsigned representation */ +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Uint32_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint32 = { + "Uint32", + "Uint32", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Uint32_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Uint32_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint32_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Uint32_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Uint32_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint32_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Uint32_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Uint32_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Uint32_constraint + }, + 0, 0, /* No members */ + &asn_SPC_Vanetza_Security2_Uint32_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/Uint32.h b/vanetza/asn1/security/r2/Uint32.h new file mode 100644 index 000000000..9b4ac9715 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint32.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Uint32_H_ +#define _Vanetza_Security2_Uint32_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Uint32 */ +typedef unsigned long Vanetza_Security2_Uint32_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint32_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint32; +extern const asn_INTEGER_specifics_t asn_SPC_Vanetza_Security2_Uint32_specs_1; +asn_struct_free_f Vanetza_Security2_Uint32_free; +asn_struct_print_f Vanetza_Security2_Uint32_print; +asn_constr_check_f Vanetza_Security2_Uint32_constraint; +ber_type_decoder_f Vanetza_Security2_Uint32_decode_ber; +der_type_encoder_f Vanetza_Security2_Uint32_encode_der; +xer_type_decoder_f Vanetza_Security2_Uint32_decode_xer; +xer_type_encoder_f Vanetza_Security2_Uint32_encode_xer; +jer_type_encoder_f Vanetza_Security2_Uint32_encode_jer; +oer_type_decoder_f Vanetza_Security2_Uint32_decode_oer; +oer_type_encoder_f Vanetza_Security2_Uint32_encode_oer; +per_type_decoder_f Vanetza_Security2_Uint32_decode_uper; +per_type_encoder_f Vanetza_Security2_Uint32_encode_uper; +per_type_decoder_f Vanetza_Security2_Uint32_decode_aper; +per_type_encoder_f Vanetza_Security2_Uint32_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Uint32_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Uint64.c b/vanetza/asn1/security/r2/Uint64.c new file mode 100644 index 000000000..00737bbc8 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint64.c @@ -0,0 +1,85 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Uint64.h" + +int +Vanetza_Security2_Uint64_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + const INTEGER_t *st = (const INTEGER_t *)sptr; + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if(asn_INTEGER2long(st, &value)) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value too large (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + if((value >= 0L && value <= 18446744073709551615L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using INTEGER, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Uint64_constr_1 CC_NOTUSED = { + { 8, 1 } /* (0..18446744073709551615) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint64_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 64, -1, 0, 18446744073709551615 } /* (0..18446744073709551615) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Uint64_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint64 = { + "Uint64", + "Uint64", + &asn_OP_INTEGER, + asn_DEF_Vanetza_Security2_Uint64_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Uint64_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint64_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Uint64_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Uint64_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint64_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Uint64_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Uint64_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Uint64_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Uint64.h b/vanetza/asn1/security/r2/Uint64.h new file mode 100644 index 000000000..1fe0a45f7 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint64.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Uint64_H_ +#define _Vanetza_Security2_Uint64_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "INTEGER.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Uint64 */ +typedef INTEGER_t Vanetza_Security2_Uint64_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint64_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint64; +asn_struct_free_f Vanetza_Security2_Uint64_free; +asn_struct_print_f Vanetza_Security2_Uint64_print; +asn_constr_check_f Vanetza_Security2_Uint64_constraint; +ber_type_decoder_f Vanetza_Security2_Uint64_decode_ber; +der_type_encoder_f Vanetza_Security2_Uint64_encode_der; +xer_type_decoder_f Vanetza_Security2_Uint64_decode_xer; +xer_type_encoder_f Vanetza_Security2_Uint64_encode_xer; +jer_type_encoder_f Vanetza_Security2_Uint64_encode_jer; +oer_type_decoder_f Vanetza_Security2_Uint64_decode_oer; +oer_type_encoder_f Vanetza_Security2_Uint64_encode_oer; +per_type_decoder_f Vanetza_Security2_Uint64_decode_uper; +per_type_encoder_f Vanetza_Security2_Uint64_encode_uper; +per_type_decoder_f Vanetza_Security2_Uint64_decode_aper; +per_type_encoder_f Vanetza_Security2_Uint64_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Uint64_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Uint8.c b/vanetza/asn1/security/r2/Uint8.c new file mode 100644 index 000000000..ba6c926f8 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint8.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Uint8.h" + +int +Vanetza_Security2_Uint8_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 255L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_Uint8_constr_1 CC_NOTUSED = { + { 1, 1 } /* (0..255) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint8_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Uint8_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint8 = { + "Uint8", + "Uint8", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Uint8_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Uint8_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint8_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Uint8_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Uint8_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Uint8_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_Uint8_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Uint8_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_Uint8_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Uint8.h b/vanetza/asn1/security/r2/Uint8.h new file mode 100644 index 000000000..5d0d22e21 --- /dev/null +++ b/vanetza/asn1/security/r2/Uint8.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Uint8_H_ +#define _Vanetza_Security2_Uint8_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Uint8 */ +typedef long Vanetza_Security2_Uint8_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Uint8_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Uint8; +asn_struct_free_f Vanetza_Security2_Uint8_free; +asn_struct_print_f Vanetza_Security2_Uint8_print; +asn_constr_check_f Vanetza_Security2_Uint8_constraint; +ber_type_decoder_f Vanetza_Security2_Uint8_decode_ber; +der_type_encoder_f Vanetza_Security2_Uint8_encode_der; +xer_type_decoder_f Vanetza_Security2_Uint8_decode_xer; +xer_type_encoder_f Vanetza_Security2_Uint8_encode_xer; +jer_type_encoder_f Vanetza_Security2_Uint8_encode_jer; +oer_type_decoder_f Vanetza_Security2_Uint8_decode_oer; +oer_type_encoder_f Vanetza_Security2_Uint8_encode_oer; +per_type_decoder_f Vanetza_Security2_Uint8_decode_uper; +per_type_encoder_f Vanetza_Security2_Uint8_encode_uper; +per_type_decoder_f Vanetza_Security2_Uint8_decode_aper; +per_type_encoder_f Vanetza_Security2_Uint8_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Uint8_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/UnCountryId.c b/vanetza/asn1/security/r2/UnCountryId.c new file mode 100644 index 000000000..895ef6b62 --- /dev/null +++ b/vanetza/asn1/security/r2/UnCountryId.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "UnCountryId.h" + +int +Vanetza_Security2_UnCountryId_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value >= 0L && value <= 65535L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_Uint16, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_UnCountryId_constr_1 CC_NOTUSED = { + { 2, 1 } /* (0..65535) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_UnCountryId_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_UnCountryId_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnCountryId = { + "UnCountryId", + "UnCountryId", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_UnCountryId_tags_1, + sizeof(asn_DEF_Vanetza_Security2_UnCountryId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnCountryId_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_UnCountryId_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_UnCountryId_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnCountryId_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_UnCountryId_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_UnCountryId_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_UnCountryId_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/UnCountryId.h b/vanetza/asn1/security/r2/UnCountryId.h new file mode 100644 index 000000000..da4540638 --- /dev/null +++ b/vanetza/asn1/security/r2/UnCountryId.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_UnCountryId_H_ +#define _Vanetza_Security2_UnCountryId_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Uint16.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_UnCountryId */ +typedef Vanetza_Security2_Uint16_t Vanetza_Security2_UnCountryId_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_UnCountryId_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnCountryId; +asn_struct_free_f Vanetza_Security2_UnCountryId_free; +asn_struct_print_f Vanetza_Security2_UnCountryId_print; +asn_constr_check_f Vanetza_Security2_UnCountryId_constraint; +ber_type_decoder_f Vanetza_Security2_UnCountryId_decode_ber; +der_type_encoder_f Vanetza_Security2_UnCountryId_encode_der; +xer_type_decoder_f Vanetza_Security2_UnCountryId_decode_xer; +xer_type_encoder_f Vanetza_Security2_UnCountryId_encode_xer; +jer_type_encoder_f Vanetza_Security2_UnCountryId_encode_jer; +oer_type_decoder_f Vanetza_Security2_UnCountryId_decode_oer; +oer_type_encoder_f Vanetza_Security2_UnCountryId_encode_oer; +per_type_decoder_f Vanetza_Security2_UnCountryId_decode_uper; +per_type_encoder_f Vanetza_Security2_UnCountryId_encode_uper; +per_type_decoder_f Vanetza_Security2_UnCountryId_decode_aper; +per_type_encoder_f Vanetza_Security2_UnCountryId_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_UnCountryId_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/UnknownLatitude.c b/vanetza/asn1/security/r2/UnknownLatitude.c new file mode 100644 index 000000000..e678d6d81 --- /dev/null +++ b/vanetza/asn1/security/r2/UnknownLatitude.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "UnknownLatitude.h" + +int +Vanetza_Security2_UnknownLatitude_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 900000001L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_NinetyDegreeInt, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_UnknownLatitude_constr_1 CC_NOTUSED = { + { 4, 1 } /* (900000001..900000001) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_UnknownLatitude_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 0, -1, 900000001, 900000001 } /* (900000001..900000001) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnknownLatitude = { + "UnknownLatitude", + "UnknownLatitude", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1, + sizeof(asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnknownLatitude_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_UnknownLatitude_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_UnknownLatitude_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_UnknownLatitude_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/UnknownLatitude.h b/vanetza/asn1/security/r2/UnknownLatitude.h new file mode 100644 index 000000000..a2cb50b25 --- /dev/null +++ b/vanetza/asn1/security/r2/UnknownLatitude.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_UnknownLatitude_H_ +#define _Vanetza_Security2_UnknownLatitude_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NinetyDegreeInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_UnknownLatitude */ +typedef Vanetza_Security2_NinetyDegreeInt_t Vanetza_Security2_UnknownLatitude_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnknownLatitude; +asn_struct_free_f Vanetza_Security2_UnknownLatitude_free; +asn_struct_print_f Vanetza_Security2_UnknownLatitude_print; +asn_constr_check_f Vanetza_Security2_UnknownLatitude_constraint; +ber_type_decoder_f Vanetza_Security2_UnknownLatitude_decode_ber; +der_type_encoder_f Vanetza_Security2_UnknownLatitude_encode_der; +xer_type_decoder_f Vanetza_Security2_UnknownLatitude_decode_xer; +xer_type_encoder_f Vanetza_Security2_UnknownLatitude_encode_xer; +jer_type_encoder_f Vanetza_Security2_UnknownLatitude_encode_jer; +oer_type_decoder_f Vanetza_Security2_UnknownLatitude_decode_oer; +oer_type_encoder_f Vanetza_Security2_UnknownLatitude_encode_oer; +per_type_decoder_f Vanetza_Security2_UnknownLatitude_decode_uper; +per_type_encoder_f Vanetza_Security2_UnknownLatitude_encode_uper; +per_type_decoder_f Vanetza_Security2_UnknownLatitude_decode_aper; +per_type_encoder_f Vanetza_Security2_UnknownLatitude_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_UnknownLatitude_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/UnknownLongitude.c b/vanetza/asn1/security/r2/UnknownLongitude.c new file mode 100644 index 000000000..81dac1fe7 --- /dev/null +++ b/vanetza/asn1/security/r2/UnknownLongitude.c @@ -0,0 +1,79 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "UnknownLongitude.h" + +int +Vanetza_Security2_UnknownLongitude_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, + asn_app_constraint_failed_f *ctfailcb, void *app_key) { + long value; + + if(!sptr) { + ASN__CTFAIL(app_key, td, sptr, + "%s: value not given (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } + + value = *(const long *)sptr; + + if((value == 1800000001L)) { + /* Constraint check succeeded */ + return 0; + } else { + ASN__CTFAIL(app_key, td, sptr, + "%s: constraint failed (%s:%d)", + td->name, __FILE__, __LINE__); + return -1; + } +} + +/* + * This type is implemented using Vanetza_Security2_OneEightyDegreeInt, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_UnknownLongitude_constr_1 CC_NOTUSED = { + { 4, 1 } /* (1800000001..1800000001) */, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_UnknownLongitude_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 0, -1, 1800000001, 1800000001 } /* (1800000001..1800000001) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnknownLongitude = { + "UnknownLongitude", + "UnknownLongitude", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1, + sizeof(asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnknownLongitude_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_UnknownLongitude_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_UnknownLongitude_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_UnknownLongitude_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/UnknownLongitude.h b/vanetza/asn1/security/r2/UnknownLongitude.h new file mode 100644 index 000000000..58b0bd584 --- /dev/null +++ b/vanetza/asn1/security/r2/UnknownLongitude.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_UnknownLongitude_H_ +#define _Vanetza_Security2_UnknownLongitude_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OneEightyDegreeInt.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_UnknownLongitude */ +typedef Vanetza_Security2_OneEightyDegreeInt_t Vanetza_Security2_UnknownLongitude_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnknownLongitude; +asn_struct_free_f Vanetza_Security2_UnknownLongitude_free; +asn_struct_print_f Vanetza_Security2_UnknownLongitude_print; +asn_constr_check_f Vanetza_Security2_UnknownLongitude_constraint; +ber_type_decoder_f Vanetza_Security2_UnknownLongitude_decode_ber; +der_type_encoder_f Vanetza_Security2_UnknownLongitude_encode_der; +xer_type_decoder_f Vanetza_Security2_UnknownLongitude_decode_xer; +xer_type_encoder_f Vanetza_Security2_UnknownLongitude_encode_xer; +jer_type_encoder_f Vanetza_Security2_UnknownLongitude_encode_jer; +oer_type_decoder_f Vanetza_Security2_UnknownLongitude_decode_oer; +oer_type_encoder_f Vanetza_Security2_UnknownLongitude_encode_oer; +per_type_decoder_f Vanetza_Security2_UnknownLongitude_decode_uper; +per_type_encoder_f Vanetza_Security2_UnknownLongitude_encode_uper; +per_type_decoder_f Vanetza_Security2_UnknownLongitude_decode_aper; +per_type_encoder_f Vanetza_Security2_UnknownLongitude_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_UnknownLongitude_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/UnsecuredAprvBinaryTree.c b/vanetza/asn1/security/r2/UnsecuredAprvBinaryTree.c new file mode 100644 index 000000000..62bca431d --- /dev/null +++ b/vanetza/asn1/security/r2/UnsecuredAprvBinaryTree.c @@ -0,0 +1,74 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "UnsecuredAprvBinaryTree.h" + +int +Vanetza_Security2_UnsecuredAprvBinaryTree_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 Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_UnsecuredAprvBinaryTree_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +static asn_per_constraints_t asn_PER_type_Vanetza_Security2_UnsecuredAprvBinaryTree_constr_1 CC_NOTUSED = { + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree = { + "UnsecuredAprvBinaryTree", + "UnsecuredAprvBinaryTree", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1, + sizeof(asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_UnsecuredAprvBinaryTree_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_UnsecuredAprvBinaryTree_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + Vanetza_Security2_UnsecuredAprvBinaryTree_constraint + }, + asn_MBR_Vanetza_Security2_Ieee1609Dot2Data_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_Ieee1609Dot2Data_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/UnsecuredAprvBinaryTree.h b/vanetza/asn1/security/r2/UnsecuredAprvBinaryTree.h new file mode 100644 index 000000000..7eedb6e4c --- /dev/null +++ b/vanetza/asn1/security/r2/UnsecuredAprvBinaryTree.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Acpc" + * found in "build.asn1/ieee/IEEE1609dot2dot1Acpc.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_UnsecuredAprvBinaryTree_H_ +#define _Vanetza_Security2_UnsecuredAprvBinaryTree_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Ieee1609Dot2Data-Unsecured.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_UnsecuredAprvBinaryTree */ +typedef Vanetza_Security2_Ieee1609Dot2Data_Unsecured_216P1_t Vanetza_Security2_UnsecuredAprvBinaryTree_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_UnsecuredAprvBinaryTree; +asn_struct_free_f Vanetza_Security2_UnsecuredAprvBinaryTree_free; +asn_struct_print_f Vanetza_Security2_UnsecuredAprvBinaryTree_print; +asn_constr_check_f Vanetza_Security2_UnsecuredAprvBinaryTree_constraint; +ber_type_decoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_decode_ber; +der_type_encoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_encode_der; +xer_type_decoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_decode_xer; +xer_type_encoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_encode_xer; +jer_type_encoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_encode_jer; +oer_type_decoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_decode_oer; +oer_type_encoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_encode_oer; +per_type_decoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_decode_uper; +per_type_encoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_encode_uper; +per_type_decoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_decode_aper; +per_type_encoder_f Vanetza_Security2_UnsecuredAprvBinaryTree_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_UnsecuredAprvBinaryTree_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Url.c b/vanetza/asn1/security/r2/Url.c new file mode 100644 index 000000000..7cfc95c60 --- /dev/null +++ b/vanetza/asn1/security/r2/Url.c @@ -0,0 +1,49 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Url.h" + +/* + * This type is implemented using IA5String, + * so here we adjust the DEF accordingly. + */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_Url_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED, 7, 7, 0, 127 } /* (0..127) */, + { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */, + 0, 0 /* No PER character map necessary */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Url_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (22 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Url = { + "Url", + "Url", + &asn_OP_IA5String, + asn_DEF_Vanetza_Security2_Url_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Url_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Url_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Url_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Url_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Url_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_Url_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + IA5String_constraint + }, + 0, 0, /* No members */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Url.h b/vanetza/asn1/security/r2/Url.h new file mode 100644 index 000000000..e5865445d --- /dev/null +++ b/vanetza/asn1/security/r2/Url.h @@ -0,0 +1,47 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941TrustLists" + * found in "asn1/release2/TS102941v221/TrustLists.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Url_H_ +#define _Vanetza_Security2_Url_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "IA5String.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_Url */ +typedef IA5String_t Vanetza_Security2_Url_t; + +/* Implementation */ +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_Url_constr_1; +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Url; +asn_struct_free_f Vanetza_Security2_Url_free; +asn_struct_print_f Vanetza_Security2_Url_print; +asn_constr_check_f Vanetza_Security2_Url_constraint; +ber_type_decoder_f Vanetza_Security2_Url_decode_ber; +der_type_encoder_f Vanetza_Security2_Url_encode_der; +xer_type_decoder_f Vanetza_Security2_Url_decode_xer; +xer_type_encoder_f Vanetza_Security2_Url_encode_xer; +jer_type_encoder_f Vanetza_Security2_Url_encode_jer; +oer_type_decoder_f Vanetza_Security2_Url_decode_oer; +oer_type_encoder_f Vanetza_Security2_Url_encode_oer; +per_type_decoder_f Vanetza_Security2_Url_decode_uper; +per_type_encoder_f Vanetza_Security2_Url_encode_uper; +per_type_decoder_f Vanetza_Security2_Url_decode_aper; +per_type_encoder_f Vanetza_Security2_Url_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Url_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/ValidityPeriod.c b/vanetza/asn1/security/r2/ValidityPeriod.c new file mode 100644 index 000000000..fb0f71fca --- /dev/null +++ b/vanetza/asn1/security/r2/ValidityPeriod.c @@ -0,0 +1,93 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "ValidityPeriod.h" + +asn_TYPE_member_t asn_MBR_Vanetza_Security2_ValidityPeriod_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ValidityPeriod, start), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Time32, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "start" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_ValidityPeriod, duration), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_Duration, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "duration" + }, +}; +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_ValidityPeriod_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* start */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* duration */ +}; +asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ValidityPeriod_specs_1 = { + sizeof(struct Vanetza_Security2_ValidityPeriod), + offsetof(struct Vanetza_Security2_ValidityPeriod, _asn_ctx), + asn_MAP_Vanetza_Security2_ValidityPeriod_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_Vanetza_Security2_ValidityPeriod = { + "ValidityPeriod", + "ValidityPeriod", + &asn_OP_SEQUENCE, + asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1, + sizeof(asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_ValidityPeriod_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + SEQUENCE_constraint + }, + asn_MBR_Vanetza_Security2_ValidityPeriod_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_ValidityPeriod_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/ValidityPeriod.h b/vanetza/asn1/security/r2/ValidityPeriod.h new file mode 100644 index 000000000..c9eb2f2f0 --- /dev/null +++ b/vanetza/asn1/security/r2/ValidityPeriod.h @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2BaseTypes" + * found in "build.asn1/ieee/IEEE1609dot2BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_ValidityPeriod_H_ +#define _Vanetza_Security2_ValidityPeriod_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "Time32.h" +#include "Duration.h" +#include "constr_SEQUENCE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_ValidityPeriod */ +typedef struct Vanetza_Security2_ValidityPeriod { + Vanetza_Security2_Time32_t start; + Vanetza_Security2_Duration_t duration; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_ValidityPeriod_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_ValidityPeriod; +extern asn_SEQUENCE_specifics_t asn_SPC_Vanetza_Security2_ValidityPeriod_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_ValidityPeriod_1[2]; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ValidityPeriod_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/VerificationKeyIndicator.c b/vanetza/asn1/security/r2/VerificationKeyIndicator.c new file mode 100644 index 000000000..f5f4e10de --- /dev/null +++ b/vanetza/asn1/security/r2/VerificationKeyIndicator.c @@ -0,0 +1,102 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "VerificationKeyIndicator.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_VerificationKeyIndicator_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_VerificationKeyIndicator_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_VerificationKeyIndicator_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_VerificationKeyIndicator, choice.verificationKey), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_PublicVerificationKey, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "verificationKey" + }, + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_VerificationKeyIndicator, choice.reconstructionValue), + (ASN_TAG_CLASS_CONTEXT | (1 << 2)), + +1, /* EXPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_EccP256CurvePoint, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "reconstructionValue" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_VerificationKeyIndicator_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* verificationKey */ + { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* reconstructionValue */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_VerificationKeyIndicator_specs_1 = { + sizeof(struct Vanetza_Security2_VerificationKeyIndicator), + offsetof(struct Vanetza_Security2_VerificationKeyIndicator, _asn_ctx), + offsetof(struct Vanetza_Security2_VerificationKeyIndicator, present), + sizeof(((struct Vanetza_Security2_VerificationKeyIndicator *)0)->present), + asn_MAP_Vanetza_Security2_VerificationKeyIndicator_tag2el_1, + 2, /* Count of tags in the map */ + 0, 0, + 2 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_VerificationKeyIndicator = { + "VerificationKeyIndicator", + "VerificationKeyIndicator", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_VerificationKeyIndicator_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_VerificationKeyIndicator_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_VerificationKeyIndicator_1, + 2, /* Elements count */ + &asn_SPC_Vanetza_Security2_VerificationKeyIndicator_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/VerificationKeyIndicator.h b/vanetza/asn1/security/r2/VerificationKeyIndicator.h new file mode 100644 index 000000000..b04549fd1 --- /dev/null +++ b/vanetza/asn1/security/r2/VerificationKeyIndicator.h @@ -0,0 +1,59 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2" + * found in "build.asn1/ieee/IEEE1609dot2.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_VerificationKeyIndicator_H_ +#define _Vanetza_Security2_VerificationKeyIndicator_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "PublicVerificationKey.h" +#include "EccP256CurvePoint.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_VerificationKeyIndicator_PR { + Vanetza_Security2_VerificationKeyIndicator_PR_NOTHING, /* No components present */ + Vanetza_Security2_VerificationKeyIndicator_PR_verificationKey, + Vanetza_Security2_VerificationKeyIndicator_PR_reconstructionValue + /* Extensions may appear below */ + +} Vanetza_Security2_VerificationKeyIndicator_PR; + +/* Vanetza_Security2_VerificationKeyIndicator */ +typedef struct Vanetza_Security2_VerificationKeyIndicator { + Vanetza_Security2_VerificationKeyIndicator_PR present; + union Vanetza_Security2_VerificationKeyIndicator_u { + Vanetza_Security2_PublicVerificationKey_t verificationKey; + Vanetza_Security2_EccP256CurvePoint_t reconstructionValue; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_VerificationKeyIndicator_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_VerificationKeyIndicator; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_VerificationKeyIndicator_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_VerificationKeyIndicator_1[2]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_VerificationKeyIndicator_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_VerificationKeyIndicator_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/Version.c b/vanetza/asn1/security/r2/Version.c new file mode 100644 index 000000000..4d1933c50 --- /dev/null +++ b/vanetza/asn1/security/r2/Version.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "Version.h" + +/* + * This type is implemented using NativeInteger, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_Version_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Version = { + "Version", + "Version", + &asn_OP_NativeInteger, + asn_DEF_Vanetza_Security2_Version_tags_1, + sizeof(asn_DEF_Vanetza_Security2_Version_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Version_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_Version_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_Version_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_Version_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + NativeInteger_constraint + }, + 0, 0, /* Defined elsewhere */ + 0 /* No specifics */ +}; + diff --git a/vanetza/asn1/security/r2/Version.h b/vanetza/asn1/security/r2/Version.h new file mode 100644 index 000000000..634ecba74 --- /dev/null +++ b/vanetza/asn1/security/r2/Version.h @@ -0,0 +1,51 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "EtsiTs102941BaseTypes" + * found in "asn1/release2/TS102941v221/BaseTypes.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_Version_H_ +#define _Vanetza_Security2_Version_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "NativeInteger.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_Version { + Vanetza_Security2_Version_v1 = 1 +} e_Vanetza_Security2_Version; + +/* Vanetza_Security2_Version */ +typedef long Vanetza_Security2_Version_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_Version; +asn_struct_free_f Vanetza_Security2_Version_free; +asn_struct_print_f Vanetza_Security2_Version_print; +asn_constr_check_f Vanetza_Security2_Version_constraint; +ber_type_decoder_f Vanetza_Security2_Version_decode_ber; +der_type_encoder_f Vanetza_Security2_Version_encode_der; +xer_type_decoder_f Vanetza_Security2_Version_decode_xer; +xer_type_encoder_f Vanetza_Security2_Version_encode_xer; +jer_type_encoder_f Vanetza_Security2_Version_encode_jer; +oer_type_decoder_f Vanetza_Security2_Version_decode_oer; +oer_type_encoder_f Vanetza_Security2_Version_encode_oer; +per_type_decoder_f Vanetza_Security2_Version_decode_uper; +per_type_encoder_f Vanetza_Security2_Version_encode_uper; +per_type_decoder_f Vanetza_Security2_Version_decode_aper; +per_type_encoder_f Vanetza_Security2_Version_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_Version_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/X509Certificate.c b/vanetza/asn1/security/r2/X509Certificate.c new file mode 100644 index 000000000..7e81bc4d4 --- /dev/null +++ b/vanetza/asn1/security/r2/X509Certificate.c @@ -0,0 +1,42 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "X509Certificate.h" + +/* + * This type is implemented using OCTET_STRING, + * so here we adjust the DEF accordingly. + */ +static const ber_tlv_tag_t asn_DEF_Vanetza_Security2_X509Certificate_tags_1[] = { + (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_X509Certificate = { + "X509Certificate", + "X509Certificate", + &asn_OP_OCTET_STRING, + asn_DEF_Vanetza_Security2_X509Certificate_tags_1, + sizeof(asn_DEF_Vanetza_Security2_X509Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_X509Certificate_tags_1[0]), /* 1 */ + asn_DEF_Vanetza_Security2_X509Certificate_tags_1, /* Same as above */ + sizeof(asn_DEF_Vanetza_Security2_X509Certificate_tags_1) + /sizeof(asn_DEF_Vanetza_Security2_X509Certificate_tags_1[0]), /* 1 */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + OCTET_STRING_constraint + }, + 0, 0, /* No members */ + &asn_SPC_OCTET_STRING_specs /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/X509Certificate.h b/vanetza/asn1/security/r2/X509Certificate.h new file mode 100644 index 000000000..932b5c7e8 --- /dev/null +++ b/vanetza/asn1/security/r2/X509Certificate.h @@ -0,0 +1,46 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_X509Certificate_H_ +#define _Vanetza_Security2_X509Certificate_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "OCTET_STRING.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Vanetza_Security2_X509Certificate */ +typedef OCTET_STRING_t Vanetza_Security2_X509Certificate_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_X509Certificate; +asn_struct_free_f Vanetza_Security2_X509Certificate_free; +asn_struct_print_f Vanetza_Security2_X509Certificate_print; +asn_constr_check_f Vanetza_Security2_X509Certificate_constraint; +ber_type_decoder_f Vanetza_Security2_X509Certificate_decode_ber; +der_type_encoder_f Vanetza_Security2_X509Certificate_encode_der; +xer_type_decoder_f Vanetza_Security2_X509Certificate_decode_xer; +xer_type_encoder_f Vanetza_Security2_X509Certificate_encode_xer; +jer_type_encoder_f Vanetza_Security2_X509Certificate_encode_jer; +oer_type_decoder_f Vanetza_Security2_X509Certificate_decode_oer; +oer_type_encoder_f Vanetza_Security2_X509Certificate_encode_oer; +per_type_decoder_f Vanetza_Security2_X509Certificate_decode_uper; +per_type_encoder_f Vanetza_Security2_X509Certificate_encode_uper; +per_type_decoder_f Vanetza_Security2_X509Certificate_decode_aper; +per_type_encoder_f Vanetza_Security2_X509Certificate_encode_aper; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_X509Certificate_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/X509SignerIdentifier.c b/vanetza/asn1/security/r2/X509SignerIdentifier.c new file mode 100644 index 000000000..4bc5121b9 --- /dev/null +++ b/vanetza/asn1/security/r2/X509SignerIdentifier.c @@ -0,0 +1,81 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#include "X509SignerIdentifier.h" + +#if !defined(ASN_DISABLE_OER_SUPPORT) +static asn_oer_constraints_t asn_OER_type_Vanetza_Security2_X509SignerIdentifier_constr_1 CC_NOTUSED = { + { 0, 0 }, + -1}; +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) +asn_per_constraints_t asn_PER_type_Vanetza_Security2_X509SignerIdentifier_constr_1 CC_NOTUSED = { + { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, + { APC_UNCONSTRAINED, -1, -1, 0, 0 }, + 0, 0 /* No PER value map */ +}; +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +asn_TYPE_member_t asn_MBR_Vanetza_Security2_X509SignerIdentifier_1[] = { + { ATF_NOFLAGS, 0, offsetof(struct Vanetza_Security2_X509SignerIdentifier, choice.certificate), + (ASN_TAG_CLASS_CONTEXT | (0 << 2)), + -1, /* IMPLICIT tag at current level */ + &asn_DEF_Vanetza_Security2_SequenceOfX509Certificate, + 0, + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + 0 + }, + 0, 0, /* No default value */ + "certificate" + }, +}; +static const asn_TYPE_tag2member_t asn_MAP_Vanetza_Security2_X509SignerIdentifier_tag2el_1[] = { + { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* certificate */ +}; +asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_X509SignerIdentifier_specs_1 = { + sizeof(struct Vanetza_Security2_X509SignerIdentifier), + offsetof(struct Vanetza_Security2_X509SignerIdentifier, _asn_ctx), + offsetof(struct Vanetza_Security2_X509SignerIdentifier, present), + sizeof(((struct Vanetza_Security2_X509SignerIdentifier *)0)->present), + asn_MAP_Vanetza_Security2_X509SignerIdentifier_tag2el_1, + 1, /* Count of tags in the map */ + 0, 0, + 1 /* Extensions start */ +}; +asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_X509SignerIdentifier = { + "X509SignerIdentifier", + "X509SignerIdentifier", + &asn_OP_CHOICE, + 0, /* No effective tags (pointer) */ + 0, /* No effective tags (count) */ + 0, /* No tags (pointer) */ + 0, /* No tags (count) */ + { +#if !defined(ASN_DISABLE_OER_SUPPORT) + &asn_OER_type_Vanetza_Security2_X509SignerIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_OER_SUPPORT) */ +#if !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) + &asn_PER_type_Vanetza_Security2_X509SignerIdentifier_constr_1, +#endif /* !defined(ASN_DISABLE_UPER_SUPPORT) || !defined(ASN_DISABLE_APER_SUPPORT) */ +#if !defined(ASN_DISABLE_JER_SUPPORT) + 0, +#endif /* !defined(ASN_DISABLE_JER_SUPPORT) */ + CHOICE_constraint + }, + asn_MBR_Vanetza_Security2_X509SignerIdentifier_1, + 1, /* Elements count */ + &asn_SPC_Vanetza_Security2_X509SignerIdentifier_specs_1 /* Additional specs */ +}; + diff --git a/vanetza/asn1/security/r2/X509SignerIdentifier.h b/vanetza/asn1/security/r2/X509SignerIdentifier.h new file mode 100644 index 000000000..e258375cc --- /dev/null +++ b/vanetza/asn1/security/r2/X509SignerIdentifier.h @@ -0,0 +1,56 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + * From ASN.1 module "Ieee1609Dot2Dot1Protocol" + * found in "build.asn1/ieee/IEEE1609dot2dot1Protocol.asn" + * `asn1c -fcompound-names -fincludes-quoted -no-gen-example -fprefix=Vanetza_Security2_ -R` + */ + +#ifndef _Vanetza_Security2_X509SignerIdentifier_H_ +#define _Vanetza_Security2_X509SignerIdentifier_H_ + + +#include "asn_application.h" + +/* Including external dependencies */ +#include "SequenceOfX509Certificate.h" +#include "constr_CHOICE.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* Dependencies */ +typedef enum Vanetza_Security2_X509SignerIdentifier_PR { + Vanetza_Security2_X509SignerIdentifier_PR_NOTHING, /* No components present */ + Vanetza_Security2_X509SignerIdentifier_PR_certificate + /* Extensions may appear below */ + +} Vanetza_Security2_X509SignerIdentifier_PR; + +/* Vanetza_Security2_X509SignerIdentifier */ +typedef struct Vanetza_Security2_X509SignerIdentifier { + Vanetza_Security2_X509SignerIdentifier_PR present; + union Vanetza_Security2_X509SignerIdentifier_u { + Vanetza_Security2_SequenceOfX509Certificate_t certificate; + /* + * This type is extensible, + * possible extensions are below. + */ + } choice; + + /* Context for parsing across buffer boundaries */ + asn_struct_ctx_t _asn_ctx; +} Vanetza_Security2_X509SignerIdentifier_t; + +/* Implementation */ +extern asn_TYPE_descriptor_t asn_DEF_Vanetza_Security2_X509SignerIdentifier; +extern asn_CHOICE_specifics_t asn_SPC_Vanetza_Security2_X509SignerIdentifier_specs_1; +extern asn_TYPE_member_t asn_MBR_Vanetza_Security2_X509SignerIdentifier_1[1]; +extern asn_per_constraints_t asn_PER_type_Vanetza_Security2_X509SignerIdentifier_constr_1; + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_X509SignerIdentifier_H_ */ +#include "asn_internal.h" diff --git a/vanetza/asn1/security/r2/asn_constant.h b/vanetza/asn1/security/r2/asn_constant.h new file mode 100644 index 000000000..cf2c05a27 --- /dev/null +++ b/vanetza/asn1/security/r2/asn_constant.h @@ -0,0 +1,48 @@ +/* + * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) + */ + +#ifndef _Vanetza_Security2_ASN_CONSTANT_H +#define _Vanetza_Security2_ASN_CONSTANT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#define min_val_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId (0) +#define max_val_Vanetza_Security2_EtsiTs103097ExtensionModule_ExtId (255) +#define min_val_Vanetza_Security2_CertificateFormat (1) +#define max_val_Vanetza_Security2_CertificateFormat (255) +#define min_val_Vanetza_Security2_PduFunctionalType (0) +#define max_val_Vanetza_Security2_PduFunctionalType (255) +#define min_val_Vanetza_Security2_HeaderInfoContributorId (0) +#define max_val_Vanetza_Security2_HeaderInfoContributorId (255) +#define min_val_Vanetza_Security2_Uint3 (0) +#define max_val_Vanetza_Security2_Uint3 (7) +#define min_val_Vanetza_Security2_Uint8 (0) +#define max_val_Vanetza_Security2_Uint8 (255) +#define min_val_Vanetza_Security2_Uint16 (0) +#define max_val_Vanetza_Security2_Uint16 (65535) +#define min_val_Vanetza_Security2_Uint32 (0) +#define max_val_Vanetza_Security2_Uint32 (4294967295) +#define min_val_Vanetza_Security2_Uint64 (0) +#define max_val_Vanetza_Security2_Uint64 (18446744073709551615) +#define min_val_Vanetza_Security2_NinetyDegreeInt (-900000000) +#define max_val_Vanetza_Security2_NinetyDegreeInt (900000001) +#define min_val_Vanetza_Security2_OneEightyDegreeInt (-1799999999) +#define max_val_Vanetza_Security2_OneEightyDegreeInt (1800000001) +#define min_val_Vanetza_Security2_Psid (0) +#define max_val_Vanetza_Security2_Psid (321) +#define min_val_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId (0) +#define max_val_Vanetza_Security2_Ieee1609Dot2BaseTypes_ExtId (255) +#define min_val_Vanetza_Security2_Ieee1609dot2dot1MsctlType (0) +#define max_val_Vanetza_Security2_Ieee1609dot2dot1MsctlType (255) +#define min_val_Vanetza_Security2_CtlSequenceNumber (0) +#define max_val_Vanetza_Security2_CtlSequenceNumber (65535) + + +#ifdef __cplusplus +} +#endif + +#endif /* _Vanetza_Security2_ASN_CONSTANT_H */