23 #ifndef NDN_BASIC_IDENTITY_STORAGE_H
24 #define NDN_BASIC_IDENTITY_STORAGE_H
27 #include "../../ndn-cpp-config.h"
28 #ifdef NDN_CPP_HAVE_SQLITE3
31 #include "../../common.hpp"
32 #include "identity-storage.hpp"
95 addKey(
const Name& keyName, KeyType keyType,
const Blob& publicKeyDer);
143 virtual ptr_lib::shared_ptr<IdentityCertificate>
196 (
const Name& identityName, std::vector<Name>& nameList,
bool isDefault);
207 (
const Name& keyName, std::vector<Name>& nameList,
bool isDefault);
263 updateKeyStatus(
const Name& keyName,
bool isActive);
270 #endif // NDN_CPP_HAVE_SQLITE3
virtual Blob getKey(const Name &keyName)
Get the public key DER blob from the identity storage.
virtual void activateKey(const Name &keyName)
Activate a key.
virtual void deleteIdentityInfo(const Name &identity)
Delete an identity and related public keys and certificates.
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
virtual void deactivateKey(const Name &keyName)
Deactivate a key.
virtual void addKey(const Name &keyName, KeyType keyType, const Blob &publicKeyDer)
Add a public key to the identity storage.
virtual void getAllKeyNamesOfIdentity(const Name &identityName, std::vector< Name > &nameList, bool isDefault)
Append all the key names of a particular identity to the nameList.
virtual void setDefaultCertificateNameForKey(const Name &keyName, const Name &certificateName)
Set the default key name for the specified identity.
virtual Name getDefaultIdentity()
Get the default identity.
virtual Name getDefaultCertificateNameForKey(const Name &keyName)
Get the default certificate name for the specified key.
Definition: identity-certificate.hpp:30
BasicIdentityStorage(const std::string &databaseFilePath="")
Create a new BasicIdentityStorage to work with an SQLite file.
virtual void deleteCertificateInfo(const Name &certificateName)
Delete a certificate.
virtual void deletePublicKeyInfo(const Name &keyName)
Delete a public key and related certificates.
virtual ~BasicIdentityStorage()
The virtual Destructor.
virtual void addIdentity(const Name &identityName)
Add a new identity.
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
virtual ptr_lib::shared_ptr< IdentityCertificate > getCertificate(const Name &certificateName)
Get a certificate from the identity storage.
IdentityStorage is a base class for the storage of identity, public keys and certificates.
Definition: identity-storage.hpp:39
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
BasicIdentityStorage extends IdentityStorage to implement a basic storage of identity, public keys and certificates using SQLite.
Definition: basic-identity-storage.hpp:41
virtual bool doesCertificateExist(const Name &certificateName)
Check if the specified certificate already exists.
virtual bool doesKeyExist(const Name &keyName)
Check if the specified key already exists.
virtual void addCertificate(const IdentityCertificate &certificate)
Add a certificate to the identity storage.
virtual bool revokeIdentity()
Revoke the identity.
virtual void setDefaultKeyNameForIdentity(const Name &keyName, const Name &identityNameCheck=Name())
Set a key as the default key of an identity.
virtual Name getDefaultKeyNameForIdentity(const Name &identityName)
Get the default key name for the specified identity.
virtual void getAllIdentities(std::vector< Name > &nameList, bool isDefault)
Append all the identity names to the nameList.
virtual void getAllCertificateNamesOfKey(const Name &keyName, std::vector< Name > &nameList, bool isDefault)
Append all the certificate names of a particular key name to the nameList.
virtual bool doesIdentityExist(const Name &identityName)
Check if the specified identity already exists.
virtual void setDefaultIdentity(const Name &identityName)
Set the default identity.