diff --git a/src/clients/iterative-query-controller.cpp b/src/clients/iterative-query-controller.cpp
index 6500c79..b40ba9b 100644
--- a/src/clients/iterative-query-controller.cpp
+++ b/src/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.
@@ -32,7 +32,7 @@
                                                    const QuerySucceedCallback& onSucceed,
                                                    const QueryFailCallback& onFail,
                                                    Face& face,
-                                                   security::v2::Validator* validator,
+                                                   security::Validator* validator,
                                                    ndn::InMemoryStorage* cache)
   : QueryController(dstLabel, rrType, interestLifetime, onSucceed, onFail, face)
   , m_validator(validator)
@@ -86,7 +86,7 @@
   else {
     m_validator->validate(*toBeValidatedData,
                           bind(&IterativeQueryController::onDataValidated, this, _1, contentType),
-                          [this] (const Data& data, const security::v2::ValidationError& err) {
+                          [this] (const Data& data, const security::ValidationError& err) {
                             NDNS_LOG_WARN("data: " << data.getName() << " fails verification");
                             this->abort();
                           }
diff --git a/src/clients/iterative-query-controller.hpp b/src/clients/iterative-query-controller.hpp
index 936ca38..cee2976 100644
--- a/src/clients/iterative-query-controller.hpp
+++ b/src/clients/iterative-query-controller.hpp
@@ -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.
@@ -60,7 +60,7 @@
   IterativeQueryController(const Name& dstLabel, const name::Component& rrType,
                            const time::milliseconds& interestLifetime,
                            const QuerySucceedCallback& onSucceed, const QueryFailCallback& onFail,
-                           Face& face, security::v2::Validator* validator = nullptr,
+                           Face& face, security::Validator* validator = nullptr,
                            ndn::InMemoryStorage* cache = nullptr);
 
   virtual void
@@ -138,7 +138,7 @@
   isAbsentByDoe(const Data& data) const;
 
 protected:
-  security::v2::Validator* m_validator;
+  security::Validator* m_validator;
   /**
    * @brief current query step
    */
diff --git a/src/daemon/name-server.cpp b/src/daemon/name-server.cpp
index 3e0c2b6..c1d3bfa 100644
--- a/src/daemon/name-server.cpp
+++ b/src/daemon/name-server.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.
@@ -30,7 +30,7 @@
 const time::milliseconds NAME_SERVER_DEFAULT_CONTENT_FRESHNESS(4000);
 
 NameServer::NameServer(const Name& zoneName, const Name& certName, Face& face, DbMgr& dbMgr,
-                       KeyChain& keyChain, security::v2::Validator& validator)
+                       KeyChain& keyChain, security::Validator& validator)
   : m_zone(zoneName)
   , m_dbMgr(dbMgr)
   , m_ndnsPrefix(zoneName)
@@ -133,7 +133,7 @@
     }
     m_validator.validate(*data,
                          bind(&NameServer::doUpdate, this, interest.shared_from_this(), data),
-                         [] (const Data& data, const security::v2::ValidationError& msg) {
+                         [] (const Data& data, const security::ValidationError& msg) {
                            NDNS_LOG_WARN("Ignoring update that did not pass the verification. "
                                          << "Check the root certificate");
                          });
diff --git a/src/daemon/name-server.hpp b/src/daemon/name-server.hpp
index d54a71b..fd820e5 100644
--- a/src/daemon/name-server.hpp
+++ b/src/daemon/name-server.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.
@@ -53,7 +53,7 @@
 public:
   explicit
   NameServer(const Name& zoneName, const Name& certName, Face& face, DbMgr& dbMgr,
-             KeyChain& keyChain, security::v2::Validator& validator);
+             KeyChain& keyChain, security::Validator& validator);
 
 NDNS_PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   void
@@ -117,7 +117,7 @@
 
   Face& m_face;
   KeyChain& m_keyChain;
-  security::v2::Validator& m_validator;
+  security::Validator& m_validator;
 };
 
 } // namespace ndns
diff --git a/src/daemon/rrset-factory.cpp b/src/daemon/rrset-factory.cpp
index 710a513..029e3b0 100644
--- a/src/daemon/rrset-factory.cpp
+++ b/src/daemon/rrset-factory.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.
@@ -178,7 +178,7 @@
 RrsetFactory::generateCertRrset(const Name& label,
                                 uint64_t version,
                                 time::seconds ttl,
-                                const ndn::security::v2::Certificate& cert)
+                                const ndn::security::Certificate& cert)
 {
   if (!m_checked) {
     BOOST_THROW_EXCEPTION(Error("You have to call checkZoneKey before call generate functions"));
diff --git a/src/daemon/rrset-factory.hpp b/src/daemon/rrset-factory.hpp
index e8babc7..1773fe0 100644
--- a/src/daemon/rrset-factory.hpp
+++ b/src/daemon/rrset-factory.hpp
@@ -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.
@@ -80,7 +80,7 @@
   generateCertRrset(const Name& label,
                     uint64_t version,
                     time::seconds ttl,
-                    const ndn::security::v2::Certificate& cert);
+                    const ndn::security::Certificate& cert);
 
   /**
    * @brief DoE records are just txt records of all entries of a zone
diff --git a/src/mgmt/management-tool.cpp b/src/mgmt/management-tool.cpp
index 3119840..9f363dc 100644
--- a/src/mgmt/management-tool.cpp
+++ b/src/mgmt/management-tool.cpp
@@ -47,7 +47,7 @@
 using security::transform::base64Encode;
 using security::transform::streamSink;
 using security::transform::bufferSource;
-using security::v2::Certificate;
+using security::Certificate;
 using security::Identity;
 using security::Key;
 
@@ -213,7 +213,7 @@
 ManagementTool::exportCertificate(const Name& certName, const std::string& outFile)
 {
   // only search in local NDNS database
-  security::v2::Certificate cert;
+  security::Certificate cert;
   shared_ptr<Regex> regex = make_shared<Regex>("(<>*)<NDNS>(<>+)<CERT><>");
   if (!regex->match(certName)) {
     BOOST_THROW_EXCEPTION(Error("Certificate name is illegal"));
@@ -229,7 +229,7 @@
   rrset.setLabel(label);
   rrset.setType(label::CERT_RR_TYPE);
   if (m_dbMgr.find(rrset)) {
-    cert = security::v2::Certificate(rrset.getData());
+    cert = security::Certificate(rrset.getData());
   }
   else {
     BOOST_THROW_EXCEPTION(Error("Cannot find the cert: " + certName.toUri()));
@@ -390,11 +390,11 @@
   generateDoe(*rrset.getZone());
 }
 
-security::v2::Certificate
+security::Certificate
 ManagementTool::getZoneDkey(Zone& zone)
 {
   std::map<std::string, Block> zoneInfo = m_dbMgr.getZoneInfo(zone);
-  return security::v2::Certificate(zoneInfo["dkey"]);
+  return security::Certificate(zoneInfo["dkey"]);
 }
 
 void
@@ -502,7 +502,7 @@
         ndn::util::IndentedStream istream(os, "; ");
 
         if (re.getRrType() == label::CERT_RR_TYPE) {
-          security::v2::Certificate cert(rrset.getData());
+          security::Certificate cert(rrset.getData());
           os << cert;
           // cert.printCertificate(istream);
         }
diff --git a/src/mgmt/management-tool.hpp b/src/mgmt/management-tool.hpp
index 64d2904..5b9b51e 100644
--- a/src/mgmt/management-tool.hpp
+++ b/src/mgmt/management-tool.hpp
@@ -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.
@@ -203,7 +203,7 @@
            const name::Component& type,
            std::ostream& os);
 
-  security::v2::Certificate
+  security::Certificate
   getZoneDkey(Zone& zone);
 
   /** @brief generates an output like DNS zone file. Reference:
@@ -228,9 +228,9 @@
   /** @brief add CERT to the NDNS local database
    */
   void
-  addIdCert(Zone& zone, const ndn::security::v2::Certificate& cert,
+  addIdCert(Zone& zone, const ndn::security::Certificate& cert,
             const time::seconds& ttl,
-            const ndn::security::v2::Certificate& dskCertName);
+            const ndn::security::Certificate& dskCertName);
 
   /** @brief add zone to the NDNS local database
    */
diff --git a/src/util/cert-helper.cpp b/src/util/cert-helper.cpp
index b4f3cab..164a34f 100644
--- a/src/util/cert-helper.cpp
+++ b/src/util/cert-helper.cpp
@@ -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.
@@ -39,7 +39,7 @@
   }
 }
 
-security::v2::Certificate
+security::Certificate
 CertHelper::getCertificate(const KeyChain& keyChain,
                            const Name& identity,
                            const Name& certName)
@@ -67,7 +67,7 @@
   BOOST_THROW_EXCEPTION(std::runtime_error(certName.toUri() + " is not a legal cert name"));
 }
 
-security::v2::Certificate
+security::Certificate
 CertHelper::getCertificate(const KeyChain& keyChain,
                            const Name& certName)
 {
@@ -89,7 +89,7 @@
                                             .getName();
 }
 
-security::v2::Certificate
+security::Certificate
 CertHelper::createCertificate(KeyChain& keyChain,
                               const security::Key& key,
                               const security::Key& signingKey,
@@ -100,7 +100,7 @@
   certificateName
     .append(issuer)
     .appendVersion();
-  security::v2::Certificate certificate;
+  security::Certificate certificate;
   certificate.setName(certificateName);
 
   // set metainfo
diff --git a/src/util/cert-helper.hpp b/src/util/cert-helper.hpp
index 6fd5f20..e9b627f 100644
--- a/src/util/cert-helper.hpp
+++ b/src/util/cert-helper.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.
@@ -40,12 +40,12 @@
   static Name
   getIdentityNameFromCert(const Name& certName);
 
-  static security::v2::Certificate
+  static security::Certificate
   getCertificate(const KeyChain& keyChain,
                  const Name& identity,
                  const Name& certName);
 
-  static security::v2::Certificate
+  static security::Certificate
   getCertificate(const KeyChain& keyChain,
                  const Name& certName);
 
@@ -55,7 +55,7 @@
   static const Name&
   getDefaultCertificateNameOfIdentity(const KeyChain& keyChain, const Name& identityName);
 
-  static security::v2::Certificate
+  static security::Certificate
   createCertificate(KeyChain& keyChain,
                     const security::Key& key,
                     const security::Key& signingKey,
diff --git a/src/validator/certificate-fetcher-ndns-appcert.cpp b/src/validator/certificate-fetcher-ndns-appcert.cpp
index e451e96..81f31c6 100644
--- a/src/validator/certificate-fetcher-ndns-appcert.cpp
+++ b/src/validator/certificate-fetcher-ndns-appcert.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.
@@ -27,7 +27,7 @@
 namespace ndn {
 namespace ndns {
 
-using security::v2::Certificate;
+using security::Certificate;
 
 CertificateFetcherAppCert::CertificateFetcherAppCert(Face& face,
                                                      size_t nsCacheSize,
@@ -40,8 +40,8 @@
 }
 
 void
-CertificateFetcherAppCert::doFetch(const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                   const shared_ptr<security::v2::ValidationState>& state,
+CertificateFetcherAppCert::doFetch(const shared_ptr<security::CertificateRequest>& certRequest,
+                                   const shared_ptr<security::ValidationState>& state,
                                    const ValidationContinuation& continueValidation)
 {
   const Name& key = certRequest->interest.getName();
@@ -64,40 +64,40 @@
 
 void
 CertificateFetcherAppCert::onQuerySuccessCallback(const Data& data,
-                                                  const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                                  const shared_ptr<security::v2::ValidationState>& state,
+                                                  const shared_ptr<security::CertificateRequest>& certRequest,
+                                                  const shared_ptr<security::ValidationState>& state,
                                                   const ValidationContinuation& continueValidation)
 {
   m_validator->validate(data,
                         [=] (const Data& d) {
                           onValidationSuccessCallback(d, certRequest, state, continueValidation);
                         },
-                        [=] (const Data&, const security::v2::ValidationError& err) {
+                        [=] (const Data&, const security::ValidationError& err) {
                           onValidationFailCallback(err, certRequest, state, continueValidation);
                         });
 }
 
 void
 CertificateFetcherAppCert::onQueryFailCallback(const std::string& errMsg,
-                                               const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                               const shared_ptr<security::v2::ValidationState>& state,
+                                               const shared_ptr<security::CertificateRequest>& certRequest,
+                                               const shared_ptr<security::ValidationState>& state,
                                                const ValidationContinuation& continueValidation)
 {
   state->removeTag<IterativeQueryTag>();
-  state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate due to " +
+  state->fail({security::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate due to " +
                errMsg + " `" + certRequest->interest.getName().toUri() + "`"});
 }
 
 void
 CertificateFetcherAppCert::onValidationSuccessCallback(const Data& data,
-                                                       const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                                       const shared_ptr<security::v2::ValidationState>& state,
+                                                       const shared_ptr<security::CertificateRequest>& certRequest,
+                                                       const shared_ptr<security::ValidationState>& state,
                                                        const ValidationContinuation& continueValidation)
 {
   state->removeTag<IterativeQueryTag>();
 
   if (data.getContentType() == NDNS_NACK) {
-    return state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT,
+    return state->fail({security::ValidationError::Code::CANNOT_RETRIEVE_CERT,
                         "Cannot fetch certificate: got Nack for query `" +
                         certRequest->interest.getName().toUri() + "`"});
   }
@@ -107,7 +107,7 @@
     cert = Certificate(data.getContent().blockFromValue());
   }
   catch (const ndn::tlv::Error& e) {
-    return state->fail({security::v2::ValidationError::Code::MALFORMED_CERT, "Fetched a malformed "
+    return state->fail({security::ValidationError::Code::MALFORMED_CERT, "Fetched a malformed "
                         "certificate `" + data.getName().toUri() + "` (" + e.what() + ")"});
   }
 
@@ -115,13 +115,13 @@
 }
 
 void
-CertificateFetcherAppCert::onValidationFailCallback(const security::v2::ValidationError& err,
-                                                    const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                                    const shared_ptr<security::v2::ValidationState>& state,
+CertificateFetcherAppCert::onValidationFailCallback(const security::ValidationError& err,
+                                                    const shared_ptr<security::CertificateRequest>& certRequest,
+                                                    const shared_ptr<security::ValidationState>& state,
                                                     const ValidationContinuation& continueValidation)
 {
   state->removeTag<IterativeQueryTag>();
-  state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT,
+  state->fail({security::ValidationError::Code::CANNOT_RETRIEVE_CERT,
                "Cannot fetch certificate due to NDNS validation error: " +
                err.getInfo() + " `" + certRequest->interest.getName().toUri() + "`"});
 }
diff --git a/src/validator/certificate-fetcher-ndns-appcert.hpp b/src/validator/certificate-fetcher-ndns-appcert.hpp
index 2bd9305..cf8bb35 100644
--- a/src/validator/certificate-fetcher-ndns-appcert.hpp
+++ b/src/validator/certificate-fetcher-ndns-appcert.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.
@@ -21,7 +21,7 @@
 #define NDNS_VALIDATOR_CERTIFICATE_FETCHER_NDNS_APPCERT_HPP
 
 #include <ndn-cxx/ims/in-memory-storage.hpp>
-#include <ndn-cxx/security/v2/validator.hpp>
+#include <ndn-cxx/security/validator.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -31,7 +31,7 @@
  * By an iterative-query process, it will retrieve the record, execute authentications,
  * and de-encapsulate record to get application's certificate.
  */
-class CertificateFetcherAppCert : public security::v2::CertificateFetcher
+class CertificateFetcherAppCert : public security::CertificateFetcher
 {
 public:
   explicit
@@ -47,8 +47,8 @@
    * If validated, de-encapsulate and call continueValidation.
    */
   void
-  doFetch(const shared_ptr<security::v2::CertificateRequest>& certRequest,
-          const shared_ptr<security::v2::ValidationState>& state,
+  doFetch(const shared_ptr<security::CertificateRequest>& certRequest,
+          const shared_ptr<security::ValidationState>& state,
           const ValidationContinuation& continueValidation) override;
 
 private:
@@ -57,8 +57,8 @@
    */
   void
   onQuerySuccessCallback(const Data& data,
-                         const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                         const shared_ptr<security::v2::ValidationState>& state,
+                         const shared_ptr<security::CertificateRequest>& certRequest,
+                         const shared_ptr<security::ValidationState>& state,
                          const ValidationContinuation& continueValidation);
 
   /**
@@ -68,8 +68,8 @@
    */
   void
   onQueryFailCallback(const std::string& errMsg,
-                      const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                      const shared_ptr<security::v2::ValidationState>& state,
+                      const shared_ptr<security::CertificateRequest>& certRequest,
+                      const shared_ptr<security::ValidationState>& state,
                       const ValidationContinuation& continueValidation);
 
   /**
@@ -77,22 +77,22 @@
    */
   void
   onValidationSuccessCallback(const Data& data,
-                              const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                              const shared_ptr<security::v2::ValidationState>& state,
+                              const shared_ptr<security::CertificateRequest>& certRequest,
+                              const shared_ptr<security::ValidationState>& state,
                               const ValidationContinuation& continueValidation);
 
   /**
    * @brief Callback invoked when rrset validation failed
    */
   void
-  onValidationFailCallback(const security::v2::ValidationError& err,
-                           const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                           const shared_ptr<security::v2::ValidationState>& state,
+  onValidationFailCallback(const security::ValidationError& err,
+                           const shared_ptr<security::CertificateRequest>& certRequest,
+                           const shared_ptr<security::ValidationState>& state,
                            const ValidationContinuation& continueValidation);
 
 private:
   Face& m_face;
-  unique_ptr<security::v2::Validator> m_validator;
+  unique_ptr<security::Validator> m_validator;
   InMemoryStorage* m_nsCache;
   size_t m_startComponentIndex;
 };
@@ -100,4 +100,4 @@
 } // namespace ndns
 } // namespace ndn
 
-#endif // NDNS_VALIDATOR_CERTIFICATE_FETCHER_NDNS_APPCERT_HPP
\ No newline at end of file
+#endif // NDNS_VALIDATOR_CERTIFICATE_FETCHER_NDNS_APPCERT_HPP
diff --git a/src/validator/certificate-fetcher-ndns-cert.cpp b/src/validator/certificate-fetcher-ndns-cert.cpp
index bf64515..b1979b5 100644
--- a/src/validator/certificate-fetcher-ndns-cert.cpp
+++ b/src/validator/certificate-fetcher-ndns-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 @@
 namespace ndn {
 namespace ndns {
 
-using security::v2::Certificate;
+using security::Certificate;
 
 NDNS_LOG_INIT(CertificateFetcherNdnsCert);
 
@@ -42,8 +42,8 @@
 }
 
 void
-CertificateFetcherNdnsCert::doFetch(const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                    const shared_ptr<security::v2::ValidationState>& state,
+CertificateFetcherNdnsCert::doFetch(const shared_ptr<security::CertificateRequest>& certRequest,
+                                    const shared_ptr<security::ValidationState>& state,
                                     const ValidationContinuation& continueValidation)
 {
   const Name& key = certRequest->interest.getName();
@@ -77,8 +77,8 @@
 
 void
 CertificateFetcherNdnsCert::nsSuccessCallback(const Data& data,
-                                              const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                              const shared_ptr<security::v2::ValidationState>& state,
+                                              const shared_ptr<security::CertificateRequest>& certRequest,
+                                              const shared_ptr<security::ValidationState>& state,
                                               const ValidationContinuation& continueValidation)
 {
   Name interestName(certRequest->interest.getName());
@@ -113,8 +113,8 @@
 
 void
 CertificateFetcherNdnsCert::nsFailCallback(const std::string& errMsg,
-                                           const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                           const shared_ptr<security::v2::ValidationState>& state,
+                                           const shared_ptr<security::CertificateRequest>& certRequest,
+                                           const shared_ptr<security::ValidationState>& state,
                                            const ValidationContinuation& continueValidation)
 {
   NDNS_LOG_WARN("Cannot fetch link due to " +
@@ -148,8 +148,8 @@
 
 void
 CertificateFetcherNdnsCert::dataCallback(const Data& data,
-                                         const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                         const shared_ptr<security::v2::ValidationState>& state,
+                                         const shared_ptr<security::CertificateRequest>& certRequest,
+                                         const shared_ptr<security::ValidationState>& state,
                                          const ValidationContinuation& continueValidation)
 {
   NDNS_LOG_DEBUG("Fetched certificate from network " << data.getName());
@@ -161,7 +161,7 @@
     cert = Certificate(data);
   }
   catch (const ndn::tlv::Error& e) {
-    return state->fail({security::v2::ValidationError::Code::MALFORMED_CERT, "Fetched a malformed "
+    return state->fail({security::ValidationError::Code::MALFORMED_CERT, "Fetched a malformed "
                         "certificate `" + data.getName().toUri() + "` (" + e.what() + ")"});
   }
 
@@ -170,8 +170,8 @@
 
 void
 CertificateFetcherNdnsCert::nackCallback(const lp::Nack& nack,
-                                         const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                         const shared_ptr<security::v2::ValidationState>& state,
+                                         const shared_ptr<security::CertificateRequest>& certRequest,
+                                         const shared_ptr<security::ValidationState>& state,
                                          const ValidationContinuation& continueValidation)
 {
   NDNS_LOG_DEBUG("NACK (" << nack.getReason() <<  ") while fetching certificate "
@@ -184,14 +184,14 @@
   }
   else {
     state->removeTag<IterativeQueryTag>();
-    state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate "
+    state->fail({security::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate "
                  "after all retries `" + certRequest->interest.getName().toUri() + "`"});
   }
 }
 
 void
-CertificateFetcherNdnsCert::timeoutCallback(const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                                            const shared_ptr<security::v2::ValidationState>& state,
+CertificateFetcherNdnsCert::timeoutCallback(const shared_ptr<security::CertificateRequest>& certRequest,
+                                            const shared_ptr<security::ValidationState>& state,
                                             const ValidationContinuation& continueValidation)
 {
   NDNS_LOG_DEBUG("Timeout while fetching certificate " << certRequest->interest.getName()
@@ -203,7 +203,7 @@
   }
   else {
     state->removeTag<IterativeQueryTag>();
-    state->fail({security::v2::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate "
+    state->fail({security::ValidationError::Code::CANNOT_RETRIEVE_CERT, "Cannot fetch certificate "
                  "after all retries `" + certRequest->interest.getName().toUri() + "`"});
   }
 }
diff --git a/src/validator/certificate-fetcher-ndns-cert.hpp b/src/validator/certificate-fetcher-ndns-cert.hpp
index a67e5b0..f0df918 100644
--- a/src/validator/certificate-fetcher-ndns-cert.hpp
+++ b/src/validator/certificate-fetcher-ndns-cert.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,7 +22,7 @@
 
 #include <ndn-cxx/face.hpp>
 #include <ndn-cxx/ims/in-memory-storage.hpp>
-#include <ndn-cxx/security/v2/certificate-fetcher.hpp>
+#include <ndn-cxx/security/certificate-fetcher.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -30,7 +30,7 @@
 /**
  * @brief Fetch NDNS-owned certificate by an iterative query process
  */
-class CertificateFetcherNdnsCert : public security::v2::CertificateFetcher
+class CertificateFetcherNdnsCert : public security::CertificateFetcher
 {
 public:
   explicit
@@ -46,8 +46,8 @@
 
 protected:
   void
-  doFetch(const shared_ptr<security::v2::CertificateRequest>& certRequest,
-          const shared_ptr<security::v2::ValidationState>& state,
+  doFetch(const shared_ptr<security::CertificateRequest>& certRequest,
+          const shared_ptr<security::ValidationState>& state,
           const ValidationContinuation& continueValidation) override;
 
 private:
@@ -56,8 +56,8 @@
    */
   void
   nsSuccessCallback(const Data& data,
-                    const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                    const shared_ptr<security::v2::ValidationState>& state,
+                    const shared_ptr<security::CertificateRequest>& certRequest,
+                    const shared_ptr<security::ValidationState>& state,
                     const ValidationContinuation& continueValidation);
 
   /**
@@ -67,8 +67,8 @@
    */
   void
   nsFailCallback(const std::string& errMsg,
-                 const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                 const shared_ptr<security::v2::ValidationState>& state,
+                 const shared_ptr<security::CertificateRequest>& certRequest,
+                 const shared_ptr<security::ValidationState>& state,
                  const ValidationContinuation& continueValidation);
 
   /**
@@ -84,8 +84,8 @@
    */
   void
   dataCallback(const Data& data,
-               const shared_ptr<security::v2::CertificateRequest>& certRequest,
-               const shared_ptr<security::v2::ValidationState>& state,
+               const shared_ptr<security::CertificateRequest>& certRequest,
+               const shared_ptr<security::ValidationState>& state,
                const ValidationContinuation& continueValidation);
   /**
    * @brief Callback invoked when interest for fetching certificate gets NACKed.
@@ -96,8 +96,8 @@
    */
   void
   nackCallback(const lp::Nack& nack,
-               const shared_ptr<security::v2::CertificateRequest>& certRequest,
-               const shared_ptr<security::v2::ValidationState>& state,
+               const shared_ptr<security::CertificateRequest>& certRequest,
+               const shared_ptr<security::ValidationState>& state,
                const ValidationContinuation& continueValidation);
 
   /**
@@ -106,8 +106,8 @@
    * It will retry if certRequest->m_nRetriesLeft > 0
    */
   void
-  timeoutCallback(const shared_ptr<security::v2::CertificateRequest>& certRequest,
-                  const shared_ptr<security::v2::ValidationState>& state,
+  timeoutCallback(const shared_ptr<security::CertificateRequest>& certRequest,
+                  const shared_ptr<security::ValidationState>& state,
                   const ValidationContinuation& continueValidation);
 protected:
   Face& m_face;
@@ -120,4 +120,4 @@
 } // namespace ndns
 } // namespace ndn
 
-#endif // NDNS_VALIDATOR_CERTIFICATE_FETCHER_NDNS_CERT_HPP
\ No newline at end of file
+#endif // NDNS_VALIDATOR_CERTIFICATE_FETCHER_NDNS_CERT_HPP
diff --git a/src/validator/validator.cpp b/src/validator/validator.cpp
index 1e14f92..2be191e 100644
--- a/src/validator/validator.cpp
+++ b/src/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.
@@ -22,7 +22,7 @@
 #include "certificate-fetcher-ndns-cert.hpp"
 #include "logger.hpp"
 
-#include <ndn-cxx/security/v2/validation-policy-config.hpp>
+#include <ndn-cxx/security/validation-policy-config.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -31,17 +31,17 @@
 
 std::string NdnsValidatorBuilder::VALIDATOR_CONF_FILE(NDNS_CONFDIR "/validator.conf");
 
-unique_ptr<security::v2::Validator>
+unique_ptr<security::Validator>
 NdnsValidatorBuilder::create(Face& face,
                              size_t nsCacheSize,
                              size_t startComponentIndex,
                              const std::string& confFile)
 {
-  auto validator = make_unique<security::v2::Validator>(make_unique<security::v2::ValidationPolicyConfig>(),
-                                                        make_unique<CertificateFetcherNdnsCert>(face,
-                                                                                                nsCacheSize,
-                                                                                                startComponentIndex));
-  auto& policy = dynamic_cast<security::v2::ValidationPolicyConfig&>(validator->getPolicy());
+  auto validator = make_unique<security::Validator>(make_unique<security::ValidationPolicyConfig>(),
+                                                    make_unique<CertificateFetcherNdnsCert>(face,
+                                                                                            nsCacheSize,
+                                                                                            startComponentIndex));
+  auto& policy = dynamic_cast<security::ValidationPolicyConfig&>(validator->getPolicy());
   policy.load(confFile);
   NDNS_LOG_TRACE("Validator loads configuration: " << confFile);
 
diff --git a/src/validator/validator.hpp b/src/validator/validator.hpp
index 92a4c09..cf3a6bb 100644
--- a/src/validator/validator.hpp
+++ b/src/validator/validator.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 "config.hpp"
 
 #include <ndn-cxx/data.hpp>
-#include <ndn-cxx/security/v2/validator.hpp>
+#include <ndn-cxx/security/validator.hpp>
 
 namespace ndn {
 namespace ndns {
@@ -33,7 +33,7 @@
 public:
   static std::string VALIDATOR_CONF_FILE;
 
-  static unique_ptr<security::v2::Validator>
+  static unique_ptr<security::Validator>
   create(Face& face,
          size_t nsCacheSize = 500,
          size_t startComponentIndex = 0,
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);
                         });
diff --git a/tools/ndns-create-zone.cpp b/tools/ndns-create-zone.cpp
index eaea7ee..e20b200 100644
--- a/tools/ndns-create-zone.cpp
+++ b/tools/ndns-create-zone.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.
@@ -130,7 +130,7 @@
     KeyChain keyChain;
     ndn::ndns::ManagementTool tool(db, keyChain);
     ndn::ndns::Zone createdZone = tool.createZone(zone, parent, cacheTtl, certTtl, ksk, dsk, dkey);
-    ndn::security::v2::Certificate dkeyCert = tool.getZoneDkey(createdZone);
+    ndn::security::Certificate dkeyCert = tool.getZoneDkey(createdZone);
     NDNS_LOG_INFO("Generated DKEY " << dkeyCert.getName());
     ndn::io::save(dkeyCert, std::cout);
   }
diff --git a/tools/ndns-daemon.cpp b/tools/ndns-daemon.cpp
index 0414e1f..2f71a45 100644
--- a/tools/ndns-daemon.cpp
+++ b/tools/ndns-daemon.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.
@@ -124,7 +124,7 @@
 private:
   Face& m_face;
   Face& m_validatorFace;
-  unique_ptr<security::v2::Validator> m_validator;
+  unique_ptr<security::Validator> m_validator;
   unique_ptr<DbMgr> m_dbMgr;
   std::vector<shared_ptr<NameServer>> m_servers;
   KeyChain m_keyChain;
diff --git a/tools/ndns-dig.cpp b/tools/ndns-dig.cpp
index 3f533a7..5cb6a40 100644
--- a/tools/ndns-dig.cpp
+++ b/tools/ndns-dig.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.
@@ -170,7 +170,7 @@
   }
 
   void
-  onDataValidationFailed(const Data& data, const security::v2::ValidationError& err)
+  onDataValidationFailed(const Data& data, const security::ValidationError& err)
   {
     NDNS_LOG_INFO("final data does not pass verification");
     m_hasError = true;
@@ -205,7 +205,7 @@
 
   Face m_face;
 
-  unique_ptr<security::v2::Validator> m_validator;
+  unique_ptr<security::Validator> m_validator;
   bool m_shouldValidateIntermediate;
   std::unique_ptr<QueryController> m_ctr;
 
diff --git a/tools/ndns-update.cpp b/tools/ndns-update.cpp
index 91c3ea1..b810109 100644
--- a/tools/ndns-update.cpp
+++ b/tools/ndns-update.cpp
@@ -161,7 +161,7 @@
   }
 
   void
-  onDataValidationFailed(const Data&, const security::v2::ValidationError&)
+  onDataValidationFailed(const Data&, const security::ValidationError&)
   {
     NDNS_LOG_INFO("data does not pass verification");
     m_hasError = true;
@@ -187,7 +187,7 @@
   time::milliseconds m_interestLifetime;
 
   Face& m_face;
-  unique_ptr<security::v2::Validator> m_validator;
+  unique_ptr<security::Validator> m_validator;
   KeyChain m_keyChain;
 
   shared_ptr<Data> m_update;
diff --git a/wscript b/wscript
index a9b38da..ace234c 100644
--- a/wscript
+++ b/wscript
@@ -96,7 +96,8 @@
             outdir='docs/manpages',
             source=bld.path.ant_glob('docs/manpages/**/*.rst'),
             install_path='${MANDIR}',
-            VERSION=VERSION)
+            version=VERSION_BASE,
+            release=VERSION)
 
 def docs(bld):
     from waflib import Options
