utils: Enable use of DummyKeychain to avoid crypto overhead
Refs: #2233
diff --git a/helper/ndn-stack-helper.cpp b/helper/ndn-stack-helper.cpp
index b548844..bd2413e 100644
--- a/helper/ndn-stack-helper.cpp
+++ b/helper/ndn-stack-helper.cpp
@@ -45,6 +45,7 @@
#include "ndn-face-container.hpp"
#include "ndn-stack-helper.hpp"
+#include "utils/dummy-keychain.hpp"
#include <limits>
#include <map>
@@ -76,6 +77,13 @@
{
}
+KeyChain&
+StackHelper::getKeyChain()
+{
+ static ::ndn::DummyKeyChain keyChain;
+ return keyChain;
+}
+
void
StackHelper::SetStackAttributes(const std::string& attr1, const std::string& value1,
const std::string& attr2, const std::string& value2,
diff --git a/helper/ndn-stack-helper.hpp b/helper/ndn-stack-helper.hpp
index d32769c..afc43dc 100644
--- a/helper/ndn-stack-helper.hpp
+++ b/helper/ndn-stack-helper.hpp
@@ -292,6 +292,9 @@
void
SetDefaultRoutes(bool needSet);
+ static KeyChain&
+ getKeyChain();
+
private:
shared_ptr<NetDeviceFace>
DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol> ndn, Ptr<NetDevice> netDevice) const;