security: IdentityCertificate sets default FreshnessPeriod to 1 hour
refs #2872
Change-Id: Ib2af1a1c8a5bf99310132f55c0f8b5d80d7a2015
diff --git a/tests/unit-tests/security/key-chain.t.cpp b/tests/unit-tests/security/key-chain.t.cpp
index f3d125a..d364dcf 100644
--- a/tests/unit-tests/security/key-chain.t.cpp
+++ b/tests/unit-tests/security/key-chain.t.cpp
@@ -29,8 +29,6 @@
namespace ndn {
namespace tests {
-using std::vector;
-
BOOST_FIXTURE_TEST_SUITE(SecurityKeyChain, util::TestHomeEnvironmentFixture)
BOOST_AUTO_TEST_CASE(ConstructorNormalConfig)
@@ -194,7 +192,7 @@
identity.appendVersion();
keyChain.createIdentity(identity);
- vector<CertificateSubjectDescription> subjectDescription;
+ std::vector<CertificateSubjectDescription> subjectDescription;
Name lowerIdentity = identity;
lowerIdentity.append("Lower").appendVersion();
Name lowerKeyName = keyChain.generateRsaKeyPair(lowerIdentity, true);
@@ -206,6 +204,7 @@
BOOST_CHECK(static_cast<bool>(idCert));
BOOST_CHECK_EQUAL(idCert->getName().getPrefix(5),
Name().append(identity).append("KEY").append("Lower"));
+ BOOST_CHECK(idCert->getFreshnessPeriod() >= time::milliseconds::zero());
shared_ptr<IdentityCertificate> idCert11 =
keyChain.prepareUnsignedIdentityCertificate(lowerKeyName, identity,