Adjust includes for the updated locations of ndn-cxx security headers
Change-Id: Id1e44e929541fdd1132a4b3e6366404232351e68
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() + "`"});
}