rib+tools: avoid deprecated ndn::nfd::Controller(Face&) constructor

refs #2039

Change-Id: I8fde413a9f38b18d00b71878b623f0eeb3551b09
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index 9f09442..e0661ac 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -75,7 +75,7 @@
 
 RibManager::RibManager(ndn::Face& face)
   : m_face(face)
-  , m_nfdController(m_face)
+  , m_nfdController(m_face, m_keyChain)
   , m_localhostValidator(m_face)
   , m_localhopValidator(m_face)
   , m_faceMonitor(m_face)
diff --git a/tools/ndn-autoconfig.cpp b/tools/ndn-autoconfig.cpp
index 87fd884..77470c5 100644
--- a/tools/ndn-autoconfig.cpp
+++ b/tools/ndn-autoconfig.cpp
@@ -28,6 +28,7 @@
 #include "core/face-uri.hpp"
 
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
 #include <ndn-cxx/management/nfd-face-status.hpp>
 #include <ndn-cxx/security/key-chain.hpp>
@@ -79,7 +80,7 @@
 
   explicit
   NdnAutoconfig()
-    : m_controller(m_face)
+    : m_controller(m_face, m_keyChain)
   {
   }
 
@@ -491,6 +492,7 @@
 
 private:
   Face m_face;
+  KeyChain m_keyChain;
   nfd::Controller m_controller;
 };
 
diff --git a/tools/nfd-autoreg.cpp b/tools/nfd-autoreg.cpp
index dc013ea..43862a6 100644
--- a/tools/nfd-autoreg.cpp
+++ b/tools/nfd-autoreg.cpp
@@ -26,6 +26,7 @@
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/name.hpp>
 
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
 #include <ndn-cxx/management/nfd-face-monitor.hpp>
 #include <ndn-cxx/management/nfd-face-status.hpp>
@@ -45,13 +46,14 @@
 
 using namespace ndn::nfd;
 using ndn::Face;
+using ndn::KeyChain;
 using ndn::nfd::FaceEventNotification;
 
 class AutoregServer : boost::noncopyable
 {
 public:
   AutoregServer()
-    : m_controller(m_face)
+    : m_controller(m_face, m_keyChain)
     , m_faceMonitor(m_face)
     , m_cost(255)
   {
@@ -377,6 +379,7 @@
 
 private:
   Face m_face;
+  KeyChain m_keyChain;
   Controller m_controller;
   FaceMonitor m_faceMonitor;
   std::vector<ndn::Name> m_autoregPrefixes;
diff --git a/tools/nfdc.cpp b/tools/nfdc.cpp
index 4ef98bf..bfae684 100644
--- a/tools/nfdc.cpp
+++ b/tools/nfdc.cpp
@@ -82,7 +82,7 @@
   , m_cost(DEFAULT_COST)
   , m_origin(ROUTE_ORIGIN_STATIC)
   , m_expires(DEFAULT_EXPIRATION_PERIOD)
-  , m_controller(face)
+  , m_controller(face, m_keyChain)
   , m_ioService(face.getIoService())
 {
 }
diff --git a/tools/nfdc.hpp b/tools/nfdc.hpp
index 84a7fc8..eb7bc51 100644
--- a/tools/nfdc.hpp
+++ b/tools/nfdc.hpp
@@ -27,6 +27,7 @@
 #define NFD_TOOLS_NFDC_HPP
 
 #include <ndn-cxx/face.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
 #include <ndn-cxx/util/face-uri.hpp>
@@ -207,6 +208,7 @@
 
 
 private:
+  ndn::KeyChain m_keyChain;
   Controller m_controller;
   boost::asio::io_service& m_ioService;
 };