security: Add permanent certificate storage for validator
refs: #2779
Change-Id: I5d9588136474b7eff3adf258a60aff0b7909bead
diff --git a/src/update/prefix-update-processor.cpp b/src/update/prefix-update-processor.cpp
index 75e6bae..12e066a 100644
--- a/src/update/prefix-update-processor.cpp
+++ b/src/update/prefix-update-processor.cpp
@@ -43,13 +43,14 @@
SyncLogicHandler& sync,
const ndn::Name broadcastPrefix,
ndn::KeyChain& keyChain,
- ndn::shared_ptr<ndn::CertificateCacheTtl> certificateCache)
+ ndn::shared_ptr<ndn::CertificateCacheTtl> certificateCache,
+ security::CertificateStore& certStore)
: m_face(face)
, m_namePrefixList(namePrefixList)
, m_lsdb(lsdb)
, m_sync(sync)
, m_keyChain(keyChain)
- , m_validator(m_face, broadcastPrefix, certificateCache)
+ , m_validator(m_face, broadcastPrefix, certificateCache, certStore)
, COMMAND_PREFIX(ndn::Name(Nlsr::LOCALHOST_PREFIX).append(MODULE_COMPONENT))
{
}
diff --git a/src/update/prefix-update-processor.hpp b/src/update/prefix-update-processor.hpp
index 164bb49..6dc6c09 100644
--- a/src/update/prefix-update-processor.hpp
+++ b/src/update/prefix-update-processor.hpp
@@ -41,6 +41,10 @@
class Lsdb;
class SyncLogicHandler;
+namespace security {
+ class CertificateStore;
+}
+
namespace update {
typedef boost::property_tree::ptree ConfigSection;
@@ -65,7 +69,8 @@
SyncLogicHandler& sync,
const ndn::Name broadcastPrefix,
ndn::KeyChain& keyChain,
- ndn::shared_ptr<ndn::CertificateCacheTtl> certificateCache);
+ ndn::shared_ptr<ndn::CertificateCacheTtl> certificateCache,
+ security::CertificateStore& certStore);
void
loadValidator(ConfigSection section, const std::string& filename);