Files
MicrOBU/obu-firmware/external/vanetza-idf/tools/socktap/certificate_validation_v3.cpp
T
Ashin Walpola d107534eb2 Keep vanetza-idf in obu-firmware, so a plain clone builds the firmware
obu-firmware builds against the vanetza-idf C-ITS library, which until now
came from the colleague's microbu-esp32c5 tree beside the repository and was
not tracked here, so a clone of this repository could not build the firmware
it ships. The library alone is now part of obu-firmware, as
obu-firmware/external/vanetza-idf: their external/vanetza-idf at commit
cf4b99f, unchanged (9775 files; see its PROVENANCE.md). CMake takes it from
there by default; -DVANETZA_IDF_DIR still points the build elsewhere.

The rest of the colleague's tree (their own VAM firmware, PKI tooling,
station-link Python tools, the V2X2MAP bridge) stays out of this repository
and gitignored; nothing is pushed to their repository. NOTES.md, docs/06,
TODO.md and the pcap verifier's usage line point at the new location.
2026-09-24 10:56:05 +02:00

51 lines
1.5 KiB
C++

#include "certificate_validation_v3.hpp"
#include <vanetza/common/position_provider.hpp>
#include <vanetza/common/runtime.hpp>
#include <vanetza/security/persistence.hpp>
#include <vanetza/security/v3/certificate_validator.hpp>
#include <vanetza/security/v3/location_checker.hpp>
namespace
{
class DefaultCertificateValidationV3 : public CertificateValidationV3
{
public:
DefaultCertificateValidationV3(
const vanetza::Runtime& runtime, vanetza::PositionProvider& positioning,
const vanetza::security::v3::LocationChecker& location_checker)
{
m_validator.use_runtime(&runtime);
m_validator.use_position_provider(&positioning);
m_validator.use_location_checker(&location_checker);
}
vanetza::security::v3::CertificateValidator& validator() override
{
return m_validator;
}
vanetza::security::PrivateKey load_authorization_ticket_key(
const std::string& path) const override
{
return vanetza::security::load_private_key_from_pem_file(path);
}
void add_chain_certificate(const vanetza::security::v3::Certificate&) override
{
}
private:
vanetza::security::v3::DefaultCertificateValidator m_validator;
};
} // namespace
std::unique_ptr<CertificateValidationV3> create_default_certificate_validation_v3(
const vanetza::Runtime& runtime, vanetza::PositionProvider& positioning,
const vanetza::security::v3::LocationChecker& location_checker)
{
return std::make_unique<DefaultCertificateValidationV3>(
runtime, positioning, location_checker);
}