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).
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#pragma once
|
|
#include <vanetza/security/sign_service.hpp>
|
|
#include <vanetza/security/v3/certificate_provider.hpp>
|
|
#include <vanetza/security/v3/certificate_validator.hpp>
|
|
#include <vanetza/security/v3/sign_header_policy.hpp>
|
|
|
|
namespace vanetza
|
|
{
|
|
namespace security
|
|
{
|
|
|
|
// forward declarations
|
|
class Backend;
|
|
|
|
namespace v3
|
|
{
|
|
|
|
/**
|
|
* SignService immediately signing the message using given
|
|
*/
|
|
class StraightSignService : public SignService
|
|
{
|
|
public:
|
|
StraightSignService(CertificateProvider&, Backend&, SignHeaderPolicy&, CertificateValidator&);
|
|
SignConfirm sign(SignRequest&&) override;
|
|
|
|
private:
|
|
CertificateProvider & m_certificates;
|
|
Backend& m_backend;
|
|
SignHeaderPolicy& m_policy;
|
|
CertificateValidator& m_validator;
|
|
};
|
|
|
|
|
|
/**
|
|
* SignService without real cryptography but dummy signature
|
|
*/
|
|
class DummySignService : public SignService
|
|
{
|
|
public:
|
|
/**
|
|
* \param rt runtime for appropriate generation time
|
|
*/
|
|
DummySignService(const Runtime& rt);
|
|
SignConfirm sign(SignRequest&&) override;
|
|
|
|
private:
|
|
const Runtime& m_runtime;
|
|
};
|
|
|
|
} // namespace v3
|
|
} // namespace security
|
|
} // namespace vanetza
|