22 #ifndef NDN_SECURITY_PIB_MEMORY_HPP 23 #define NDN_SECURITY_PIB_MEMORY_HPP 71 virtual std::set<Name>
94 virtual std::set<name::Component>
117 virtual std::set<Name>
133 std::set<Name> m_identities;
134 bool m_hasDefaultIdentity;
135 Name m_defaultIdentity;
138 std::map<Name, PublicKey> m_keys;
141 std::map<Name, Name> m_defaultKey;
144 std::map<Name, IdentityCertificate> m_certs;
147 std::map<Name, Name> m_defaultCert;
153 #endif // NDN_SECURITY_PIB_MEMORY_HPP virtual void addKey(const Name &identity, const name::Component &keyId, const PublicKey &publicKey) override
Add a key.
represents a non-semantic error
Copyright (c) 2011-2015 Regents of the University of California.
virtual Name getDefaultIdentity() const override
Get the default identity.
virtual void removeIdentity(const Name &identity) override
Remove an identity.
An in-memory implementation of Pib.
virtual bool hasCertificate(const Name &certName) const override
Check the existence of a certificate with name certName.
virtual void addIdentity(const Name &identity) override
Add an identity.
#define NDN_CXX_DECL_OVERRIDE
expands to 'override' if compiler supports this feature, otherwise expands to nothing ...
virtual IdentityCertificate getCertificate(const Name &certName) const override
Get a certificate with name certName.
virtual void setTpmLocator(const std::string &tpmLocator) override
Set the corresponding TPM information to tpmLocator.
virtual bool hasKey(const Name &identity, const name::Component &keyId) const override
Check the existence of a key.
virtual bool hasIdentity(const Name &identity) const override
Check the existence of an identity.
virtual std::set< name::Component > getKeysOfIdentity(const Name &identity) const override
Get all the key ids of an identity with name identity.
virtual std::set< Name > getCertificatesOfKey(const Name &identity, const name::Component &keyId) const override
Get a list of certificate names of a key with id keyId of identity.
virtual std::set< Name > getIdentities() const override
Get the name of all the identities.
virtual void setDefaultCertificateOfKey(const Name &identity, const name::Component &keyId, const Name &certName) override
Set a cert with name certName as the default of a key with id keyId of identity.
virtual PublicKey getKeyBits(const Name &identity, const name::Component &keyId) const override
Get the key bits of a key.
virtual IdentityCertificate getDefaultCertificateOfKey(const Name &identity, const name::Component &keyId) const override
Get the default certificate of a key with id keyId of identity.
Name abstraction to represent an absolute name.
Abstract class of PIB implementation.
virtual void removeKey(const Name &identity, const name::Component &keyId) override
Remove a key.
virtual void setDefaultIdentity(const Name &identityName) override
Set an identity with name identityName as the default identity.
Component holds a read-only name component value.
virtual void removeCertificate(const Name &certName) override
Remove a certificate with name certName.
virtual void addCertificate(const IdentityCertificate &certificate) override
Add a certificate.
Error(const std::string &what)
virtual name::Component getDefaultKeyOfIdentity(const Name &identity) const override
Get the id of the default key of an identity with name identity.
virtual void setDefaultKeyOfIdentity(const Name &identity, const name::Component &keyId) override
Set an key with id keyId as the default key of an identity with name identity.
virtual std::string getTpmLocator() const override
Get TPM Locator.