nlsr: Pass keyChain to NLSR constructor
refs: #3742
Change-Id: I186784da2989aa8bcc396c81c4fc80254a6f313a
diff --git a/src/nlsr-runner.cpp b/src/nlsr-runner.cpp
index af68640..100cf72 100644
--- a/src/nlsr-runner.cpp
+++ b/src/nlsr-runner.cpp
@@ -31,7 +31,7 @@
NlsrRunner::NlsrRunner(std::string& configFileName, bool isDaemonProcess)
: m_scheduler(m_ioService)
, m_face(m_ioService)
- , m_nlsr(m_ioService, m_scheduler, m_face)
+ , m_nlsr(m_ioService, m_scheduler, m_face, m_keyChain)
{
m_nlsr.setConfFileName(configFileName);
m_nlsr.setIsDaemonProcess(isDaemonProcess);
diff --git a/src/nlsr-runner.hpp b/src/nlsr-runner.hpp
index 3d34c5f..80ee8d6 100644
--- a/src/nlsr-runner.hpp
+++ b/src/nlsr-runner.hpp
@@ -57,7 +57,7 @@
boost::asio::io_service m_ioService;
ndn::Scheduler m_scheduler;
ndn::Face m_face;
-
+ ndn::KeyChain m_keyChain;
Nlsr m_nlsr;
};
diff --git a/src/nlsr.cpp b/src/nlsr.cpp
index fbd067b..6083fc5 100644
--- a/src/nlsr.cpp
+++ b/src/nlsr.cpp
@@ -39,9 +39,10 @@
using namespace ndn;
using namespace std;
-Nlsr::Nlsr(boost::asio::io_service& ioService, ndn::Scheduler& scheduler, ndn::Face& face)
+Nlsr::Nlsr(boost::asio::io_service& ioService, ndn::Scheduler& scheduler, ndn::Face& face, ndn::KeyChain& keyChain)
: m_nlsrFace(face)
, m_scheduler(scheduler)
+ , m_keyChain(keyChain)
, m_confParam()
, m_adjacencyList()
, m_namePrefixList()
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index 8080485..705cc76 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -69,7 +69,7 @@
};
public:
- Nlsr(boost::asio::io_service& ioService, ndn::Scheduler& scheduler, ndn::Face& face);
+ Nlsr(boost::asio::io_service& ioService, ndn::Scheduler& scheduler, ndn::Face& face, ndn::KeyChain& keyChain);
void
registrationFailed(const ndn::Name& name);
@@ -364,6 +364,7 @@
private:
ndn::Face& m_nlsrFace;
ndn::Scheduler& m_scheduler;
+ ndn::KeyChain& m_keyChain;
ConfParameter m_confParam;
AdjacencyList m_adjacencyList;
NamePrefixList m_namePrefixList;
@@ -388,7 +389,6 @@
ndn::shared_ptr<ndn::CertificateCacheTtl> m_certificateCache;
security::CertificateStore m_certStore;
Validator m_validator;
- ndn::KeyChain m_keyChain;
ndn::security::SigningInfo m_signingInfo;
ndn::Name m_defaultCertName;
update::PrefixUpdateProcessor m_prefixUpdateProcessor;