Adjust includes for the updated locations of ndn-cxx security headers
Change-Id: Id1e44e929541fdd1132a4b3e6366404232351e68
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