switch to ndn-cxx KeyChain v2

ValidatorConfig is temporarily disabled. All commands are
authorized without validation.

refs #4091

Change-Id: I4eea8cd954761424d2d084bda4e8510320b5fb46
diff --git a/src/handles/delete-handle.cpp b/src/handles/delete-handle.cpp
index 5cfbea2..f39856f 100644
--- a/src/handles/delete-handle.cpp
+++ b/src/handles/delete-handle.cpp
@@ -22,8 +22,8 @@
 namespace repo {
 
 DeleteHandle::DeleteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-                           Scheduler& scheduler,// RepoStorage& storeindex,
-                           ValidatorConfig& validator)
+                           Scheduler& scheduler,
+                           Validator& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
 {
diff --git a/src/handles/delete-handle.hpp b/src/handles/delete-handle.hpp
index 5493d2e..0bb0e06 100644
--- a/src/handles/delete-handle.hpp
+++ b/src/handles/delete-handle.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014,  Regents of the University of California.
+ * Copyright (c) 2014-2017, Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -21,7 +21,6 @@
 #define REPO_HANDLES_DELETE_HANDLE_HPP
 
 #include "base-handle.hpp"
-#include <ndn-cxx/security/validator-config.hpp>
 
 namespace repo {
 
@@ -41,7 +40,7 @@
 
 public:
   DeleteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-               Scheduler& scheduler, ValidatorConfig& validator);
+               Scheduler& scheduler, Validator& validator);
 
   virtual void
   listen(const Name& prefix);
@@ -85,7 +84,7 @@
   processSegmentDeleteCommand(const Interest& interest, RepoCommandParameter& parameter);
 
 private:
-  ValidatorConfig& m_validator;
+  Validator& m_validator;
 
 };
 
diff --git a/src/handles/tcp-bulk-insert-handle.cpp b/src/handles/tcp-bulk-insert-handle.cpp
index 1d81b17..53a60d6 100644
--- a/src/handles/tcp-bulk-insert-handle.cpp
+++ b/src/handles/tcp-bulk-insert-handle.cpp
@@ -99,7 +99,7 @@
   m_acceptor.listen(255);
 
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(m_acceptor.get_io_service()));
+    make_shared<ip::tcp::socket>(std::ref(m_acceptor.get_io_service()));
   m_acceptor.async_accept(*clientSocket,
                           bind(&TcpBulkInsertHandle::handleAccept, this, _1,
                                clientSocket));
@@ -127,12 +127,12 @@
   std::cerr << "New connection from " << socket->remote_endpoint() << std::endl;
 
   shared_ptr<detail::TcpBulkInsertClient> client =
-    make_shared<detail::TcpBulkInsertClient>(boost::ref(*this), socket);
+    make_shared<detail::TcpBulkInsertClient>(std::ref(*this), socket);
   detail::TcpBulkInsertClient::startReceive(client);
 
   // prepare accepting the next connection
   shared_ptr<ip::tcp::socket> clientSocket =
-    make_shared<ip::tcp::socket>(boost::ref(m_acceptor.get_io_service()));
+    make_shared<ip::tcp::socket>(std::ref(m_acceptor.get_io_service()));
   m_acceptor.async_accept(*clientSocket,
                           bind(&TcpBulkInsertHandle::handleAccept, this, _1,
                                clientSocket));
diff --git a/src/handles/watch-handle.cpp b/src/handles/watch-handle.cpp
index 25ce278..97aea8f 100644
--- a/src/handles/watch-handle.cpp
+++ b/src/handles/watch-handle.cpp
@@ -25,7 +25,7 @@
 static const milliseconds DEFAULT_INTEREST_LIFETIME(4000);
 
 WatchHandle::WatchHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-                         Scheduler& scheduler, ValidatorConfig& validator)
+                         Scheduler& scheduler, Validator& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
   , m_interestNum(0)
diff --git a/src/handles/watch-handle.hpp b/src/handles/watch-handle.hpp
index f34b1fb..a3e9e5f 100644
--- a/src/handles/watch-handle.hpp
+++ b/src/handles/watch-handle.hpp
@@ -34,11 +34,8 @@
  * @brief WatchHandle provides a different way for repo to insert data.
  *
  * Repo keeps sending interest to request the data with same prefix,
- *
  * but with different exclude selectors(updated every time). Repo will stop
- *
  * watching the prefix until a command interest tell it to stop, the total
- *
  * amount of sent interests reaches a specific number or time out.
  */
 class WatchHandle : public BaseHandle
@@ -58,7 +55,7 @@
 
 public:
   WatchHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-              Scheduler& scheduler, ValidatorConfig& validator);
+              Scheduler& scheduler, Validator& validator);
 
   virtual void
   listen(const Name& prefix);
@@ -155,8 +152,7 @@
   onRunning(const Name& name);
 
 private:
-
-  ValidatorConfig& m_validator;
+  Validator& m_validator;
 
   map<Name, std::pair<RepoCommandResponse, bool> > m_processes;
   int64_t m_interestNum;
diff --git a/src/handles/write-handle.cpp b/src/handles/write-handle.cpp
index 16c622e..862616a 100644
--- a/src/handles/write-handle.cpp
+++ b/src/handles/write-handle.cpp
@@ -28,8 +28,8 @@
 static const milliseconds DEFAULT_INTEREST_LIFETIME(4000);
 
 WriteHandle::WriteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-                         Scheduler& scheduler,// RepoStorage& storeindex,
-                         ValidatorConfig& validator)
+                         Scheduler& scheduler,
+                         Validator& validator)
   : BaseHandle(face, storageHandle, keyChain, scheduler)
   , m_validator(validator)
   , m_retryTime(RETRY_TIMEOUT)
diff --git a/src/handles/write-handle.hpp b/src/handles/write-handle.hpp
index a02f675..1347470 100644
--- a/src/handles/write-handle.hpp
+++ b/src/handles/write-handle.hpp
@@ -22,8 +22,6 @@
 
 #include "base-handle.hpp"
 
-#include <ndn-cxx/security/validator-config.hpp>
-
 #include <queue>
 
 namespace repo {
@@ -70,7 +68,7 @@
 
 public:
   WriteHandle(Face& face, RepoStorage& storageHandle, KeyChain& keyChain,
-              Scheduler& scheduler, ValidatorConfig& validator);
+              Scheduler& scheduler, Validator& validator);
 
   virtual void
   listen(const Name& prefix);
@@ -228,8 +226,7 @@
   negativeReply(const Interest& interest, int statusCode);
 
 private:
-
-  ValidatorConfig& m_validator;
+  Validator& m_validator;
 
   map<ProcessId, ProcessInfo> m_processes;