22 #ifndef NDN_SECURITTY_PIB_PIB_SQLITE3_HPP 23 #define NDN_SECURITTY_PIB_PIB_SQLITE3_HPP 62 static const std::string&
100 const uint8_t* key,
size_t keyLen)
final;
141 hasDefaultIdentity()
const;
144 hasDefaultKeyOfIdentity(
const Name& identity)
const;
147 hasDefaultCertificateOfKey(
const Name& keyName)
const;
157 #endif // NDN_SECURITTY_PIB_PIB_SQLITE3_HPP void removeCertificate(const Name &certName) final
Remove a certificate with name certName.
Copyright (c) 2013-2017 Regents of the University of California.
Name getDefaultKeyOfIdentity(const Name &identity) const final
The certificate following the certificate format naming convention.
std::set< Name > getCertificatesOfKey(const Name &keyName) const final
Get a list of certificate names of a key with id keyName.
void clearIdentities() final
Erasing all certificates, keys, and identities.
void addKey(const Name &identity, const Name &keyName, const uint8_t *key, size_t keyLen) final
Add a key.
std::set< Name > getIdentities() const final
Get the name of all the identities.
void setTpmLocator(const std::string &tpmLocator) final
Set the corresponding TPM information to tpmLocator.
v2::Certificate getCertificate(const Name &certName) const final
Get a certificate with name certName.
Pib backend implementation based on SQLite3 database.
std::string getTpmLocator() const final
Get TPM Locator.
Buffer getKeyBits(const Name &keyName) const final
Get the key bits of a key with name keyName.
static const std::string & getScheme()
void removeIdentity(const Name &identity) final
Remove an identity and related keys and certificates.
void setDefaultIdentity(const Name &identityName) final
Set an identity with name identityName as the default identity.
void setDefaultCertificateOfKey(const Name &keyName, const Name &certName) final
Set a cert with name certName as the default of a key with keyName.
Name getDefaultIdentity() const final
Get the default identity.
Represents an absolute name.
~PibSqlite3()
Destruct and cleanup internal state.
PibSqlite3(const std::string &location="")
Create sqlite3-based PIB backed.
void addIdentity(const Name &identity) final
Add an identity.
void addCertificate(const v2::Certificate &certificate) final
Add a certificate.
v2::Certificate getDefaultCertificateOfKey(const Name &keyName) const final
bool hasKey(const Name &keyName) const final
Check the existence of a key with keyName.
void removeKey(const Name &keyName) final
Remove a key with keyName and related certificates.
void setDefaultKeyOfIdentity(const Name &identity, const Name &keyName) final
Set an key with keyName as the default key of an identity with name identity.
std::set< Name > getKeysOfIdentity(const Name &identity) const final
Get all the key names of an identity with name identity.
bool hasIdentity(const Name &identity) const final
Check the existence of an identity.
General-purpose automatically managed/resized buffer.
Abstract class of PIB implementation.
bool hasCertificate(const Name &certName) const final
Check the existence of a certificate with name certName.