test: fix signedInterest test case
Change-Id: I3d549c9fbca8af80044d1f41335ecfe8abde07da
diff --git a/tests/test-signed-interest.cpp b/tests/test-signed-interest.cpp
index 5c7e684..c321057 100644
--- a/tests/test-signed-interest.cpp
+++ b/tests/test-signed-interest.cpp
@@ -21,7 +21,7 @@
KeyChainImpl<SecPublicInfoSqlite3, SecTpmFile> keyChain;
Name identityName("/test");
- Name keyName = keyChain.createIdentity(identityName);
+ Name certificateName = keyChain.createIdentity(identityName);
Interest interest("/test/interest");
keyChain.signByIdentity(interest, identityName);
@@ -31,7 +31,7 @@
Interest interest2;
interest2.wireDecode(interestBlock);
- ptr_lib::shared_ptr<PublicKey> publicKey = keyChain.getPublicKeyFromTpm(keyName);
+ ptr_lib::shared_ptr<PublicKey> publicKey = keyChain.getPublicKeyFromTpm(keyChain.getDefaultKeyNameForIdentity(identityName));
bool result = Verifier::verifySignature(interest2, *publicKey);
BOOST_REQUIRE_EQUAL(result, true);