Vanetza
 
Loading...
Searching...
No Matches
trust_store.hpp
1#ifndef DCC78C84_AD24_4E47_AEC4_C0ECB1127E03
2#define DCC78C84_AD24_4E47_AEC4_C0ECB1127E03
3
4#include <vanetza/security/hashed_id.hpp>
5#include <vanetza/security/v2/certificate.hpp>
6#include <list>
7#include <map>
8
9namespace vanetza
10{
11namespace security
12{
13namespace v2
14{
15
17{
18public:
19 /**
20 * Lookup certificates based on the passed HashedId8.
21 *
22 * \param id hash identifier of the certificate
23 * \return all stored certificates matching the passed identifier
24 */
25 std::list<Certificate> lookup(HashedId8 id) const;
26
27 /**
28 * Insert a certificate into store, i.e. consider it as trustworthy.
29 * \param trusted_certificate a trustworthy certificate copied into TrustStore
30 */
31 void insert(const Certificate& trusted_certificate);
32
33private:
34 std::multimap<HashedId8, Certificate> m_certificates;
35};
36
37} // namespace v2
38} // namespace security
39} // namespace vanetza
40
41#endif /* DCC78C84_AD24_4E47_AEC4_C0ECB1127E03 */
std::list< Certificate > lookup(HashedId8 id) const
Definition: trust_store.cpp:21
void insert(const Certificate &trusted_certificate)
Definition: trust_store.cpp:11
described in TS 103 097 v1.2.1 (2015-06), section 6.1
Definition: certificate.hpp:28