22 #ifndef NDN_CXX_SECURITY_PIB_PIB_IMPL_HPP
23 #define NDN_CXX_SECURITY_PIB_PIB_IMPL_HPP
51 class Error :
public std::runtime_error
54 using std::runtime_error::runtime_error;
116 virtual std::set<Name>
187 virtual std::set<Name>
259 virtual std::set<Name>
General-purpose automatically managed/resized buffer.
Represents an absolute name.
Represents a non-semantic error.
virtual void addCertificate(const Certificate &certificate)=0
Add a certificate.
virtual void setDefaultIdentity(const Name &identityName)=0
Set an identity with name identityName as the default identity.
virtual void setTpmLocator(const std::string &tpmLocator)=0
Set the associated TPM information to tpmLocator.
virtual Certificate getCertificate(const Name &certName) const =0
Get a certificate with name certName.
virtual void setDefaultKeyOfIdentity(const Name &identity, const Name &keyName)=0
Set an key with keyName as the default key of an identity with name identity.
virtual bool hasKey(const Name &keyName) const =0
Check the existence of a key with keyName.
virtual Certificate getDefaultCertificateOfKey(const Name &keyName) const =0
virtual Name getDefaultKeyOfIdentity(const Name &identity) const =0
virtual std::set< Name > getCertificatesOfKey(const Name &keyName) const =0
Get a list of certificate names of a key with id keyName.
virtual Name getDefaultIdentity() const =0
Get the default identity.
virtual bool hasCertificate(const Name &certName) const =0
Check the existence of a certificate with name certName.
virtual void removeCertificate(const Name &certName)=0
Remove a certificate with name certName.
virtual Buffer getKeyBits(const Name &keyName) const =0
Get the key bits of a key with name keyName.
virtual void clearIdentities()=0
Erasing all certificates, keys, and identities.
virtual std::set< Name > getKeysOfIdentity(const Name &identity) const =0
Get all the key names of an identity with name identity.
virtual void removeIdentity(const Name &identity)=0
Remove an identity and related keys and certificates.
virtual void setDefaultCertificateOfKey(const Name &keyName, const Name &certName)=0
Set a cert with name certName as the default of a key with keyName.
virtual ~PibImpl()=default
virtual std::string getTpmLocator() const =0
Return the associated TPM Locator or an empty string if unset.
virtual void addKey(const Name &identity, const Name &keyName, span< const uint8_t > key)=0
Add a key.
virtual std::set< Name > getIdentities() const =0
Get the name of all the identities.
virtual void removeKey(const Name &keyName)=0
Remove a key with keyName and related certificates.
virtual void addIdentity(const Name &identity)=0
Add an identity.
virtual bool hasIdentity(const Name &identity) const =0
Check the existence of an identity.
Represents an NDN certificate.