security: Canonize PIB and TPM scheme names

Change-Id: I5e81b177a1047e1ede38c9f424ae34e78f7cf001
Refs: #2391
diff --git a/tests/unit-tests/security/dummy-keychain.cpp b/tests/unit-tests/security/dummy-keychain.cpp
index c7ae04c..58f3b9e 100644
--- a/tests/unit-tests/security/dummy-keychain.cpp
+++ b/tests/unit-tests/security/dummy-keychain.cpp
@@ -70,6 +70,12 @@
 NDN_CXX_KEYCHAIN_REGISTER_PIB(DummyPublicInfo, "pib-dummy", "dummy");
 NDN_CXX_KEYCHAIN_REGISTER_TPM(DummyTpm, "tpm-dummy", "dummy");
 
+typedef DummyPublicInfo DummyPublicInfo2;
+typedef DummyTpm DummyTpm2;
+
+NDN_CXX_KEYCHAIN_REGISTER_PIB(DummyPublicInfo2, "pib-dummy2");
+NDN_CXX_KEYCHAIN_REGISTER_TPM(DummyTpm2, "tpm-dummy2");
+
 DummyPublicInfo::DummyPublicInfo(const std::string& locator)
   : SecPublicInfo(locator)
 {
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");
 }