|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
22 #ifndef NDN_SECURITY_PIB_IMPL_PIB_MEMORY_HPP
23 #define NDN_SECURITY_PIB_IMPL_PIB_MEMORY_HPP
45 PibMemory(
const std::string& location =
"");
47 static const std::string&
84 addKey(
const Name& identity,
const Name& keyName,
const uint8_t* key,
size_t keyLen)
override;
124 std::string m_tpmLocator;
126 bool m_hasDefaultIdentity;
127 Name m_defaultIdentity;
129 std::set<Name> m_identities;
132 std::map<Name, Name> m_defaultKeys;
135 std::map<Name, Buffer> m_keys;
138 std::map<Name, Name> m_defaultCerts;
141 std::map<Name, v2::Certificate> m_certs;
148 #endif // NDN_SECURITY_PIB_IMPL_PIB_MEMORY_HPP
static const std::string & getScheme()
void removeCertificate(const Name &certName) override
Remove a certificate with name certName.
void setTpmLocator(const std::string &tpmLocator) override
Set the corresponding TPM information to tpmLocator.
std::string getTpmLocator() const override
Get TPM Locator.
bool hasCertificate(const Name &certName) const override
Check the existence of a certificate with name certName.
void addIdentity(const Name &identity) override
Add an identity.
General-purpose automatically managed/resized buffer.
void addKey(const Name &identity, const Name &keyName, const uint8_t *key, size_t keyLen) override
Add a key.
Buffer getKeyBits(const Name &keyName) const override
Get the key bits of a key with name keyName.
Name getDefaultIdentity() const override
Get the default identity.
Name getDefaultKeyOfIdentity(const Name &identity) const override
Represents an absolute name.
v2::Certificate getDefaultCertificateOfKey(const Name &keyName) const override
The certificate following the certificate format naming convention.
void setDefaultCertificateOfKey(const Name &keyName, const Name &certName) override
Set a cert with name certName as the default of a key with keyName.
bool hasKey(const Name &keyName) const override
Check the existence of a key with keyName.
std::set< Name > getCertificatesOfKey(const Name &keyName) const override
Get a list of certificate names of a key with id keyName.
void removeIdentity(const Name &identity) override
Remove an identity and related keys and certificates.
bool hasIdentity(const Name &identity) const override
Check the existence of an identity.
std::set< Name > getKeysOfIdentity(const Name &identity) const override
Get all the key names of an identity with name identity.
void removeKey(const Name &keyName) override
Remove a key with keyName and related certificates.
void clearIdentities() override
Erasing all certificates, keys, and identities.
void addCertificate(const v2::Certificate &certificate) override
Add a certificate.
An in-memory implementation of Pib.
void setDefaultKeyOfIdentity(const Name &identity, const Name &keyName) override
Set an key with keyName as the default key of an identity with name identity.
PibMemory(const std::string &location="")
Create memory based PIB backend.
Abstract class of PIB implementation.
Copyright (c) 2011-2015 Regents of the University of California.
v2::Certificate getCertificate(const Name &certName) const override
Get a certificate with name certName.
std::set< Name > getIdentities() const override
Get the name of all the identities.
void setDefaultIdentity(const Name &identityName) override
Set an identity with name identityName as the default identity.