Adjust includes for the updated locations of ndn-cxx security headers

Change-Id: Id1e44e929541fdd1132a4b3e6366404232351e68
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 64a9a97..8215b75 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.cpp
@@ -20,7 +20,7 @@
 #include "identity-management-fixture.hpp"
 
 #include <ndn-cxx/util/io.hpp>
-#include <ndn-cxx/security/v2/additional-description.hpp>
+#include <ndn-cxx/security/additional-description.hpp>
 
 #include <boost/filesystem.hpp>
 
@@ -28,8 +28,6 @@
 namespace ndns {
 namespace tests {
 
-namespace v2 = security::v2;
-
 IdentityManagementBaseFixture::~IdentityManagementBaseFixture()
 {
   boost::system::error_code ec;
@@ -51,13 +49,13 @@
   }
 }
 
-IdentityManagementV2Fixture::IdentityManagementV2Fixture()
+IdentityManagementFixture::IdentityManagementFixture()
   : m_keyChain("pib-memory:", "tpm-memory:")
 {
 }
 
 security::Identity
-IdentityManagementV2Fixture::addIdentity(const Name& identityName, const KeyParams& params)
+IdentityManagementFixture::addIdentity(const Name& identityName, const KeyParams& params)
 {
   auto identity = m_keyChain.createIdentity(identityName, params);
   m_identities.insert(identityName);
@@ -65,7 +63,7 @@
 }
 
 bool
-IdentityManagementV2Fixture::saveIdentityCertificate(const security::Identity& identity,
+IdentityManagementFixture::saveIdentityCertificate(const security::Identity& identity,
                                                      const std::string& filename)
 {
   try {
@@ -78,12 +76,12 @@
 }
 
 security::Identity
-IdentityManagementV2Fixture::addSubCertificate(const Name& subIdentityName,
+IdentityManagementFixture::addSubCertificate(const Name& subIdentityName,
                                                const security::Identity& issuer, const KeyParams& params)
 {
   auto subIdentity = addIdentity(subIdentityName, params);
 
-  v2::Certificate request = subIdentity.getDefaultKey().getDefaultCertificate();
+  security::Certificate request = subIdentity.getDefaultKey().getDefaultCertificate();
 
   request.setName(request.getKeyName().append("parent").appendVersion());
 
@@ -91,7 +89,7 @@
   info.setValidityPeriod(security::ValidityPeriod(time::system_clock::now(),
                                                   time::system_clock::now() + time::days(7300)));
 
-  v2::AdditionalDescription description;
+  security::AdditionalDescription description;
   description.set("type", "sub-certificate");
   info.addCustomTlv(description.wireEncode());
 
@@ -101,14 +99,14 @@
   return subIdentity;
 }
 
-v2::Certificate
-IdentityManagementV2Fixture::addCertificate(const security::Key& key, const std::string& issuer)
+security::Certificate
+IdentityManagementFixture::addCertificate(const security::Key& key, const std::string& issuer)
 {
   Name certificateName = key.getName();
   certificateName
     .append(issuer)
     .appendVersion();
-  v2::Certificate certificate;
+  security::Certificate certificate;
   certificate.setName(certificateName);
 
   // set metainfo
@@ -127,7 +125,6 @@
   return certificate;
 }
 
-
 } // namespace tests
 } // namespace ndns
 } // namespace ndn
diff --git a/tests/identity-management-fixture.hpp b/tests/identity-management-fixture.hpp
index 6936914..5b4aff3 100644
--- a/tests/identity-management-fixture.hpp
+++ b/tests/identity-management-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -23,7 +23,7 @@
 #include "boost-test.hpp"
 #include "test-home-fixture.hpp"
 
-#include <ndn-cxx/security/v2/key-chain.hpp>
+#include <ndn-cxx/security/key-chain.hpp>
 #include <ndn-cxx/security/signing-helpers.hpp>
 
 #include <vector>
@@ -51,17 +51,17 @@
  * Test cases in the suite can use this fixture to create identities.  Identities,
  * certificates, and saved certificates are automatically removed during test teardown.
  */
-class IdentityManagementV2Fixture : public IdentityManagementBaseFixture
+class IdentityManagementFixture : public IdentityManagementBaseFixture
 {
 public:
-  IdentityManagementV2Fixture();
+  IdentityManagementFixture();
 
   /**
    * @brief Add identity @p identityName
    * @return name of the created self-signed certificate
    */
   security::Identity
-  addIdentity(const Name& identityName, const KeyParams& params = security::v2::KeyChain::getDefaultKeyParams());
+  addIdentity(const Name& identityName, const KeyParams& params = security::KeyChain::getDefaultKeyParams());
 
   /**
    *  @brief Save identity certificate to a file
@@ -83,20 +83,18 @@
    */
   security::Identity
   addSubCertificate(const Name& subIdentityName, const security::Identity& issuer,
-                    const KeyParams& params = security::v2::KeyChain::getDefaultKeyParams());
+                    const KeyParams& params = security::KeyChain::getDefaultKeyParams());
 
   /**
    * @brief Add a self-signed certificate to @p key with issuer ID @p issuer
    */
-  security::v2::Certificate
+  security::Certificate
   addCertificate(const security::Key& key, const std::string& issuer);
 
 protected:
-  security::v2::KeyChain m_keyChain;
+  security::KeyChain m_keyChain;
 };
 
-using IdentityManagementFixture = IdentityManagementV2Fixture;
-
 } // namespace tests
 } // namespace ndns
 } // namespace ndn
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 6553b7f..0746b83 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -43,10 +43,10 @@
 namespace ndns {
 namespace tests {
 
-using ndn::security::v2::KeyChain;
+using ndn::security::KeyChain;
 using ndn::security::Identity;
 using ndn::security::pib::Key;
-using ndn::security::v2::Certificate;
+using ndn::security::Certificate;
 
 /** \brief create an Interest
  *  \param name Interest name
diff --git a/tests/test-home-fixture.hpp b/tests/test-home-fixture.hpp
index b9b7dcf..08d2158 100644
--- a/tests/test-home-fixture.hpp
+++ b/tests/test-home-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2017, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -22,8 +22,6 @@
 
 #include "boost-test.hpp"
 
-#include <ndn-cxx/security/v2/key-chain.hpp>
-
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 #include <fstream>
diff --git a/tests/unit/clients/iterative-query-controller.cpp b/tests/unit/clients/iterative-query-controller.cpp
index 3f51baa..46d11d4 100644
--- a/tests/unit/clients/iterative-query-controller.cpp
+++ b/tests/unit/clients/iterative-query-controller.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2018, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -65,7 +65,7 @@
   ndn::util::DummyClientFace producerFace;
   ndn::util::DummyClientFace consumerFace;
 
-  unique_ptr<security::v2::Validator> validator;
+  unique_ptr<security::Validator> validator;
   ndns::NameServer top;
   ndns::NameServer net;
   ndns::NameServer ndnsim;
diff --git a/tests/unit/daemon/name-server.cpp b/tests/unit/daemon/name-server.cpp
index 76daa2f..cf31a8f 100644
--- a/tests/unit/daemon/name-server.cpp
+++ b/tests/unit/daemon/name-server.cpp
@@ -57,7 +57,7 @@
 public:
   ndn::util::DummyClientFace face;
   const Name& zone;
-  unique_ptr<security::v2::Validator> validator;
+  unique_ptr<security::Validator> validator;
   ndns::NameServer server;
 };
 
@@ -370,7 +370,7 @@
   ndn::util::DummyClientFace face;
   ndn::util::DummyClientFace validatorFace;
   const Name& zone;
-  unique_ptr<security::v2::Validator> validator;
+  unique_ptr<security::Validator> validator;
   ndns::NameServer server;
 };
 
diff --git a/tests/unit/validator/certificate-fetcher-ndns-app-cert.cpp b/tests/unit/validator/certificate-fetcher-ndns-app-cert.cpp
index e062702..d425832 100644
--- a/tests/unit/validator/certificate-fetcher-ndns-app-cert.cpp
+++ b/tests/unit/validator/certificate-fetcher-ndns-app-cert.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -28,7 +28,7 @@
 #include "test-common.hpp"
 #include "unit/database-test-data.hpp"
 
-#include <ndn-cxx/security/v2/validation-policy-simple-hierarchy.hpp>
+#include <ndn-cxx/security/validation-policy-simple-hierarchy.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -36,11 +36,11 @@
 
 BOOST_AUTO_TEST_SUITE(AppCertFetcher)
 
-static unique_ptr<security::v2::Validator>
+static unique_ptr<security::Validator>
 makeValidatorAppCert(Face& face)
 {
-  return make_unique<security::v2::Validator>(make_unique<::ndn::security::v2::ValidationPolicySimpleHierarchy>(),
-                                              make_unique<CertificateFetcherAppCert>(face));
+  return make_unique<security::Validator>(make_unique<::ndn::security::ValidationPolicySimpleHierarchy>(),
+                                          make_unique<CertificateFetcherAppCert>(face));
 }
 
 class AppCertFetcherFixture : public DbTestData
@@ -105,7 +105,7 @@
 
 public:
   util::DummyClientFace m_validatorFace;
-  unique_ptr<security::v2::Validator> m_validator;
+  unique_ptr<security::Validator> m_validator;
   std::vector<unique_ptr<util::DummyClientFace>> m_serverFaces;
   std::vector<shared_ptr<ndns::NameServer>> m_servers;
   Data m_appCertSignedData;
@@ -119,7 +119,7 @@
                          hasValidated = true;
                          BOOST_CHECK(true);
                        },
-                       [&] (const Data& data, const security::v2::ValidationError& str) {
+                       [&] (const Data& data, const security::ValidationError& str) {
                          hasValidated = true;
                          BOOST_CHECK(false);
                        });
diff --git a/tests/unit/validator/validator.cpp b/tests/unit/validator/validator.cpp
index c9ac644..2948ae3 100644
--- a/tests/unit/validator/validator.cpp
+++ b/tests/unit/validator/validator.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2019, Regents of the University of California.
+ * Copyright (c) 2014-2020, Regents of the University of California.
  *
  * This file is part of NDNS (Named Data Networking Domain Name Service).
  * See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -69,7 +69,7 @@
 
 public:
   util::DummyClientFace m_validatorFace;
-  unique_ptr<security::v2::Validator> m_validator;
+  unique_ptr<security::Validator> m_validator;
   std::vector<unique_ptr<util::DummyClientFace>> m_serverFaces;
   std::vector<shared_ptr<ndns::NameServer>> m_servers;
   Name m_ndnsimCert;
@@ -99,7 +99,7 @@
                           hasValidated = true;
                           BOOST_CHECK(true);
                         },
-                        [&] (const Data& data, const security::v2::ValidationError& str) {
+                        [&] (const Data& data, const security::ValidationError& str) {
                           hasValidated = true;
                           BOOST_CHECK(false);
                         });
@@ -125,7 +125,7 @@
                           hasValidated = true;
                           BOOST_CHECK(false);
                         },
-                        [&] (const Data& data, const security::v2::ValidationError& str) {
+                        [&] (const Data& data, const security::ValidationError& str) {
                           hasValidated = true;
                           BOOST_CHECK(true);
                         });
@@ -151,7 +151,7 @@
                           hasValidated = true;
                           BOOST_CHECK(false);
                         },
-                        [&] (const Data& data, const security::v2::ValidationError& str) {
+                        [&] (const Data& data, const security::ValidationError& str) {
                           hasValidated = true;
                           BOOST_CHECK(true);
                         });