22 #ifndef NDN_SECURITY_PIB_IMPL_HPP 23 #define NDN_SECURITY_PIB_IMPL_HPP 46 class Error :
public std::runtime_error
51 :
std::runtime_error(what)
116 virtual std::set<Name>
197 virtual std::set<name::Component>
273 virtual std::set<Name>
286 const Name& certName) = 0;
304 #endif // NDN_SECURITY_PIB_IMPL_HPP virtual void removeKey(const Name &identity, const name::Component &keyId)=0
Remove a key.
represents a non-semantic error
Copyright (c) 2011-2015 Regents of the University of California.
virtual bool hasIdentity(const Name &identity) const =0
Check the existence of an identity.
virtual void removeCertificate(const Name &certName)=0
Remove a certificate with name certName.
virtual bool hasKey(const Name &identity, const name::Component &keyId) const =0
Check the existence of a key.
virtual v1::PublicKey getKeyBits(const Name &identity, const name::Component &keyId) const =0
Get the key bits of a key.
virtual name::Component getDefaultKeyOfIdentity(const Name &identity) const =0
Get the id of the default key of an identity with name identity.
virtual std::string getTpmLocator() const =0
Get TPM Locator.
virtual Name getDefaultIdentity() const =0
Get the default identity.
virtual void addIdentity(const Name &identity)=0
Add an identity.
virtual v1::IdentityCertificate getCertificate(const Name &certName) const =0
Get a certificate with name certName.
Error(const std::string &what)
virtual v1::IdentityCertificate getDefaultCertificateOfKey(const Name &identity, const name::Component &keyId) const =0
Get the default certificate of a key with id keyId of identity.
virtual std::set< Name > getCertificatesOfKey(const Name &identity, const name::Component &keyId) const =0
Get a list of certificate names of a key with id keyId of identity.
Name abstraction to represent an absolute name.
Abstract class of PIB implementation.
virtual void addKey(const Name &identity, const name::Component &keyId, const v1::PublicKey &publicKey)=0
Add a key.
virtual void setDefaultKeyOfIdentity(const Name &identity, const name::Component &keyId)=0
Set an key with id keyId as the default key of an identity with name identity.
Component holds a read-only name component value.
virtual void setDefaultCertificateOfKey(const Name &identity, const name::Component &keyId, const Name &certName)=0
Set a cert with name certName as the default of a key with id keyId of identity.
virtual std::set< Name > getIdentities() const =0
Get the name of all the identities.
virtual void addCertificate(const v1::IdentityCertificate &certificate)=0
Add a certificate.
virtual std::set< name::Component > getKeysOfIdentity(const Name &identity) const =0
Get all the key ids of an identity with name identity.
virtual void setTpmLocator(const std::string &tpmLocator)=0
Set the corresponding TPM information to tpmLocator.
virtual bool hasCertificate(const Name &certName) const =0
Check the existence of a certificate with name certName.
virtual void removeIdentity(const Name &identity)=0
Remove an identity.
virtual void setDefaultIdentity(const Name &identityName)=0
Set an identity with name identityName as the default identity.