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, v1::PublicKey> m_keys;
141 std::map<Name, Name> m_defaultKey;
144 std::map<Name, v1::IdentityCertificate> m_certs;
147 std::map<Name, Name> m_defaultCert;
153 #endif // NDN_SECURITY_PIB_MEMORY_HPP virtual v1::PublicKey getKeyBits(const Name &identity, const name::Component &keyId) const override
Get the key bits of 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.
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 v1::IdentityCertificate getCertificate(const Name &certName) const override
Get a certificate with name certName.
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 addKey(const Name &identity, const name::Component &keyId, const v1::PublicKey &publicKey) override
Add a key.
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 void addCertificate(const v1::IdentityCertificate &certificate) override
Add a certificate.
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.
virtual v1::IdentityCertificate getDefaultCertificateOfKey(const Name &identity, const name::Component &keyId) const override
Get the default certificate of a key with id keyId of identity.
Component holds a read-only name component value.
virtual void removeCertificate(const Name &certName) override
Remove a certificate with name certName.
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.