tools: adapt to ndn-cxx SegmentFetcher API change

Refs: #2734
Change-Id: Ibce8942007d0b26f34b212140a7b4313c4b6a397
diff --git a/tools/ndn-autoconfig/multicast-discovery.cpp b/tools/ndn-autoconfig/multicast-discovery.cpp
index 59a115b..2e3f8a2 100644
--- a/tools/ndn-autoconfig/multicast-discovery.cpp
+++ b/tools/ndn-autoconfig/multicast-discovery.cpp
@@ -47,7 +47,7 @@
   std::cerr << "Trying multicast discovery..." << std::endl;
 
   util::SegmentFetcher::fetch(m_face, Interest("/localhost/nfd/faces/list"),
-                              ndn::util::DontVerifySegment(),
+                              m_validator,
                               [this] (const ConstBufferPtr& data) {
                                 registerHubDiscoveryPrefix(data);
                               },
diff --git a/tools/ndn-autoconfig/multicast-discovery.hpp b/tools/ndn-autoconfig/multicast-discovery.hpp
index 72717fc..893d233 100644
--- a/tools/ndn-autoconfig/multicast-discovery.hpp
+++ b/tools/ndn-autoconfig/multicast-discovery.hpp
@@ -28,6 +28,8 @@
 
 #include "base.hpp"
 
+#include <ndn-cxx/security/validator-null.hpp>
+
 namespace ndn {
 namespace tools {
 namespace autoconfig {
@@ -85,6 +87,8 @@
 private:
   size_t nRequestedRegs;
   size_t nFinishedRegs;
+
+  ndn::ValidatorNull m_validator;
 };
 
 } // namespace autoconfig
diff --git a/tools/nfd-status.cpp b/tools/nfd-status.cpp
index a4b6e1a..1b16c33 100644
--- a/tools/nfd-status.cpp
+++ b/tools/nfd-status.cpp
@@ -39,6 +39,7 @@
 #include <ndn-cxx/management/nfd-rib-entry.hpp>
 #include <ndn-cxx/management/nfd-strategy-choice.hpp>
 #include <ndn-cxx/util/segment-fetcher.hpp>
+#include <ndn-cxx/security/validator-null.hpp>
 
 #include <boost/algorithm/string/replace.hpp>
 #include <list>
@@ -268,7 +269,7 @@
     interest.setMustBeFresh(true);
 
     SegmentFetcher::fetch(m_face, interest,
-                          util::DontVerifySegment(),
+                          m_validator,
                           bind(&NfdStatus::afterFetchedChannelStatusInformation, this, _1),
                           bind(&NfdStatus::onErrorFetch, this, _1, _2));
   }
@@ -338,7 +339,7 @@
     interest.setMustBeFresh(true);
 
     SegmentFetcher::fetch(m_face, interest,
-                          util::DontVerifySegment(),
+                          m_validator,
                           bind(&NfdStatus::afterFetchedFaceStatusInformation, this, _1),
                           bind(&NfdStatus::onErrorFetch, this, _1, _2));
   }
@@ -470,7 +471,7 @@
     interest.setMustBeFresh(true);
 
     SegmentFetcher::fetch(m_face, interest,
-                          util::DontVerifySegment(),
+                          m_validator,
                           bind(&NfdStatus::afterFetchedFibEnumerationInformation, this, _1),
                           bind(&NfdStatus::onErrorFetch, this, _1, _2));
   }
@@ -558,7 +559,7 @@
     interest.setMustBeFresh(true);
 
     SegmentFetcher::fetch(m_face, interest,
-                          util::DontVerifySegment(),
+                          m_validator,
                           bind(&NfdStatus::afterFetchedStrategyChoiceInformationInformation, this, _1),
                           bind(&NfdStatus::onErrorFetch, this, _1, _2));
   }
@@ -633,7 +634,7 @@
     interest.setMustBeFresh(true);
 
     SegmentFetcher::fetch(m_face, interest,
-                          util::DontVerifySegment(),
+                          m_validator,
                           bind(&NfdStatus::afterFetchedRibStatusInformation, this, _1),
                           bind(&NfdStatus::onErrorFetch, this, _1, _2));
   }
@@ -828,6 +829,8 @@
   shared_ptr<OBufferStream> m_buffer;
 
   std::deque<function<void()> > m_fetchSteps;
+
+  ndn::ValidatorNull m_validator;
 };
 
 }
diff --git a/tools/nfdc.cpp b/tools/nfdc.cpp
index 0b5d889..fcb808f 100644
--- a/tools/nfdc.cpp
+++ b/tools/nfdc.cpp
@@ -161,7 +161,7 @@
   auto interest = std::make_shared<ndn::Interest>(interestPacket);
 
   ndn::util::SegmentFetcher::fetch(m_face, *interest,
-                                   ndn::util::DontVerifySegment(),
+                                   m_validator,
                                    bind(&FaceIdFetcher::onQuerySuccess,
                                         this, _1, canonicalUri),
                                    bind(&FaceIdFetcher::onQueryFailure,
diff --git a/tools/nfdc.hpp b/tools/nfdc.hpp
index daf2f41..3928ae5 100644
--- a/tools/nfdc.hpp
+++ b/tools/nfdc.hpp
@@ -31,6 +31,7 @@
 #include <ndn-cxx/util/time.hpp>
 #include <ndn-cxx/management/nfd-controller.hpp>
 #include <ndn-cxx/util/face-uri.hpp>
+#include <ndn-cxx/security/validator-null.hpp>
 #include <memory>
 
 namespace nfdc {
@@ -120,6 +121,7 @@
     bool m_allowCreate;
     SuccessCallback m_onSucceed;
     FailureCallback m_onFail;
+    ndn::ValidatorNull m_validator;
   };
 
   explicit