23 #ifndef NDN_TRUST_ANCHOR_GROUP_HPP
24 #define NDN_TRUST_ANCHOR_GROUP_HPP
27 #include "certificate-v2.hpp"
50 remove(
const Name& certificateName) = 0;
67 : certificates_(certificateContainer),
87 size()
const {
return anchorNames_.size(); }
100 static ptr_lib::shared_ptr<CertificateV2>
105 std::set<Name> anchorNames_;
140 remove(
const Name& certificateName);
186 bool isDirectory =
false);
196 loadCertificate(
const std::string& file, std::set<Name>& oldAnchorNames);
double Milliseconds
A time interval represented as the number of milliseconds.
Definition: common.hpp:114
const std::string & getId() const
Get the group id given to the constructor.
Definition: trust-anchor-group.hpp:80
The StaticTrustAnchorGroup class extends TrustAnchorGroup to implement a static trust anchor group...
Definition: trust-anchor-group.hpp:119
size_t size() const
Get the number of certificates in the group.
Definition: trust-anchor-group.hpp:87
CertificateV2 represents a certificate following the certificate format naming convention.
Definition: certificate-v2.hpp:81
static ptr_lib::shared_ptr< CertificateV2 > readCertificate(const std::string &filePath)
Read a base-64-encoded certificate from a file.
Definition: trust-anchor-group.cpp:53
DynamicTrustAnchorGroup(CertificateContainerInterface &certificateContainer, const std::string &id, const std::string &path, Milliseconds refreshPeriod, bool isDirectory=false)
Create a dynamic trust anchor group.
Definition: trust-anchor-group.cpp:95
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
void add(const CertificateV2 &certificate)
Load the static anchor certificate.
Definition: trust-anchor-group.cpp:76
virtual void refresh()
Request a certificate refresh.
Definition: trust-anchor-group.cpp:47
The DynamicTrustAnchorGroup class extends TrustAnchorGroup to implement a dynamic trust anchor group...
Definition: trust-anchor-group.hpp:147
TrustAnchorGroup(CertificateContainerInterface &certificateContainer, const std::string &id)
Create a TrustAnchorGroup to use an existing container.
Definition: trust-anchor-group.hpp:66
Definition: trust-anchor-group.hpp:31
virtual void refresh()
Request a certificate refresh.
Definition: trust-anchor-group.cpp:112
TrustAnchorGroup represents a group of trust anchors which implement the CertificateContainerInterfac...
Definition: trust-anchor-group.hpp:57
virtual void add(const CertificateV2 &certificate)=0
Add the certificate to the container.