25 #ifndef NDN_SECURITY_SEC_PUBLIC_INFO_SQLITE3_HPP 26 #define NDN_SECURITY_SEC_PUBLIC_INFO_SQLITE3_HPP 28 #include "../common.hpp" 82 virtual shared_ptr<PublicKey>
94 virtual shared_ptr<IdentityCertificate>
134 initializeTable(
const std::string& tableName,
const std::string& initCommand);
137 deleteTable(
const std::string& tableName);
140 setTpmLocatorInternal(
const std::string& tpmLocator,
bool needReset);
143 setDefaultIdentityInternal(
const Name& identityName);
146 setDefaultKeyNameForIdentityInternal(
const Name& keyName);
149 setDefaultCertificateNameForKeyInternal(
const Name& certificateName);
156 doesTableExist(
const std::string& tableName);
167 #endif // NDN_SECURITY_SEC_PUBLIC_INFO_SQLITE3_HPP Copyright (c) 2011-2015 Regents of the University of California.
virtual bool doesIdentityExist(const Name &identityName)
Check if the specified identity already exists.
virtual void getAllKeyNames(std::vector< Name > &nameList, bool isDefault)
Get all the key names from public info.
virtual shared_ptr< IdentityCertificate > getCertificate(const Name &certificateName)
Get a shared pointer to identity certificate object from the identity storage.
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
virtual std::string getPibLocator()
virtual ~SecPublicInfoSqlite3()
virtual void getAllCertificateNamesOfKey(const Name &keyName, std::vector< Name > &nameList, bool isDefault)
Get all the certificate name of a particular key name.
Error(const std::string &what)
virtual bool doesCertificateExist(const Name &certificateName)
Check if the specified certificate already exists.
virtual Name getDefaultKeyNameForIdentity(const Name &identityName)
Get name of the default key name for the specified identity.
virtual std::string getTpmLocator()
Get TPM Locator.
virtual bool doesPublicKeyExist(const Name &keyName)
Check if the specified key already exists.
virtual shared_ptr< PublicKey > getPublicKey(const Name &keyName)
Get shared pointer to PublicKey object from the identity storage.
virtual bool revokeIdentity()
Revoke the identity.
virtual KeyType getPublicKeyType(const Name &keyName)
Get the type of the queried public key.
virtual void deletePublicKeyInfo(const Name &keyName)
Delete a public key and related certificates.
Name abstraction to represent an absolute name.
static const std::string SCHEME
virtual void getAllIdentities(std::vector< Name > &nameList, bool isDefault)
Get all the identities from public info.
virtual Name getDefaultIdentity()
Get name of the default identity.
virtual void addIdentity(const Name &identityName)
Add a new identity.
virtual void addKey(const Name &keyName, const PublicKey &publicKeyDer)
Add a public key to the identity storage.
virtual void deleteCertificateInfo(const Name &certificateName)
Delete a certificate.
SecPublicInfoSqlite3(const std::string &dir="")
virtual void getAllKeyNamesOfIdentity(const Name &identity, std::vector< Name > &nameList, bool isDefault)
Get all the key names of a particular identity.
virtual Name getDefaultCertificateNameForKey(const Name &keyName)
Get name of the default certificate name for the specified key.
virtual void addCertificate(const IdentityCertificate &certificate)
Add a certificate to the identity storage.
virtual void deleteIdentityInfo(const Name &identity)
Delete an identity and related public keys and certificates.
virtual void getAllCertificateNames(std::vector< Name > &nameList, bool isDefault)
Get all the certificate name in public info.
SecPublicInfo is a base class for the storage of public information.
virtual void setTpmLocator(const std::string &tpmLocator)
Set the corresponding TPM information to tpmLocator.