Files
MicrOBU/obu-firmware/external/vanetza-idf/vanetza/security/v2/subject_info.hpp
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

59 lines
1.2 KiB
C++

#ifndef SUBJECT_INFO_HPP_WCKSWSKY
#define SUBJECT_INFO_HPP_WCKSWSKY
#include <vanetza/security/v2/serialization.hpp>
#include <vanetza/common/byte_buffer.hpp>
#include <array>
#include <cstdint>
namespace vanetza
{
namespace security
{
namespace v2
{
/// described in TS 103 097 v1.2.1, section 6.3
enum class SubjectType : uint8_t
{
Enrollment_Credential = 0,
Authorization_Ticket = 1,
Authorization_Authority = 2,
Enrollment_Authority = 3,
Root_CA = 4,
CRL_Signer = 5
};
/// described in TS 103 097 v1.2.1, section 6.2
struct SubjectInfo
{
SubjectType subject_type;
ByteBuffer subject_name;
};
/**
* \brief Serializes a SubjectInfo into a binary archive
*/
void serialize(OutputArchive&, const SubjectInfo&);
/**
* \brief Deserializes a SubjectInfo from a binary archive
* \param archive with a serialized SubjectInfo at the beginning
* \param SubjectInfo
* \return size of the deserialized SubjectInfo
*/
size_t deserialize(InputArchive&, SubjectInfo&);
/**
* \brief Calculates size of a SubjectInfo
* \param SubjectInfo
* \return number of octets needed to serialize SubjectInfo
*/
size_t get_size(const SubjectInfo&);
} // namespace v2
} // namespace security
} // namespace vanetza
#endif /* SUBJECT_INFO_HPP_WCKSWSKY */