Vanetza
Loading...
Searching...
No Matches
trust_store.hpp
1#pragma once
2#include <vanetza/security/hashed_id.hpp>
3#include <vanetza/security/v3/certificate.hpp>
4#include <list>
5#include <map>
6
7namespace vanetza
8{
9namespace security
10{
11namespace v3
12{
13
15{
16public:
17 /**
18 * Lookup certificates based on the passed HashedId8.
19 *
20 * \param id hash identifier of the certificate
21 * \return all stored certificates matching the passed identifier
22 */
23 std::list<Certificate> lookup(HashedId8 id) const;
24
25 /**
26 * Insert a certificate into store, i.e. consider it as trustworthy.
27 * \param trusted_certificate a trustworthy certificate copied into TrustStore
28 */
29 void insert(const Certificate& trusted_certificate);
30
31protected:
32 std::multimap<HashedId8, Certificate> m_certificates;
33};
34
35} // namespace v3
36} // namespace security
37} // namespace vanetza
void insert(const Certificate &trusted_certificate)
std::list< Certificate > lookup(HashedId8 id) const