Keep the colleague's microbu-esp32c5 tree in this repository
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).
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