tests: delete dead code in KeyChainFixture
Also sync GlobalConfiguration with NFD and reformat
the example configuration files.
Change-Id: Id1580eed30514bcbf2e0653635ccbf65dac24d58
diff --git a/COPYING.md b/COPYING.md
index c91f6ca..496acdb 100644
--- a/COPYING.md
+++ b/COPYING.md
@@ -1,25 +1,4 @@
-ndncert is licensed under the terms of the GNU General Public License,
-version 3 or later.
-
-ndncert relies on third-party software, licensed under the following licenses:
-
-- ndn-cxx is licensed under the terms of the
- [GNU Lesser General Public License version 3](https://github.com/named-data/ndn-cxx/blob/master/COPYING.md)
-
-- The Boost libraries are licensed under the
- [Boost Software License 1.0](https://www.boost.org/users/license.html)
-
-- SQLite is in the [public domain](https://www.sqlite.org/copyright.html)
-
-- The waf build system is licensed under the terms of the
- [BSD license](https://github.com/named-data/ndncert/blob/master/waf)
-
-The GPL license is provided below in this file. For more information about
-these licenses, see <https://www.gnu.org/licenses/>
-
---------------------------------------------------------------------------------
-
-### GNU GENERAL PUBLIC LICENSE
+# GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
@@ -29,7 +8,7 @@
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
-### Preamble
+## Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
@@ -94,9 +73,9 @@
The precise terms and conditions for copying, distribution and
modification follow.
-### TERMS AND CONDITIONS
+## TERMS AND CONDITIONS
-#### 0. Definitions.
+### 0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
@@ -136,7 +115,7 @@
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
-#### 1. Source Code.
+### 1. Source Code.
The "source code" for a work means the preferred form of the work for
making modifications to it. "Object code" means any non-source form of
@@ -177,7 +156,7 @@
The Corresponding Source for a work in source code form is that same
work.
-#### 2. Basic Permissions.
+### 2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
@@ -202,7 +181,7 @@
conditions stated below. Sublicensing is not allowed; section 10 makes
it unnecessary.
-#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+### 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
@@ -218,7 +197,7 @@
the work's users, your or third parties' legal rights to forbid
circumvention of technological measures.
-#### 4. Conveying Verbatim Copies.
+### 4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
@@ -231,7 +210,7 @@
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
-#### 5. Conveying Modified Source Versions.
+### 5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
@@ -266,7 +245,7 @@
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
-#### 6. Conveying Non-Source Forms.
+### 6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of
sections 4 and 5, provided that you also convey the machine-readable
@@ -362,7 +341,7 @@
source code form), and must require no special password or key for
unpacking, reading or copying.
-#### 7. Additional Terms.
+### 7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
@@ -421,7 +400,7 @@
form of a separately written license, or stated as exceptions; the
above requirements apply either way.
-#### 8. Termination.
+### 8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
@@ -449,7 +428,7 @@
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
-#### 9. Acceptance Not Required for Having Copies.
+### 9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run
a copy of the Program. Ancillary propagation of a covered work
@@ -460,7 +439,7 @@
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
-#### 10. Automatic Licensing of Downstream Recipients.
+### 10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
@@ -485,7 +464,7 @@
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
-#### 11. Patents.
+### 11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
@@ -554,7 +533,7 @@
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
-#### 12. No Surrender of Others' Freedom.
+### 12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
@@ -567,7 +546,7 @@
satisfy both those terms and this License would be to refrain entirely
from conveying the Program.
-#### 13. Use with the GNU Affero General Public License.
+### 13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
@@ -578,7 +557,7 @@
section 13, concerning interaction through a network will apply to the
combination as such.
-#### 14. Revised Versions of this License.
+### 14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions
of the GNU General Public License from time to time. Such new versions
@@ -604,7 +583,7 @@
author or copyright holder as a result of your choosing to follow a
later version.
-#### 15. Disclaimer of Warranty.
+### 15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
@@ -616,7 +595,7 @@
DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
CORRECTION.
-#### 16. Limitation of Liability.
+### 16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
@@ -628,7 +607,7 @@
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-#### 17. Interpretation of Sections 15 and 16.
+### 17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
@@ -639,7 +618,7 @@
END OF TERMS AND CONDITIONS
-### How to Apply These Terms to Your New Programs
+## How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
diff --git a/ca.conf.sample b/ca.conf.sample
index a2ca7e1..003da8e 100644
--- a/ca.conf.sample
+++ b/ca.conf.sample
@@ -3,26 +3,29 @@
"ca-info": "An example NDNCERT CA",
"max-validity-period": "1296000",
"max-suffix-length": "2",
- "probe-parameters":
- [
- {"probe-parameter-key": "email"}
+ "probe-parameters": [
+ {
+ "probe-parameter-key": "email"
+ }
],
- "supported-challenges":
- [
- { "challenge": "pin" },
- { "challenge": "email" }
+ "supported-challenges": [
+ {
+ "challenge": "pin"
+ },
+ {
+ "challenge": "email"
+ }
],
- "redirect-to":
- [
- {
- "ca-prefix": "/ndn/edu/ucla",
- "certificate": "Bv0BNQcwCANuZG4IA2VkdQgEdWNsYQgDS0VZCAgAdGt6D7S2VAgEc2VsZggJ/QAAAX5lZMOiFAkYAQIZBAA27oAVWzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABOKmvwHmK5t+MhMPgft4qmKC7YF9I6UM/o7GFa4BjZQknsqLvxdW2zIAF+iPPHJV0eVAijX6bYrQobuomiWZAY0WUBsBAxwhBx8IA25kbggDZWR1CAR1Y2xhCANLRVkICAB0a3oPtLZU/QD9Jv0A/g8xOTcwMDEwMVQwMDAwMDD9AP8PMjA0MjAxMTJUMDAxNjQ5F0cwRQIgBF/HS0j1DMo/dIILv/6IMUmMAhVtS3m97YgS8tsBhC0CIQCgEm0e6KoBCyV6PiueN9YW9zSSkdg8MLCxsyduP8tRsQ=="
- },
- {
- "ca-prefix": "/ndn/edu/ucla/cs",
- "certificate": "Bv0BPgc0CANuZG4IA2VkdQgEdWNsYQgCY3MIA0tFWQgI27kFrpVyxUAIBHNlbGYICf0AAAF+ZZ/79xQJGAECGQQANu6AFVswWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASOLtEWMpMk8tPqPe0VY9SAYA0e969NNy5t0QeseNvr6AbYWQHBR4oa6Ymv3TRlQnyy+IzvKPte5suX/Qhtnjn2FlQbAQMcJQcjCANuZG4IA2VkdQgEdWNsYQgCY3MIA0tFWQgI27kFrpVyxUD9AP0m/QD+DzE5NzAwMTAxVDAwMDAwMP0A/w8yMDQyMDExMlQwMTIxMzAXSDBGAiEAm+aJbcmI0n37Qhear5fo//S02ZlDkmao8a7olSsElx8CIQDD8dZkYfD8xcvYl3vXm7G/NSXFrnrRqxC7NR/4r4swbw=="
- "policy-type": "email",
- "policy-param": "cs.ucla.edu"
- }
+ "redirect-to": [
+ {
+ "ca-prefix": "/ndn/edu/ucla",
+ "certificate": "Bv0BNQcwCANuZG4IA2VkdQgEdWNsYQgDS0VZCAgAdGt6D7S2VAgEc2VsZggJ/QAAAX5lZMOiFAkYAQIZBAA27oAVWzBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABOKmvwHmK5t+MhMPgft4qmKC7YF9I6UM/o7GFa4BjZQknsqLvxdW2zIAF+iPPHJV0eVAijX6bYrQobuomiWZAY0WUBsBAxwhBx8IA25kbggDZWR1CAR1Y2xhCANLRVkICAB0a3oPtLZU/QD9Jv0A/g8xOTcwMDEwMVQwMDAwMDD9AP8PMjA0MjAxMTJUMDAxNjQ5F0cwRQIgBF/HS0j1DMo/dIILv/6IMUmMAhVtS3m97YgS8tsBhC0CIQCgEm0e6KoBCyV6PiueN9YW9zSSkdg8MLCxsyduP8tRsQ=="
+ },
+ {
+ "ca-prefix": "/ndn/edu/ucla/cs",
+ "certificate": "Bv0BPgc0CANuZG4IA2VkdQgEdWNsYQgCY3MIA0tFWQgI27kFrpVyxUAIBHNlbGYICf0AAAF+ZZ/79xQJGAECGQQANu6AFVswWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAASOLtEWMpMk8tPqPe0VY9SAYA0e969NNy5t0QeseNvr6AbYWQHBR4oa6Ymv3TRlQnyy+IzvKPte5suX/Qhtnjn2FlQbAQMcJQcjCANuZG4IA2VkdQgEdWNsYQgCY3MIA0tFWQgI27kFrpVyxUD9AP0m/QD+DzE5NzAwMTAxVDAwMDAwMP0A/w8yMDQyMDExMlQwMTIxMzAXSDBGAiEAm+aJbcmI0n37Qhear5fo//S02ZlDkmao8a7olSsElx8CIQDD8dZkYfD8xcvYl3vXm7G/NSXFrnrRqxC7NR/4r4swbw==",
+ "policy-type": "email",
+ "policy-param": "cs.ucla.edu"
+ }
]
-}
\ No newline at end of file
+}
diff --git a/client.conf.sample b/client.conf.sample
index f3bf724..8dab093 100644
--- a/client.conf.sample
+++ b/client.conf.sample
@@ -1,6 +1,5 @@
{
- "ca-list":
- [
+ "ca-list": [
{
"ca-prefix": "/ndn",
"certificate": "Bv0BSwcjCANuZG4IA0tFWQgIJ8SyKp97gScIA25kbjYIAAABgHX6c7QUCRgBAhkEADbugBVbMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPuDnW4oq0mULLT8PDXh0zuBg+0SJ1yPC85jylUU+hgxX9fDNyjlykLrvb1D6IQRJWJHMKWe6TJKPUhGgOT658hZyGwEDHBYHFAgDbmRuCANLRVkICCfEsiqfe4En/QD9Jv0A/g8yMDIyMDQyOVQxNTM5NTD9AP8PMjAyNjEyMzFUMjM1OTU5/QECKf0CACX9AgEIZnVsbG5hbWX9AgIVTkROIFRlc3RiZWQgUm9vdCAyMjA0F0gwRgIhAPYUOjNakdfDGh5j9dcCGOz+Ie1MqoAEsjM9PEUEWbnqAiEApu0rg9GAK1LNExjLYAF6qVgpWQgU+atPn63Gtuubqyg="
diff --git a/libndn-cert.pc.in b/libndn-cert.pc.in
index d4221e4..da9b0bc 100644
--- a/libndn-cert.pc.in
+++ b/libndn-cert.pc.in
@@ -7,4 +7,4 @@
Version: @VERSION@
Libs: -L${libdir} -lndn-cert
Cflags: -I${includedir}
-Requires: libndn-cxx >= 0.7.1
\ No newline at end of file
+Requires: libndn-cxx >= 0.8.1
diff --git a/src/detail/ca-configuration.cpp b/src/detail/ca-configuration.cpp
index 667d98b..990d84a 100644
--- a/src/detail/ca-configuration.cpp
+++ b/src/detail/ca-configuration.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2022, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -22,7 +22,6 @@
#include <ndn-cxx/util/io.hpp>
-#include <boost/filesystem.hpp>
#include <boost/property_tree/json_parser.hpp>
namespace ndncert::ca {
diff --git a/src/detail/ca-profile.cpp b/src/detail/ca-profile.cpp
index 41c5d56..f1d8c3f 100644
--- a/src/detail/ca-profile.cpp
+++ b/src/detail/ca-profile.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2022, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -23,8 +23,6 @@
#include <ndn-cxx/util/io.hpp>
-#include <boost/filesystem.hpp>
-
namespace ndncert {
CaProfile
diff --git a/src/detail/ca-sqlite.cpp b/src/detail/ca-sqlite.cpp
index 3794ce0..809f91f 100644
--- a/src/detail/ca-sqlite.cpp
+++ b/src/detail/ca-sqlite.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2022, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -25,7 +25,8 @@
#include <ndn-cxx/security/validation-policy.hpp>
#include <ndn-cxx/util/sqlite3-statement.hpp>
-#include <boost/filesystem.hpp>
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/path.hpp>
#include <boost/property_tree/json_parser.hpp>
namespace ndncert::ca {
diff --git a/tests/global-configuration.cpp b/tests/global-configuration.cpp
index 4dad5c0..e217098 100644
--- a/tests/global-configuration.cpp
+++ b/tests/global-configuration.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2022, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -18,12 +18,14 @@
* See AUTHORS.md for complete list of ndncert authors and contributors.
*/
-#include "detail/ndncert-common.hpp"
-
#include "tests/boost-test.hpp"
-#include <boost/filesystem.hpp>
-#include <fstream>
+#include <ndn-cxx/util/exception.hpp>
+
+#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem/path.hpp>
+
+#include <stdexcept>
#include <stdlib.h>
namespace ndncert::tests {
@@ -35,17 +37,16 @@
{
const char* envHome = ::getenv("HOME");
if (envHome)
- m_home = envHome;
+ m_home.assign(envHome);
- auto testHome = boost::filesystem::path(UNIT_TESTS_TMPDIR) / "test-home";
- if (::setenv("HOME", testHome.c_str(), 1) != 0)
- NDN_THROW(std::runtime_error("setenv() failed"));
+ // in case an earlier test run crashed without a chance to run the destructor
+ boost::filesystem::remove_all(TESTDIR);
+ auto testHome = TESTDIR / "test-home";
boost::filesystem::create_directories(testHome);
- std::ofstream clientConf((testHome / ".ndn" / "client.conf").c_str());
- clientConf << "pib=pib-sqlite3" << std::endl
- << "tpm=tpm-file" << std::endl;
+ if (::setenv("HOME", testHome.c_str(), 1) != 0)
+ NDN_THROW(std::runtime_error("setenv() failed"));
}
~GlobalConfiguration() noexcept
@@ -54,9 +55,13 @@
::unsetenv("HOME");
else
::setenv("HOME", m_home.data(), 1);
+
+ boost::system::error_code ec;
+ boost::filesystem::remove_all(TESTDIR, ec); // ignore error
}
private:
+ static inline const boost::filesystem::path TESTDIR{UNIT_TESTS_TMPDIR};
std::string m_home;
};
diff --git a/tests/key-chain-fixture.cpp b/tests/key-chain-fixture.cpp
deleted file mode 100644
index 5276ae4..0000000
--- a/tests/key-chain-fixture.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2022 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#include "tests/key-chain-fixture.hpp"
-
-#include <ndn-cxx/util/io.hpp>
-
-#include <boost/filesystem/operations.hpp>
-
-namespace ndncert::tests {
-
-using namespace ndn::security;
-
-KeyChainFixture::KeyChainFixture()
- : m_keyChain("pib-memory:", "tpm-memory:")
-{
-}
-
-KeyChainFixture::~KeyChainFixture()
-{
- boost::system::error_code ec;
- for (const auto& certFile : m_certFiles) {
- boost::filesystem::remove(certFile, ec); // ignore error
- }
-}
-
-bool
-KeyChainFixture::saveCert(const Data& cert, const std::string& filename)
-{
- m_certFiles.push_back(filename);
- try {
- ndn::io::save(cert, filename);
- return true;
- }
- catch (const ndn::io::Error&) {
- return false;
- }
-}
-
-bool
-KeyChainFixture::saveIdentityCert(const Identity& identity, const std::string& filename)
-{
- Certificate cert;
- try {
- cert = identity.getDefaultKey().getDefaultCertificate();
- }
- catch (const Pib::Error&) {
- return false;
- }
-
- return saveCert(cert, filename);
-}
-
-bool
-KeyChainFixture::saveIdentityCert(const Name& identityName, const std::string& filename,
- bool allowCreate)
-{
- Identity id;
- try {
- id = m_keyChain.getPib().getIdentity(identityName);
- }
- catch (const Pib::Error&) {
- if (allowCreate) {
- id = m_keyChain.createIdentity(identityName);
- }
- }
-
- if (!id) {
- return false;
- }
-
- return saveIdentityCert(id, filename);
-}
-
-} // namespace ndncert::tests
diff --git a/tests/key-chain-fixture.hpp b/tests/key-chain-fixture.hpp
index c785871..bd977e5 100644
--- a/tests/key-chain-fixture.hpp
+++ b/tests/key-chain-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -22,62 +22,17 @@
#ifndef NDNCERT_TESTS_KEY_CHAIN_FIXTURE_HPP
#define NDNCERT_TESTS_KEY_CHAIN_FIXTURE_HPP
-#include "detail/ndncert-common.hpp"
-
#include <ndn-cxx/security/key-chain.hpp>
-#include <ndn-cxx/security/signing-helpers.hpp>
namespace ndncert::tests {
/**
* @brief A fixture providing an in-memory KeyChain.
- *
- * Test cases can use this fixture to create identities. Identities, certificates, and
- * saved certificates are automatically removed during test teardown.
*/
class KeyChainFixture
{
protected:
- using Certificate = ndn::security::Certificate;
- using Identity = ndn::security::Identity;
- using Key = ndn::security::Key;
-
-public:
- /**
- * @brief Saves an NDN certificate to a file
- * @return true if successful, false otherwise
- */
- bool
- saveCert(const Data& cert, const std::string& filename);
-
- /**
- * @brief Saves the default certificate of @p identity to a file
- * @return true if successful, false otherwise
- */
- bool
- saveIdentityCert(const Identity& identity, const std::string& filename);
-
- /**
- * @brief Saves the default certificate of the identity named @p identityName to a file
- * @param identityName Name of the identity
- * @param filename File name, must be writable
- * @param allowCreate If true, create the identity if it does not exist
- * @return true if successful, false otherwise
- */
- bool
- saveIdentityCert(const Name& identityName, const std::string& filename,
- bool allowCreate = false);
-
-protected:
- KeyChainFixture();
-
- ~KeyChainFixture();
-
-protected:
- ndn::KeyChain m_keyChain;
-
-private:
- std::vector<std::string> m_certFiles;
+ ndn::KeyChain m_keyChain{"pib-memory:", "tpm-memory:"};
};
} // namespace ndncert::tests
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index 14b72b2..9fcee0f 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2023, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -19,8 +19,6 @@
*/
#include "ca-module.hpp"
-#include "challenge/challenge-module.hpp"
-#include "challenge/challenge-email.hpp"
#include "challenge/challenge-pin.hpp"
#include "detail/info-encoder.hpp"
#include "requester-request.hpp"
@@ -29,6 +27,7 @@
#include "tests/io-key-chain-fixture.hpp"
#include <ndn-cxx/metadata-object.hpp>
+#include <ndn-cxx/security/signing-helpers.hpp>
#include <ndn-cxx/security/verification-helpers.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
diff --git a/tests/unit-tests/challenge-possession.t.cpp b/tests/unit-tests/challenge-possession.t.cpp
index cc694e6..a656c1e 100644
--- a/tests/unit-tests/challenge-possession.t.cpp
+++ b/tests/unit-tests/challenge-possession.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2022, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -19,11 +19,12 @@
*/
#include "challenge/challenge-possession.hpp"
-#include "detail/challenge-encoder.hpp"
#include "tests/boost-test.hpp"
#include "tests/key-chain-fixture.hpp"
+#include <ndn-cxx/security/signing-helpers.hpp>
+
namespace ndncert::tests {
class ChallengePossessionFixture : public KeyChainFixture
diff --git a/tests/unit-tests/requester.t.cpp b/tests/unit-tests/requester.t.cpp
index 8fc0b8d..a3fa8d5 100644
--- a/tests/unit-tests/requester.t.cpp
+++ b/tests/unit-tests/requester.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2017-2023, Regents of the University of California.
+ * Copyright (c) 2017-2024, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -20,13 +20,13 @@
#include "requester-request.hpp"
#include "ca-module.hpp"
-#include "challenge/challenge-module.hpp"
#include "detail/error-encoder.hpp"
#include "detail/probe-encoder.hpp"
#include "tests/boost-test.hpp"
#include "tests/io-key-chain-fixture.hpp"
+#include <ndn-cxx/security/signing-helpers.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
namespace ndncert::tests {
diff --git a/tests/wscript b/tests/wscript
index 499d754..de42581 100644
--- a/tests/wscript
+++ b/tests/wscript
@@ -3,7 +3,7 @@
top = '..'
def build(bld):
- tmpdir = 'UNIT_TESTS_TMPDIR="%s"' % bld.bldnode.make_node('tmp-files')
+ tmpdir = 'UNIT_TESTS_TMPDIR="%s"' % bld.bldnode.make_node('tests-tmp')
bld.program(
target=f'{top}/unit-tests',
name='unit-tests',