Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/master' into cpm
Browse files Browse the repository at this point in the history
# Conflicts:
#	vanetza/asn1/CMakeLists.txt
#	vanetza/asn1/support/BIT_STRING_jer.c
#	vanetza/asn1/support/constr_CHOICE_aper.c
  • Loading branch information
khevessy committed Aug 14, 2024
2 parents 8f4a61f + 8e01f42 commit 7639192
Show file tree
Hide file tree
Showing 771 changed files with 14,724 additions and 27,090 deletions.
36 changes: 7 additions & 29 deletions vanetza/asn1/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
set(_its_asn1_source_file "asn1c_its_sources.txt")
set(_its2_asn1_source_file "asn1c_its2_sources.txt")
set(_pki_asn1_source_file "asn1c_pki_sources.txt")
set(_sec_asn1_source_file "asn1c_security_sources.txt")
set(_support_asn1_source_file "asn1c_support_sources.txt")

set(_its_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/its1")
set(_its2_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/its2")
set(_pki_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/pki")
set(_sec_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/security")
set(_support_asn1_dir "${CMAKE_CURRENT_SOURCE_DIR}/support")

Expand Down Expand Up @@ -111,23 +109,14 @@ if(VANETZA_ASN1_WITH_ASN1C)
-P collect_asn1c_sources.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM)

add_custom_command(OUTPUT ${_pki_asn1_dir}
DEPENDS ${_pki_asn1_files}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_pki_asn1_dir}
COMMAND ${ASN1C_EXECUTABLE} ${_asn1c_flags} -R -D ${_pki_asn1_dir} ${_pki_asn1_files} ${_sec_asn1_files}
COMMENT "Generating code from PKI (TS 102 941) ASN.1 modules" VERBATIM
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
add_custom_command(OUTPUT "${_pki_asn1_source_file}"
DEPENDS ${_pki_asn1_dir}
COMMAND ${CMAKE_COMMAND} -DASN1C_OUTPUT_DIR=pki -DASN1C_SOURCE_FILE=${_pki_asn1_source_file}
-P collect_asn1c_sources.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} VERBATIM)

add_custom_command(OUTPUT "${_sec_asn1_dir}"
DEPENDS ${_sec_asn1_files}
DEPENDS ${_sec_asn1_files} ${_pki_asn1_files}
COMMAND ${CMAKE_COMMAND} -E make_directory ${_sec_asn1_dir}
COMMAND ${ASN1C_EXECUTABLE} ${_asn1c_flags} -R -D ${_sec_asn1_dir} ${_sec_asn1_files}
COMMENT "Generating code from Security (1609.2 and TS 103 097) ASN.1 modules" VERBATIM)
COMMAND ${ASN1C_EXECUTABLE} ${_asn1c_flags} -fprefix=Vanetza_Security_ -R -D ${_sec_asn1_dir} ${_sec_asn1_files} ${_pki_asn1_files}
COMMAND ${CMAKE_COMMAND} -DASN1C_OUTPUT_DIR=security -DASN1C_PREFIX=Vanetza_Security_
-P ${CMAKE_CURRENT_SOURCE_DIR}/remove_prefix_from_filename.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating code from Security (1609.2 and TS 103 097, TS 102 941) ASN.1 modules" VERBATIM)
add_custom_command(OUTPUT "${_sec_asn1_source_file}"
DEPENDS ${_sec_asn1_dir}
COMMAND ${CMAKE_COMMAND} -DASN1C_OUTPUT_DIR=security -DASN1C_SOURCE_FILE=${_sec_asn1_source_file}
Expand All @@ -138,7 +127,6 @@ if(VANETZA_ASN1_WITH_ASN1C)
"${_support_asn1_dir}" "${_support_asn1_source_file}"
"${_its_asn1_dir}" "${_its_asn1_source_file}"
"${_its2_asn1_dir}" "${_its2_asn1_source_file}"
"${_pki_asn1_dir}" "${_pki_asn1_source_file}"
"${_sec_asn1_dir}" "${_sec_asn1_source_file}"
VERBATIM)
add_custom_command(TARGET generate_asn1c POST_BUILD
Expand All @@ -152,15 +140,10 @@ if(VANETZA_ASN1_WITH_ASN1C)
COMMENT "Patching generated ITS application asn1c files"
WORKING_DIRECTORY ${_its_asn1_dir} VERBATIM)
add_custom_command(TARGET generate_asn1c POST_BUILD
COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DASN1C_PREFIX=Vanetza_Security_
-P ${CMAKE_CURRENT_SOURCE_DIR}/patch_asn1c_generated.cmake
COMMENT "Patching generated ITS-2 application asn1c files"
WORKING_DIRECTORY ${_its2_asn1_dir} VERBATIM)
add_custom_command(TARGET generate_asn1c POST_BUILD
COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/patch_asn1c_generated.cmake
COMMENT "Patching generated PKI asn1c files"
WORKING_DIRECTORY ${_pki_asn1_dir} VERBATIM)
add_custom_command(TARGET generate_asn1c POST_BUILD
COMMAND ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR}
-P ${CMAKE_CURRENT_SOURCE_DIR}/patch_asn1c_generated.cmake
Expand Down Expand Up @@ -193,10 +176,6 @@ if(VANETZA_ASN1_WITH_ASN1C)
-DASN1C_OUTPUT_DIR=${_its2_asn1_dir}
-DASN1C_SOURCE_FILE=${_its2_asn1_source_file}
-P clean_asn1c.cmake
COMMAND ${CMAKE_COMMAND}
-DASN1C_OUTPUT_DIR=${_pki_asn1_dir}
-DASN1C_SOURCE_FILE=${_pki_asn1_source_file}
-P clean_asn1c.cmake
COMMAND ${CMAKE_COMMAND}
-DASN1C_OUTPUT_DIR=${_sec_asn1_dir}
-DASN1C_SOURCE_FILE=${_sec_asn1_source_file}
Expand Down Expand Up @@ -266,7 +245,6 @@ else()
add_asn1_component(its)
endif()
add_asn1_component(security)
add_asn1_component(pki)

add_vanetza_component(asn1 asn1c_wrapper.cpp)
target_link_libraries(asn1 PUBLIC asn1_its Boost::boost)
Expand Down
165 changes: 0 additions & 165 deletions vanetza/asn1/asn1c_pki_sources.txt

This file was deleted.

51 changes: 51 additions & 0 deletions vanetza/asn1/asn1c_security_sources.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,45 @@
# generated file
security/AaEntry.c
security/AesCcmCiphertext.c
security/AuthorizationRequestMessage.c
security/AuthorizationRequestMessageWithPop.c
security/AuthorizationResponseCode.c
security/AuthorizationResponseMessage.c
security/AuthorizationValidationRequest.c
security/AuthorizationValidationRequestMessage.c
security/AuthorizationValidationResponse.c
security/AuthorizationValidationResponseCode.c
security/AuthorizationValidationResponseMessage.c
security/BasePublicEncryptionKey.c
security/BitmapSsp.c
security/BitmapSspRange.c
security/CaCertificateRekeyingMessage.c
security/CaCertificateRequest.c
security/CaCertificateRequestMessage.c
security/Certificate.c
security/CertificateBase.c
security/CertificateFormat.c
security/CertificateId.c
security/CertificateRevocationListMessage.c
security/CertificateSubjectAttributes.c
security/CertificateType.c
security/CircularRegion.c
security/Countersignature.c
security/CountryAndRegions.c
security/CountryAndSubregions.c
security/CountryOnly.c
security/CrlEntry.c
security/CrlSeries.c
security/CtlCommand.c
security/CtlDelete.c
security/CtlEntry.c
security/CtlFormat.c
security/DcDelete.c
security/DcEntry.c
security/DeltaCtl.c
security/Duration.c
security/EaEntry.c
security/EcSignature.c
security/EccP256CurvePoint.c
security/EccP384CurvePoint.c
security/EcdsaP256Signature.c
Expand All @@ -25,13 +51,22 @@ security/EncryptedData.c
security/EncryptedDataEncryptionKey.c
security/EncryptionKey.c
security/EndEntityType.c
security/EnrolmentRequestMessage.c
security/EnrolmentResponseCode.c
security/EnrolmentResponseMessage.c
security/EtsiTs102941Data.c
security/EtsiTs102941DataContent.c
security/EtsiTs103097Certificate.c
security/EtsiTs103097Data-Encrypted-Unicast.c
security/EtsiTs103097Data-Encrypted.c
security/EtsiTs103097Data-Signed.c
security/EtsiTs103097Data-SignedAndEncrypted-Unicast.c
security/EtsiTs103097Data-SignedAndEncrypted.c
security/EtsiTs103097Data-SignedExternalPayload.c
security/EtsiTs103097Data-Unsecured.c
security/EtsiTs103097Data.c
security/ExplicitCertificate.c
security/FullCtl.c
security/GeographicRegion.c
security/GroupLinkageValue.c
security/HashAlgorithm.c
Expand All @@ -46,6 +81,11 @@ security/IdentifiedRegion.c
security/Ieee1609Dot2Content.c
security/Ieee1609Dot2Data.c
security/ImplicitCertificate.c
security/InnerAtRequest.c
security/InnerAtResponse.c
security/InnerEcRequest.c
security/InnerEcRequestSignedForPop.c
security/InnerEcResponse.c
security/IssuerIdentifier.c
security/KnownLatitude.c
security/KnownLongitude.c
Expand All @@ -67,10 +107,13 @@ security/PsidGroupPermissions.c
security/PsidSsp.c
security/PsidSspRange.c
security/PublicEncryptionKey.c
security/PublicKeys.c
security/PublicVerificationKey.c
security/RcaCertificateTrustListMessage.c
security/RecipientInfo.c
security/RectangularRegion.c
security/RegionAndSubregions.c
security/RootCaEntry.c
security/SequenceOfCertificate.c
security/SequenceOfHashedId3.c
security/SequenceOfIdentifiedRegion.c
Expand All @@ -85,6 +128,7 @@ security/SequenceOfRegionAndSubregions.c
security/SequenceOfUint16.c
security/SequenceOfUint8.c
security/ServiceSpecificPermissions.c
security/SharedAtRequest.c
security/Signature.c
security/SignedData.c
security/SignedDataPayload.c
Expand All @@ -100,8 +144,13 @@ security/SymmetricEncryptionKey.c
security/ThreeDLocation.c
security/Time32.c
security/Time64.c
security/TlmCertificateTrustListMessage.c
security/TlmEntry.c
security/ToBeSignedCertificate.c
security/ToBeSignedCrl.c
security/ToBeSignedData.c
security/ToBeSignedRcaCtl.c
security/ToBeSignedTlmCtl.c
security/TwoDLocation.c
security/Uint16.c
security/Uint3.c
Expand All @@ -110,5 +159,7 @@ security/Uint64.c
security/Uint8.c
security/UnknownLatitude.c
security/UnknownLongitude.c
security/Url.c
security/ValidityPeriod.c
security/VerificationKeyIndicator.c
security/Version.c
Loading

0 comments on commit 7639192

Please sign in to comment.