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.
This commit is contained in:
+87
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
#include <vanetza/security/verify_service.hpp>
|
||||
|
||||
namespace vanetza
|
||||
{
|
||||
|
||||
// forward declaration
|
||||
class PositionProvider;
|
||||
class Runtime;
|
||||
|
||||
namespace security
|
||||
{
|
||||
|
||||
// forward declarations
|
||||
class Backend;
|
||||
|
||||
namespace v2
|
||||
{
|
||||
|
||||
// forward declarations
|
||||
class CertificateCache;
|
||||
class CertificateProvider;
|
||||
class CertificateValidator;
|
||||
class SignHeaderPolicy;
|
||||
|
||||
} // namespace v2
|
||||
|
||||
namespace v3
|
||||
{
|
||||
|
||||
// forward declarations
|
||||
class CertificateCache;
|
||||
class CertificateProvider;
|
||||
class CertificateValidator;
|
||||
class SignHeaderPolicy;
|
||||
|
||||
} // namespace v3
|
||||
|
||||
/**
|
||||
* Verify service with basic certificate and signature checks
|
||||
*/
|
||||
class StraightVerifyService : public VerifyService
|
||||
{
|
||||
public:
|
||||
StraightVerifyService(const Runtime&, Backend&);
|
||||
StraightVerifyService(const Runtime&, Backend&, PositionProvider&);
|
||||
|
||||
void use_certificate_cache(v2::CertificateCache*);
|
||||
void use_certificate_provider(v2::CertificateProvider*);
|
||||
void use_certificate_validator(v2::CertificateValidator*);
|
||||
void use_sign_header_policy(v2::SignHeaderPolicy*);
|
||||
|
||||
void use_certificate_provider(v3::CertificateProvider*);
|
||||
void use_certificate_cache(v3::CertificateCache*);
|
||||
void use_certificate_validator(v3::CertificateValidator*);
|
||||
void use_sign_header_policy(v3::SignHeaderPolicy*);
|
||||
|
||||
VerifyConfirm verify(const VerifyRequest&) override;
|
||||
VerifyConfirm verify(const v2::SecuredMessage&);
|
||||
VerifyConfirm verify(const v3::SecuredMessage&);
|
||||
|
||||
private:
|
||||
const Runtime& m_runtime;
|
||||
Backend& m_backend;
|
||||
PositionProvider* m_position_provider = nullptr;
|
||||
|
||||
struct {
|
||||
v2::CertificateCache* m_cert_cache = nullptr;
|
||||
v2::CertificateProvider* m_cert_provider = nullptr;
|
||||
v2::CertificateValidator* m_cert_validator = nullptr;
|
||||
v2::SignHeaderPolicy* m_sign_policy = nullptr;
|
||||
|
||||
constexpr bool complete() const
|
||||
{
|
||||
return m_cert_cache && m_cert_provider && m_cert_validator && m_sign_policy;
|
||||
}
|
||||
} m_context_v2;
|
||||
|
||||
struct {
|
||||
v3::CertificateCache* m_cert_cache = nullptr;
|
||||
v3::CertificateValidator* m_cert_validator = nullptr;
|
||||
v3::SignHeaderPolicy* m_sign_policy = nullptr;
|
||||
} m_context_v3;
|
||||
};
|
||||
|
||||
} // namespace security
|
||||
} // namespace vanetza
|
||||
Reference in New Issue
Block a user