22 #ifndef NDN_CXX_SECURITY_PIB_PIB_IMPL_HPP 23 #define NDN_CXX_SECURITY_PIB_PIB_IMPL_HPP 49 class Error :
public std::runtime_error
52 using std::runtime_error::runtime_error;
115 virtual std::set<Name>
159 addKey(
const Name& identity,
const Name& keyName, span<const uint8_t> key) = 0;
186 virtual std::set<Name>
258 virtual std::set<Name>
282 #endif // NDN_CXX_SECURITY_PIB_PIB_IMPL_HPP represents a non-semantic error
virtual void removeIdentity(const Name &identity)=0
Remove an identity and related keys and certificates.
Copyright (c) 2011-2015 Regents of the University of California.
virtual void removeKey(const Name &keyName)=0
Remove a key with keyName and related certificates.
virtual void removeCertificate(const Name &certName)=0
Remove a certificate with name certName.
virtual ~PibImpl()=default
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 bool hasIdentity(const Name &identity) const =0
Check the existence of an identity.
virtual Certificate getCertificate(const Name &certName) const =0
Get a certificate with name certName.
virtual void setDefaultIdentity(const Name &identityName)=0
Set an identity with name identityName as the default identity.
virtual bool hasKey(const Name &keyName) const =0
Check the existence of a key with keyName.
virtual bool hasCertificate(const Name &certName) const =0
Check the existence of a certificate with name certName.
virtual std::string getTpmLocator() const =0
Get TPM Locator.
virtual Certificate getDefaultCertificateOfKey(const Name &keyName) const =0
virtual void addIdentity(const Name &identity)=0
Add an identity.
virtual std::set< Name > getCertificatesOfKey(const Name &keyName) const =0
Get a list of certificate names of a key with id keyName.
virtual void clearIdentities()=0
Erasing all certificates, keys, and identities.
Represents an absolute name.
virtual Name getDefaultIdentity() const =0
Get the default identity.
virtual void addCertificate(const Certificate &certificate)=0
Add a certificate.
virtual void setTpmLocator(const std::string &tpmLocator)=0
Set the corresponding TPM information to tpmLocator.
virtual std::set< Name > getIdentities() const =0
Get the name of all the identities.
virtual Name getDefaultKeyOfIdentity(const Name &identity) const =0
virtual void addKey(const Name &identity, const Name &keyName, span< const uint8_t > key)=0
Add a key.
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.
General-purpose automatically managed/resized buffer.
virtual std::set< Name > getKeysOfIdentity(const Name &identity) const =0
Get all the key names of an identity with name identity.
Abstract class of PIB implementation.
virtual Buffer getKeyBits(const Name &keyName) const =0
Get the key bits of a key with name keyName.