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