NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::v2::DynamicTrustAnchorGroup Class Reference

Dynamic trust anchor group. More...

#include <trust-anchor-group.hpp>

Inheritance diagram for ndn::security::v2::DynamicTrustAnchorGroup:
Collaboration diagram for ndn::security::v2::DynamicTrustAnchorGroup:

Public Member Functions

 DynamicTrustAnchorGroup (CertContainerInterface &certContainer, const std::string &id, const boost::filesystem::path &path, time::nanoseconds refreshPeriod, bool isDir=false)
 Create a dynamic trust anchor group. More...
 
void refresh () override
 Request certificate refresh. More...
 
- Public Member Functions inherited from ndn::security::v2::TrustAnchorGroup
 TrustAnchorGroup (CertContainerInterface &certContainer, const std::string &id)
 Create an anchor group. More...
 
virtual ~TrustAnchorGroup ()
 
const std::string & getId () const
 
size_t size () const
 

Additional Inherited Members

- Protected Attributes inherited from ndn::security::v2::TrustAnchorGroup
CertContainerInterfacem_certs
 
std::set< Namem_anchorNames
 

Detailed Description

Dynamic trust anchor group.

Definition at line 120 of file trust-anchor-group.hpp.

Constructor & Destructor Documentation

◆ DynamicTrustAnchorGroup()

ndn::security::v2::DynamicTrustAnchorGroup::DynamicTrustAnchorGroup ( CertContainerInterface certContainer,
const std::string &  id,
const boost::filesystem::path &  path,
time::nanoseconds  refreshPeriod,
bool  isDir = false 
)

Create a dynamic trust anchor group.

This contructor would load all the certificates from path and will be refreshing certificates every refreshPeriod time period.

Note that refresh is not scheduled, but is performed upon "find" operations.

When isDir is false and path doesn't point to a valid certificate (file doesn't exist or content is not a valid certificate), the dynamic anchor group will be empty until file gets created. If file disappears or gets corrupted, the anchor group becomes empty.

When idDir is true and path does't point to a valid folder, folder is empty, or doesn't contain valid certificates, the group will be empty until certificate files are placed in the folder. If folder is removed, becomes empty, or no longer contains valid certificates, the anchor group becomes empty.

Upon refresh, the existing certificates are not changed.

Parameters
certContainerA certificate container into which trust anchors from the group will be added
idGroup id
pathFile path for trust anchor(s), could be directory or file. If it is a directory, all the certificates in the directory will be loaded.
refreshPeriodRefresh time for the anchors under path, must be positive.
isDirTells whether the path is a directory or a single file.
Exceptions
std::invalid_argumentrefreshPeriod is negative

Definition at line 86 of file trust-anchor-group.cpp.

References NDN_LOG_TRACE, NDN_THROW, and refresh().

Member Function Documentation

◆ refresh()


The documentation for this class was generated from the following files: