22 #ifndef NDN_SECURITY_V1_SEC_PUBLIC_INFO_HPP 23 #define NDN_SECURITY_V1_SEC_PUBLIC_INFO_HPP 25 #include "../../name.hpp" 26 #include "../security-common.hpp" 43 class Error :
public std::runtime_error
48 :
std::runtime_error(what)
153 virtual shared_ptr<PublicKey>
192 virtual shared_ptr<IdentityCertificate>
437 shared_ptr<IdentityCertificate>
445 shared_ptr<IdentityCertificate>
461 #ifdef NDN_CXX_KEEP_SECURITY_V1_ALIASES 463 #endif // NDN_CXX_KEEP_SECURITY_V1_ALIASES 467 #ifdef NDN_CXX_KEEP_SECURITY_V1_ALIASES 469 #endif // NDN_CXX_KEEP_SECURITY_V1_ALIASES 473 #endif // NDN_SECURITY_V1_SEC_PUBLIC_INFO_HPP virtual void deleteIdentityInfo(const Name &identity)=0
Delete an identity and related public keys and certificates.
shared_ptr< IdentityCertificate > defaultCertificate()
Get cached default certificate of the default identity.
shared_ptr< IdentityCertificate > m_defaultCertificate
virtual Name getDefaultKeyNameForIdentity(const Name &identityName)=0
Get name of the default key name for the specified identity.
virtual Name getDefaultCertificateNameForKey(const Name &keyName)=0
Get name of the default certificate name for the specified key.
Copyright (c) 2013-2017 Regents of the University of California.
virtual void setDefaultIdentityInternal(const Name &identityName)=0
Set the default identity.
Name getDefaultCertificateName()
Get the default certificate name of the default identity.
virtual ~SecPublicInfo()
The virtual Destructor.
virtual void getAllCertificateNames(std::vector< Name > &nameList, bool isDefault)=0
Get all the certificate name in public info.
std::string getPibLocator()
Get PIB Locator.
virtual void getAllKeyNamesOfIdentity(const Name &identity, std::vector< Name > &nameList, bool isDefault)=0
Get all the key names of a particular identity.
virtual void deleteCertificateInfo(const Name &certificateName)=0
Delete a certificate.
virtual void addCertificate(const IdentityCertificate &certificate)=0
Add a certificate to the identity storage.
virtual void addIdentity(const Name &identityName)=0
Add a new identity.
virtual bool doesIdentityExist(const Name &identityName)=0
Check if the specified identity already exists.
virtual Name getDefaultIdentity()=0
Get name of the default identity.
void addCertificateAsSystemDefault(const IdentityCertificate &certificate)
Add a certificate into the public key identity storage and set the certificate as the default one of ...
void setDefaultCertificateNameForKey(const Name &certificateName)
Set the default certificate name for the corresponding key.
virtual bool doesPublicKeyExist(const Name &keyName)=0
Check if the specified key already exists.
void setDefaultIdentity(const Name &identityName)
Set the default identity.
virtual shared_ptr< IdentityCertificate > getCertificate(const Name &certificateName)=0
Get a shared pointer to identity certificate object from the identity storage.
void refreshDefaultCertificate()
try to get the default certificate of the default identity from the public info
Name getDefaultCertificateNameForIdentity(const Name &identityName)
Get the default certificate name for the specified identity.
SecPublicInfo(const std::string &location)
virtual std::string getScheme()=0
return the scheme of the PibLocator
void addPublicKey(const Name &keyName, KeyType keyType, const PublicKey &publicKey)
Add a public key to the identity storage.
SecPublicInfo is a base class for the storage of public information.
virtual void addKey(const Name &keyName, const PublicKey &publicKey)=0
Add a public key to the identity storage.
virtual bool revokeIdentity()=0
Revoke the identity.
virtual void deletePublicKeyInfo(const Name &keyName)=0
Delete a public key and related certificates.
Represents an absolute name.
virtual void setDefaultKeyNameForIdentityInternal(const Name &keyName)=0
Set the default key name for the corresponding identity.
virtual bool doesCertificateExist(const Name &certificateName)=0
Check if the specified certificate already exists.
virtual std::string getTpmLocator()=0
Get TPM Locator.
void addCertificateAsKeyDefault(const IdentityCertificate &certificate)
Add a certificate and set the certificate as the default one of its corresponding key...
void addCertificateAsIdentityDefault(const IdentityCertificate &certificate)
Add a certificate into the public key identity storage and set the certificate as the default one of ...
virtual void setDefaultCertificateNameForKeyInternal(const Name &certificateName)=0
Set the default certificate name for the corresponding key.
shared_ptr< IdentityCertificate > getDefaultCertificate()
Get cached default certificate of the default identity.
virtual void getAllIdentities(std::vector< Name > &nameList, bool isDefault)=0
Get all the identities from public info.
virtual void getAllKeyNames(std::vector< Name > &nameList, bool isDefault)=0
Get all the key names from public info.
virtual void setTpmLocator(const std::string &tpmLocator)=0
Set the corresponding TPM information to tpmLocator.
Name getNewKeyName(const Name &identityName, bool useKsk)
Generate a key name for the identity.
Error(const std::string &what)
virtual KeyType getPublicKeyType(const Name &keyName)=0
Get the type of the queried public key.
virtual void getAllCertificateNamesOfKey(const Name &keyName, std::vector< Name > &nameList, bool isDefault)=0
Get all the certificate name of a particular key name.
void setDefaultKeyNameForIdentity(const Name &keyName)
Set the default key name for the corresponding identity.
virtual shared_ptr< PublicKey > getPublicKey(const Name &keyName)=0
Get shared pointer to PublicKey object from the identity storage.