Adjust includes for the updated locations of ndn-cxx security headers
Change-Id: Ia4a82d7a4a56bfa88e62adab6a1e31bbe459e773
diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index dba1c6b..a2bd683 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -66,7 +66,7 @@
util::DummyClientFace face;
output_test_stream output("");
- Consumer cons(security::v2::getAcceptAllValidator(), output);
+ Consumer cons(security::getAcceptAllValidator(), output);
auto interest = makeInterest(name, true);
@@ -101,7 +101,7 @@
util::DummyClientFace face;
output_test_stream output("");
- Consumer cons(security::v2::getAcceptAllValidator(), output);
+ Consumer cons(security::getAcceptAllValidator(), output);
auto interest = makeInterest(name, true);
std::vector<shared_ptr<Data>> dataStore;
@@ -156,7 +156,7 @@
boost::asio::io_service io;
util::DummyClientFace face(io);
Options options;
- Consumer consumer(security::v2::getAcceptAllValidator());
+ Consumer consumer(security::getAcceptAllValidator());
Name prefix = Name("/ndn/chunks/test").appendVersion(1);
auto discover = make_unique<DiscoverVersion>(face, prefix, options);
diff --git a/tests/identity-management-fixture.cpp b/tests/identity-management-fixture.cpp
index 171216f..b4097d2 100644
--- a/tests/identity-management-fixture.cpp
+++ b/tests/identity-management-fixture.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 ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -18,11 +18,13 @@
*/
#include "identity-management-fixture.hpp"
+
+#include <ndn-cxx/security/certificate.hpp>
#include <ndn-cxx/security/pib/identity.hpp>
#include <ndn-cxx/security/pib/key.hpp>
#include <ndn-cxx/security/pib/pib.hpp>
-#include <ndn-cxx/security/v2/certificate.hpp>
#include <ndn-cxx/util/io.hpp>
+
#include <boost/filesystem.hpp>
namespace ndn {
@@ -56,7 +58,7 @@
bool
IdentityManagementFixture::saveIdentityCertificate(const Name& identity, const std::string& filename, bool wantAdd)
{
- security::v2::Certificate cert;
+ security::Certificate cert;
try {
cert = m_keyChain.getPib().getIdentity(identity).getDefaultKey().getDefaultCertificate();
}
diff --git a/tools/chunks/catchunks/consumer.cpp b/tools/chunks/catchunks/consumer.cpp
index e7f751e..12de675 100644
--- a/tools/chunks/catchunks/consumer.cpp
+++ b/tools/chunks/catchunks/consumer.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -30,7 +30,7 @@
namespace ndn {
namespace chunks {
-Consumer::Consumer(security::v2::Validator& validator, std::ostream& os)
+Consumer::Consumer(security::Validator& validator, std::ostream& os)
: m_validator(validator)
, m_outputStream(os)
, m_nextToPrint(0)
@@ -71,7 +71,7 @@
m_bufferedData[getSegmentFromPacket(data)] = dataPtr;
writeInOrderData();
},
- [] (const Data&, const security::v2::ValidationError& error) {
+ [] (const Data&, const security::ValidationError& error) {
NDN_THROW(DataValidationError(error));
});
}
diff --git a/tools/chunks/catchunks/consumer.hpp b/tools/chunks/catchunks/consumer.hpp
index 10008c9..9972d76 100644
--- a/tools/chunks/catchunks/consumer.hpp
+++ b/tools/chunks/catchunks/consumer.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2018, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -31,8 +31,8 @@
#include "discover-version.hpp"
#include "pipeline-interests.hpp"
-#include <ndn-cxx/security/v2/validation-error.hpp>
-#include <ndn-cxx/security/v2/validator.hpp>
+#include <ndn-cxx/security/validation-error.hpp>
+#include <ndn-cxx/security/validator.hpp>
namespace ndn {
namespace chunks {
@@ -61,7 +61,7 @@
{
public:
explicit
- DataValidationError(const security::v2::ValidationError& error)
+ DataValidationError(const security::ValidationError& error)
: std::runtime_error(boost::lexical_cast<std::string>(error))
{
}
@@ -71,7 +71,7 @@
* @brief Create the consumer
*/
explicit
- Consumer(security::v2::Validator& validator, std::ostream& os = std::cout);
+ Consumer(security::Validator& validator, std::ostream& os = std::cout);
/**
* @brief Run the consumer
@@ -88,7 +88,7 @@
writeInOrderData();
private:
- security::v2::Validator& m_validator;
+ security::Validator& m_validator;
std::ostream& m_outputStream;
unique_ptr<DiscoverVersion> m_discover;
unique_ptr<PipelineInterests> m_pipeline;
diff --git a/tools/chunks/catchunks/main.cpp b/tools/chunks/catchunks/main.cpp
index 39b808c..cfb4124 100644
--- a/tools/chunks/catchunks/main.cpp
+++ b/tools/chunks/catchunks/main.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2019, Regents of the University of California,
+ * Copyright (c) 2016-2020, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -252,7 +252,7 @@
return 2;
}
- Consumer consumer(security::v2::getAcceptAllValidator());
+ Consumer consumer(security::getAcceptAllValidator());
BOOST_ASSERT(discover != nullptr);
BOOST_ASSERT(pipeline != nullptr);
consumer.run(std::move(discover), std::move(pipeline));