security: Canonize PIB and TPM scheme names
Change-Id: I5e81b177a1047e1ede38c9f424ae34e78f7cf001
Refs: #2391
diff --git a/tests/unit-tests/security/test-keychain.cpp b/tests/unit-tests/security/test-keychain.cpp
index 2595270..5f8e06b 100644
--- a/tests/unit-tests/security/test-keychain.cpp
+++ b/tests/unit-tests/security/test-keychain.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2015 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -330,11 +330,15 @@
BOOST_AUTO_TEST_CASE(KeyChainWithCustomTpmAndPib)
{
BOOST_REQUIRE_NO_THROW((KeyChain("pib-dummy", "tpm-dummy")));
+ BOOST_REQUIRE_NO_THROW((KeyChain("pib-dummy2", "tpm-dummy2")));
BOOST_REQUIRE_NO_THROW((KeyChain("dummy", "dummy")));
BOOST_REQUIRE_NO_THROW((KeyChain("dummy:", "dummy:")));
BOOST_REQUIRE_NO_THROW((KeyChain("dummy:/something", "dummy:/something")));
KeyChain keyChain("dummy", "dummy");
+ BOOST_CHECK_EQUAL(keyChain.getPib().getPibLocator(), "pib-dummy:");
+ BOOST_CHECK_EQUAL(keyChain.getPib().getTpmLocator(), "tpm-dummy:");
+ BOOST_CHECK_EQUAL(keyChain.getTpm().getTpmLocator(), "tpm-dummy:");
BOOST_CHECK_EQUAL(keyChain.getDefaultIdentity(), "/dummy/key");
}