security: Change to use IdentityCertificate instead of Certificate where needed.
diff --git a/include/ndn-cpp/security/key-chain.hpp b/include/ndn-cpp/security/key-chain.hpp
index 97db9d8..40e24fd 100644
--- a/include/ndn-cpp/security/key-chain.hpp
+++ b/include/ndn-cpp/security/key-chain.hpp
@@ -116,7 +116,7 @@
* @param certificate The certificate to to added.
*/
void
- installIdentityCertificate(const Certificate& certificate)
+ installIdentityCertificate(const IdentityCertificate& certificate)
{
identityManager_->addCertificate(certificate);
}
@@ -134,7 +134,7 @@
/**
* Get a certificate with the specified name.
* @param certificateName The name of the requested certificate.
- * @return the requested certificate.
+ * @return the requested certificate which is valid.
*/
ptr_lib::shared_ptr<Certificate>
getCertificate(const Name& certificateName)
@@ -154,6 +154,28 @@
}
/**
+ * Get an identity certificate with the specified name.
+ * @param certificateName The name of the requested certificate.
+ * @return the requested certificate which is valid.
+ */
+ ptr_lib::shared_ptr<IdentityCertificate>
+ getIdentityCertificate(const Name& certificateName)
+ {
+ return identityManager_->getCertificate(certificateName);
+ }
+
+ /**
+ * Get an identity certificate even if the certificate is not valid anymore.
+ * @param certificateName The name of the requested certificate.
+ * @return the requested certificate.
+ */
+ ptr_lib::shared_ptr<IdentityCertificate>
+ getAnyIdentityCertificate(const Name& certificateName)
+ {
+ return identityManager_->getAnyCertificate(certificateName);
+ }
+
+ /**
* Revoke a key
* @param keyName the name of the key that will be revoked
*/