security: In IdentityManager::signByCertificate, when setting the KeyLocator keyName, use certificateName.getPrefix(-1) to remove the version number. Refs #1088.
diff --git a/src/security/identity/identity-manager.cpp b/src/security/identity/identity-manager.cpp
index 90bc043..10168d1 100644
--- a/src/security/identity/identity-manager.cpp
+++ b/src/security/identity/identity-manager.cpp
@@ -220,7 +220,7 @@
DigestAlgorithm digestAlgorithm = DIGEST_ALGORITHM_SHA256;
signature->getKeyLocator().setType(ndn_KeyLocatorType_KEYNAME);
- signature->getKeyLocator().setKeyName(certificateName);
+ signature->getKeyLocator().setKeyName(certificateName.getPrefix(-1));
// Omit the certificate digest.
signature->getKeyLocator().setKeyNameType((ndn_KeyNameType)-1);
// Ignore witness and leave the digestAlgorithm as the default.