|
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.
20 #ifndef NDNSIM_UTILS_DUMMY_KEYCHAIN_HPP
21 #define NDNSIM_UTILS_DUMMY_KEYCHAIN_HPP
50 explicit DummyPib(
const std::string& locator);
86 addKey(
const Name& identity,
const Name& keyName,
const uint8_t* key,
87 size_t keyLen)
override;
132 std::string m_tpmLocator;
152 const uint8_t*
sig,
size_t sigLen)
const final;
155 doDecrypt(
const uint8_t* cipherText,
size_t cipherTextLen)
const final;
158 doDerivePublicKey()
const final;
180 explicit DummyTpm(
const std::string& locator);
199 doHasKey(
const Name& keyName)
const final;
201 unique_ptr<tpm::KeyHandle>
202 doGetKeyHandle(
const Name& keyName)
const final;
204 unique_ptr<tpm::KeyHandle>
205 doCreateKey(
const Name& identity,
const KeyParams& params)
final;
208 doDeleteKey(
const Name& keyName)
final;
211 doExportKey(
const Name& keyName,
const char* pw,
size_t pwLen)
final;
214 doImportKey(
const Name& keyName,
const uint8_t* pkcs8,
size_t pkcs8Len,
const char* pw,
size_t pwLen)
final;
217 doImportKey(
const Name& keyName, shared_ptr<transform::PrivateKey> key)
final;
226 #endif // NDNSIM_UTILS_DUMMY_KEYCHAIN_HPP
void addKey(const Name &identity, const Name &keyName, const uint8_t *key, size_t keyLen) override
Add a key.
bool hasIdentity(const Name &identityName) const override
Check the existence of an identity.
Base class for key parameters.
ConstBufferPtr sign(const uint8_t *buf, size_t size, const Name &keyName, DigestAlgorithm digestAlgorithm) const
void removeCertificate(const Name &certName) override
Remove a certificate with name certName.
static std::string getScheme()
represents a non-semantic error
General-purpose automatically managed/resized buffer.
void addCertificate(const v2::Certificate &certificate) override
Add a certificate.
void setTerminalMode(bool isTerminal) const override
Set the terminal mode of the TPM.
Abstract interface for a TPM backend implementation.
void setDefaultIdentity(const Name &identityName) override
Set an identity with name identityName as the default identity.
Error(const std::string &what)
DummyTpm(const std::string &locator)
v2::Certificate getDefaultCertificateOfKey(const Name &keyName) const override
Error(const std::string &what)
bool isTpmLocked() const override
Check if the TPM is locked.
Abstraction of TPM key handle.
void removeIdentity(const Name &identity) override
Remove an identity and related keys and certificates.
Represents an absolute name.
void setDefaultCertificateOfKey(const Name &keyName, const Name &certName) override
Set a cert with name certName as the default of a key with keyName.
The certificate following the certificate format naming convention.
DummyKeyHandle(shared_ptr< transform::PrivateKey > key)
void setDefaultKeyOfIdentity(const Name &identity, const Name &keyName) override
Set an key with keyName as the default key of an identity with name identity.
std::set< Name > getCertificatesOfKey(const Name &keyName) const override
Get a list of certificate names of a key with id keyName.
DummyPib(const std::string &locator)
static const std::string SCHEME
static std::string getScheme()
void setTpmLocator(const std::string &tpmLocator) override
Set the corresponding TPM information to tpmLocator.
std::set< Name > getIdentities() const override
Get the name of all the identities.
bool isTerminalMode() const override
Check if the TPM is in terminal mode.
Name getDefaultKeyOfIdentity(const Name &identity) const override
std::set< Name > getKeysOfIdentity(const Name &identity) const override
Get all the key names of an identity with name identity.
Buffer getKeyBits(const Name &keyName) const override
Get the key bits of a key with name keyName.
void clearIdentities() override
Erasing all certificates, keys, and identities.
v2::Certificate getCertificate(const Name &certificateName) const override
Get a certificate with name certName.
bool hasKey(const Name &keyName) const override
Check the existence of a key with keyName.
Name getDefaultIdentity() const override
Get the default identity.
static const std::string SCHEME
void removeKey(const Name &keyName) override
Remove a key with keyName and related certificates.
shared_ptr< const Buffer > ConstBufferPtr
bool hasCertificate(const Name &certName) const override
Check the existence of a certificate with name certName.
Abstract class of PIB implementation.
void addIdentity(const Name &identityName) override
Add an identity.
Copyright (c) 2011-2015 Regents of the University of California.
std::string getTpmLocator() const override
Get TPM Locator.