22 #ifndef NDN_SECURITY_PIB_PIB_IMPL_HPP 23 #define NDN_SECURITY_PIB_PIB_IMPL_HPP 27 #include "../v2/certificate.hpp" 48 class Error :
public std::runtime_error
53 :
std::runtime_error(what)
118 virtual std::set<Name>
163 addKey(
const Name& identity,
const Name& keyName,
const uint8_t* key,
size_t keyLen) = 0;
190 virtual std::set<Name>
262 virtual std::set<Name>
286 #endif // NDN_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) 2013-2017 Regents of the University of California.
The certificate following the certificate format naming convention.
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 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 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.
Error(const std::string &what)
Represents an absolute name.
virtual Name getDefaultIdentity() const =0
Get the default identity.
virtual void addKey(const Name &identity, const Name &keyName, const uint8_t *key, size_t keyLen)=0
Add a key.
virtual v2::Certificate getCertificate(const Name &certName) const =0
Get a certificate with name certName.
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 v2::Certificate getDefaultCertificateOfKey(const Name &keyName) const =0
virtual Name getDefaultKeyOfIdentity(const Name &identity) const =0
virtual void addCertificate(const v2::Certificate &certificate)=0
Add a certificate.
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.