obu-firmware builds against vanetza-idf from microbu-esp32c5/external, but that tree was gitignored, so a clone of this repository could not build the firmware it ships. It is now committed here as ordinary files in its own folder, microbu-esp32c5/: the colleague's commit cf4b99f plus the V2X2MAP bridge's signature verification (--trust) used on the bench. Nothing is fetched from or pushed to the colleague's repository; this repository and its remotes carry everything. The folder's own .gitignore keeps build output, downloaded components and private key material out, as it did there; the committed file set is identical to that repository's tracked files. The ESP32-C5 is still flashed from obu-firmware/, which only takes vanetza-idf from microbu-esp32c5/, so the two stay separate folders. FLASHING.md says how to take a newer version of the colleague's tree (copy it over the folder, rebuild, test, commit).
75 lines
1.8 KiB
CMake
75 lines
1.8 KiB
CMake
find_package(Boost REQUIRED)
|
|
find_package(OpenSSL REQUIRED)
|
|
find_package(Threads)
|
|
|
|
include(FetchContent)
|
|
find_package(CLI11 2.6 QUIET)
|
|
if(NOT CLI11_FOUND)
|
|
set(CLI11_PRECOMPILED ON CACHE BOOL "Build CLI11 as a compiled library" FORCE)
|
|
FetchContent_Declare(CLI11
|
|
GIT_REPOSITORY https://github.com/CLIUtils/CLI11.git
|
|
GIT_TAG v2.6.2
|
|
GIT_SHALLOW TRUE)
|
|
FetchContent_MakeAvailable(CLI11)
|
|
endif()
|
|
|
|
add_library(pki_library STATIC
|
|
asn1.cpp
|
|
at_request.cpp
|
|
at_response.cpp
|
|
authorization.cpp
|
|
certificate.cpp
|
|
certificate_filesystem_storage.cpp
|
|
certificate_revocation_list.cpp
|
|
certificate_trust_list.cpp
|
|
config.cpp
|
|
credential_filesystem_storage.cpp
|
|
crl_store.cpp
|
|
dc_command.cpp
|
|
distribution_centre.cpp
|
|
ea_request.cpp
|
|
ea_response.cpp
|
|
ecies.cpp
|
|
encrypted_data.cpp
|
|
filesystem.cpp
|
|
hashed_id8.cpp
|
|
hexstring.cpp
|
|
http.cpp
|
|
key_command.cpp
|
|
keys.cpp
|
|
openssl.cpp
|
|
openssl_security_module.cpp
|
|
pem.cpp
|
|
prune_command.cpp
|
|
psid_ssp.cpp
|
|
response_codes.cpp
|
|
security_module.cpp
|
|
signed_builder.cpp
|
|
signed_data.cpp
|
|
station_config_filesystem.cpp
|
|
time.cpp
|
|
trust_list_filesystem_storage.cpp
|
|
validation.cpp
|
|
xdg.cpp
|
|
)
|
|
target_link_libraries(pki_library PUBLIC
|
|
OpenSSL::Crypto OpenSSL::SSL
|
|
Boost::headers
|
|
CLI11::CLI11
|
|
asn1 common security)
|
|
target_compile_definitions(pki_library PRIVATE OPENSSL_API_COMPAT=0x10101000L)
|
|
target_compile_features(pki_library PUBLIC cxx_std_17)
|
|
|
|
add_executable(pki
|
|
cpoc.cpp
|
|
enrolment.cpp
|
|
main.cpp
|
|
printing.cpp
|
|
station.cpp
|
|
)
|
|
target_link_libraries(pki PUBLIC pki_library)
|
|
set_target_properties(pki PROPERTIES INSTALL_RPATH $ORIGIN/../${CMAKE_INSTALL_LIBDIR})
|
|
install(TARGETS pki DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
add_test_subdirectory(tests)
|