security: Adapt PIB to NDN Certificate Format version 2.0
The certificate format can be found at docs/specs/certificate-format.rst
Change-Id: I5656837f09ce327e06a0cb1abdf16ac28fe0b823
Refs: #3202
diff --git a/tests/unit-tests/security/pib/certificate-container.t.cpp b/tests/unit-tests/security/pib/certificate-container.t.cpp
index 514cc3d..5edbfb2 100644
--- a/tests/unit-tests/security/pib/certificate-container.t.cpp
+++ b/tests/unit-tests/security/pib/certificate-container.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -28,19 +28,24 @@
namespace ndn {
namespace security {
+namespace pib {
namespace tests {
+using namespace ndn::security::tests;
+
BOOST_AUTO_TEST_SUITE(Security)
-BOOST_AUTO_TEST_SUITE(TestPib)
+BOOST_AUTO_TEST_SUITE(Pib)
BOOST_AUTO_TEST_SUITE(TestCertificateContainer)
+using pib::Pib;
+
BOOST_FIXTURE_TEST_CASE(TestCertificateContainer, PibDataFixture)
{
auto pibImpl = make_shared<PibMemory>();
Pib pib("pib-memory", "", pibImpl);
Identity identity1 = pib.addIdentity(id1);
- Key key11 = identity1.addKey(id1Key1, id1Key1Name.get(-1));
+ Key key11 = identity1.addKey(id1Key1.buf(), id1Key1.size(), id1Key1Name);
key11.addCertificate(id1Key1Cert1);
key11.addCertificate(id1Key1Cert2);
@@ -74,9 +79,10 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestCertificateContainer
-BOOST_AUTO_TEST_SUITE_END() // TestPib
+BOOST_AUTO_TEST_SUITE_END() // Pib
BOOST_AUTO_TEST_SUITE_END() // Security
} // namespace tests
+} // namespace pib
} // namespace security
} // namespace ndn