security: Make the KeyChain constructor take an IdentityManager.
diff --git a/ndn-cpp/security/key-chain.hpp b/ndn-cpp/security/key-chain.hpp
index d0357ef..ecddf67 100644
--- a/ndn-cpp/security/key-chain.hpp
+++ b/ndn-cpp/security/key-chain.hpp
@@ -31,7 +31,7 @@
*/
class KeyChain {
public:
- KeyChain(const ptr_lib::shared_ptr<IdentityStorage>& identityStorage, const ptr_lib::shared_ptr<PrivateKeyStorage>& privateKeyStorage);
+ KeyChain(const ptr_lib::shared_ptr<IdentityManager>& identityManager);
/**
* Get the default certificate name for the specified identity, which will be used when signing is performed based on identity.
@@ -41,7 +41,7 @@
Name
getDefaultCertificateNameForIdentity(const Name& identityName)
{
- return identityManager_.getDefaultCertificateNameForIdentity(identityName);
+ return identityManager_->getDefaultCertificateNameForIdentity(identityName);
}
/**
@@ -88,7 +88,7 @@
setFace(Face* face) { face_ = face; }
private:
- IdentityManager identityManager_;
+ ptr_lib::shared_ptr<IdentityManager> identityManager_;
Face* face_;
const int maxSteps_;
};