1#include <vanetza/security/v2/trust_store.hpp>
13 if (certificate.subject_info.subject_type != SubjectType::Root_CA) {
14 throw std::runtime_error(
"Only root certificate authorities may be added to the trust store");
17 HashedId8
id = calculate_hash(certificate);
18 m_certificates.insert(std::make_pair(
id, certificate));
23 using iterator = std::multimap<HashedId8, Certificate>::const_iterator;
24 std::pair<iterator, iterator> range = m_certificates.equal_range(
id);
26 std::list<Certificate> matches;
27 for (
auto item = range.first; item != range.second; ++item) {
28 matches.push_back(item->second);
std::list< Certificate > lookup(HashedId8 id) const
void insert(const Certificate &trusted_certificate)
described in TS 103 097 v1.2.1 (2015-06), section 6.1