Migrate to ndn-cxx 0.7.1: Part 1

Change-Id: I621a6230272cfde5d84aa5ca9abdf40a91337491
diff --git a/tests/unit-tests/bench.t.cpp b/tests/unit-tests/bench.t.cpp
index 13adf8c..1766a18 100644
--- a/tests/unit-tests/bench.t.cpp
+++ b/tests/unit-tests/bench.t.cpp
@@ -101,7 +101,7 @@
   // generate NEW Interest
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
   auto newInterest = Requester::genNewInterest(state, Name("/ndn/alice"),
                                                time::system_clock::now(),
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index a7b9875..9f7d53a 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -206,8 +206,8 @@
       }
     }
     BOOST_CHECK_EQUAL(redirectionItems.size(), 2);
-    BOOST_CHECK_EQUAL(security::v2::extractIdentityFromCertName(redirectionItems[0].getPrefix(-1)), "/ndn/site1");
-    BOOST_CHECK_EQUAL(security::v2::extractIdentityFromCertName(redirectionItems[1].getPrefix(-1)), "/ndn/site1");
+    BOOST_CHECK_EQUAL(security::extractIdentityFromCertName(redirectionItems[0].getPrefix(-1)), "/ndn/site1");
+    BOOST_CHECK_EQUAL(security::extractIdentityFromCertName(redirectionItems[1].getPrefix(-1)), "/ndn/site1");
   });
   face.receive(interest);
   advanceClocks(time::milliseconds(20), 60);
@@ -226,7 +226,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
   auto interest = Requester::genNewInterest(state, Name("/ndn/zhiyi"),
                                             time::system_clock::now(),
@@ -275,7 +275,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
   auto current_tp = time::system_clock::now();
   auto interest1 = Requester::genNewInterest(state, Name("/ndn/zhiyi"), current_tp, current_tp - time::hours(1));
@@ -306,7 +306,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
 
   auto interest1 = Requester::genNewInterest(state, Name("/ndn/a"), time::system_clock::now(),
@@ -347,7 +347,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
 
   auto current_tp = time::system_clock::now();
@@ -378,7 +378,7 @@
   // generate NEW Interest
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
 
   auto newInterest = Requester::genNewInterest(state, Name("/ndn/zhiyi"), time::system_clock::now(),
@@ -453,7 +453,7 @@
   //generate a certificate
   auto clientIdentity = m_keyChain.createIdentity("/ndn/qwerty");
   auto clientKey = clientIdentity.getDefaultKey();
-  security::v2::Certificate clientCert;
+  security::Certificate clientCert;
   clientCert.setName(Name(clientKey.getName()).append("cert-request").appendVersion());
   clientCert.setContentType(tlv::ContentType_Key);
   clientCert.setFreshnessPeriod(time::hours(24));
@@ -467,7 +467,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::REVOKE);
 
   auto interest = Requester::genRevokeInterest(state, issuedCert);
@@ -516,7 +516,7 @@
   // generate a certificate
   auto clientIdentity = m_keyChain.createIdentity("/ndn/qwerty");
   auto clientKey = clientIdentity.getDefaultKey();
-  security::v2::Certificate clientCert;
+  security::Certificate clientCert;
   clientCert.setName(Name(clientKey.getName()).append("NDNCERT").append(std::to_string(1473283247810732701)));
   clientCert.setContentType(tlv::ContentType_Key);
   clientCert.setFreshnessPeriod(time::hours(24));
@@ -528,7 +528,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/ndn");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
 
   auto interest = Requester::genRevokeInterest(state, clientCert);
diff --git a/tests/unit-tests/challenge-credential.t.cpp b/tests/unit-tests/challenge-credential.t.cpp
index 236d274..46c5928 100644
--- a/tests/unit-tests/challenge-credential.t.cpp
+++ b/tests/unit-tests/challenge-credential.t.cpp
@@ -61,7 +61,7 @@
   auto identityB = addIdentity(Name("/trust/cert"));
   auto keyB = identityB.getDefaultKey();
   auto credentialName = Name(keyB.getName()).append("Credential").appendVersion();
-  security::v2::Certificate credential;
+  security::Certificate credential;
   credential.setName(credentialName);
   credential.setContent(keyB.getPublicKey().data(), keyB.getPublicKey().size());
   SignatureInfo signatureInfo;
diff --git a/tests/unit-tests/requester.t.cpp b/tests/unit-tests/requester.t.cpp
index 8ac66c9..44a4b7f 100644
--- a/tests/unit-tests/requester.t.cpp
+++ b/tests/unit-tests/requester.t.cpp
@@ -44,7 +44,7 @@
   ca_profile.m_probeParameterKeys.push_back("uid");
   ca_profile.m_probeParameterKeys.push_back("name");
   ca_profile.m_caPrefix = Name("/site");
-  ca_profile.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  ca_profile.m_cert = std::make_shared<security::Certificate>(cert);
 
   std::vector<std::tuple<std::string, std::string>> probeParams;
   probeParams.push_back(std::make_tuple("email", "zhiyi@cs.ucla.edu"));
@@ -68,7 +68,7 @@
   ca_profile.m_probeParameterKeys.push_back("uid");
   ca_profile.m_probeParameterKeys.push_back("name");
   ca_profile.m_caPrefix = Name("/site");
-  ca_profile.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  ca_profile.m_cert = std::make_shared<security::Certificate>(cert);
 
   std::vector<Name> availableNames;
   availableNames.push_back(Name("/site1"));
@@ -92,8 +92,8 @@
   BOOST_CHECK_EQUAL(names[1].toUri(), "/site2");
 
   BOOST_CHECK_EQUAL(redirects.size(), 2);
-  BOOST_CHECK_EQUAL(security::v2::extractIdentityFromCertName(redirects[0].getPrefix(-1)), "/ndn/site1");
-  BOOST_CHECK_EQUAL(security::v2::extractIdentityFromCertName(redirects[1].getPrefix(-1)), "/ndn/site1");
+  BOOST_CHECK_EQUAL(security::extractIdentityFromCertName(redirects[0].getPrefix(-1)), "/ndn/site1");
+  BOOST_CHECK_EQUAL(security::extractIdentityFromCertName(redirects[1].getPrefix(-1)), "/ndn/site1");
 }
 
 BOOST_AUTO_TEST_CASE(ErrorHandling)
@@ -104,7 +104,7 @@
 
   CaProfile item;
   item.m_caPrefix = Name("/site");
-  item.m_cert = std::make_shared<security::v2::Certificate>(cert);
+  item.m_cert = std::make_shared<security::Certificate>(cert);
   RequesterState state(m_keyChain, item, RequestType::NEW);
 
   Data errorPacket;