23 #ifndef NDN_PIB_IDENTITY_IMPL_HPP
24 #define NDN_PIB_IDENTITY_IMPL_HPP
26 #include <ndn-cpp/security/pib/pib-key-container.hpp>
29 class TestPibIdentityImpl_KeyOperation_Test;
55 (
const Name& identityName,
const ptr_lib::shared_ptr<PibImpl>& pibImpl,
63 getName() {
return identityName_; }
74 ptr_lib::shared_ptr<PibKey>
75 addKey(
const uint8_t* key,
size_t keyLength,
const Name& keyName);
92 ptr_lib::shared_ptr<PibKey>
103 ptr_lib::shared_ptr<PibKey>&
116 ptr_lib::shared_ptr<PibKey>&
124 ptr_lib::shared_ptr<PibKey>&
130 friend TestPibIdentityImpl_KeyOperation_Test;
137 ptr_lib::shared_ptr<PibKey> defaultKey_;
141 ptr_lib::shared_ptr<PibImpl> pibImpl_;
ptr_lib::shared_ptr< PibKey > getKey(const Name &keyName)
Get the key with name keyName.
Definition: pib-identity-impl.cpp:69
PibIdentityImpl(const Name &identityName, const ptr_lib::shared_ptr< PibImpl > &pibImpl, bool needInit)
Create a PibIdentityImpl with identityName.
Definition: pib-identity-impl.cpp:31
void removeKey(const Name &keyName)
Remove the key with keyName and its related certificates.
Definition: pib-identity-impl.cpp:58
PibIdentity is at the top level in PIB's Identity-Key-Certificate hierarchy.
Definition: pib-identity.hpp:48
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
PibIdentityImpl provides the backend implementation for PibIdentity.
Definition: pib-identity-impl.hpp:41
ptr_lib::shared_ptr< PibKey > addKey(const uint8_t *key, size_t keyLength, const Name &keyName)
Add the key.
Definition: pib-identity-impl.cpp:50
ptr_lib::shared_ptr< PibKey > & getDefaultKey()
Get the default key of this Identity.
Definition: pib-identity-impl.cpp:95
A PibKeyContainer is used to search/enumerate the keys of an identity.
Definition: pib-key-container.hpp:42
ptr_lib::shared_ptr< PibKey > & setDefaultKey(const Name &keyName)
Set the key with name keyName as the default key of the identity.
Definition: pib-identity-impl.cpp:77