#include <dummy-keychain.hpp>
Classes | |
class | Error |
Public Member Functions | |
DummyTpm (const std::string &locator) | |
bool | isTerminalMode () const override |
Check if the TPM is in terminal mode. More... | |
void | setTerminalMode (bool isTerminal) const override |
Set the terminal mode of the TPM. More... | |
bool | isTpmLocked () const override |
Check if the TPM is locked. More... | |
ConstBufferPtr | sign (const uint8_t *buf, size_t size, const Name &keyName, DigestAlgorithm digestAlgorithm) const |
Public Member Functions inherited from ndn::security::tpm::BackEnd | |
virtual | ~BackEnd () |
bool | hasKey (const Name &keyName) const |
Check if the key with name keyName exists in the TPM. More... | |
unique_ptr< KeyHandle > | getKeyHandle (const Name &keyName) const |
Get the handle of the key with name keyName . More... | |
unique_ptr< KeyHandle > | createKey (const Name &identityName, const KeyParams ¶ms) |
Create a key for identityName according to params . More... | |
void | deleteKey (const Name &keyName) |
Delete the key with name keyName . More... | |
ConstBufferPtr | exportKey (const Name &keyName, const char *pw, size_t pwLen) |
Get the private key with name keyName in encrypted PKCS #8 format. More... | |
void | importKey (const Name &keyName, span< const uint8_t > pkcs8, const char *pw, size_t pwLen) |
Import a private key in encrypted PKCS #8 format. More... | |
void | importKey (const Name &keyName, shared_ptr< transform::PrivateKey > key) |
Import a private key. More... | |
virtual NDN_CXX_NODISCARD bool | unlockTpm (const char *pw, size_t pwLen) const |
Unlock the TPM. More... | |
Static Public Member Functions | |
static std::string | getScheme () |
Static Public Attributes | |
static const std::string | SCHEME = "tpm-dummy" |
Additional Inherited Members | |
Public Types inherited from ndn::security::tpm::BackEnd | |
using | Error = Tpm::Error |
Protected Member Functions inherited from ndn::security::tpm::BackEnd | |
Name | constructAsymmetricKeyName (const KeyHandle &key, const Name &identity, const KeyParams ¶ms) const |
Construct and return the name of a RSA or EC key, based on identity and params . More... | |
Name | constructHmacKeyName (const transform::PrivateKey &key, const Name &identity, const KeyParams ¶ms) const |
Construct and return the name of a HMAC key, based on identity and params . More... | |
Definition at line 164 of file dummy-keychain.hpp.
|
explicit |
Definition at line 278 of file dummy-keychain.cpp.
|
overridevirtual |
Check if the TPM is in terminal mode.
The default implementation always returns true.
Reimplemented from ndn::security::tpm::BackEnd.
Definition at line 283 of file dummy-keychain.cpp.
|
overridevirtual |
Set the terminal mode of the TPM.
In terminal mode, the TPM will not ask for a password from the GUI. The default implementation does nothing.
Reimplemented from ndn::security::tpm::BackEnd.
Definition at line 289 of file dummy-keychain.cpp.
|
overridevirtual |
Check if the TPM is locked.
The default implementation always returns false.
Reimplemented from ndn::security::tpm::BackEnd.
Definition at line 294 of file dummy-keychain.cpp.
ConstBufferPtr ndn::security::DummyTpm::sign | ( | const uint8_t * | buf, |
size_t | size, | ||
const Name & | keyName, | ||
DigestAlgorithm | digestAlgorithm | ||
) | const |
|
static |
Definition at line 344 of file dummy-keychain.cpp.
References SCHEME.
|
static |
Definition at line 218 of file dummy-keychain.hpp.
Referenced by getScheme().