The back-end implementation of file-based TPM. More...
#include <back-end-file.hpp>
Classes | |
class | Error |
class | Impl |
Public Member Functions | |
BackEndFile (const std::string &location="") | |
Create file-based TPM backend. More... | |
~BackEndFile () override | |
Public Member Functions inherited from ndn::security::tpm::BackEnd | |
virtual | ~BackEnd () |
bool | hasKey (const Name &keyName) const |
unique_ptr< KeyHandle > | getKeyHandle (const Name &keyName) const |
unique_ptr< KeyHandle > | createKey (const Name &identity, const KeyParams ¶ms) |
Create key for identity according to params . More... | |
void | deleteKey (const Name &keyName) |
Delete a key with name keyName . More... | |
ConstBufferPtr | exportKey (const Name &keyName, const char *pw, size_t pwLen) |
void | importKey (const Name &keyName, const uint8_t *pkcs8, size_t pkcs8Len, const char *pw, size_t pwLen) |
Import a private key in encrypted PKCS #8 format. More... | |
virtual bool | isTerminalMode () const |
Check if TPM is in terminal mode. More... | |
virtual void | setTerminalMode (bool isTerminal) const |
Set the terminal mode of TPM. More... | |
virtual bool | isTpmLocked () const |
virtual bool | unlockTpm (const char *pw, size_t pwLen) const |
Unlock TPM. More... | |
Static Public Member Functions | |
static const std::string & | getScheme () |
Additional Inherited Members | |
Static Protected Member Functions inherited from ndn::security::tpm::BackEnd | |
static void | setKeyName (KeyHandle &keyHandle, const Name &identity, const KeyParams ¶ms) |
Set the key name in keyHandle according to identity and params . More... | |
The back-end implementation of file-based TPM.
In this TPM, each private key is stored in a separate file with permission 0400, i.e., owner read-only. The key is stored in PKCS #1 format in base64 encoding.
Definition at line 41 of file back-end-file.hpp.
|
explicit |
Create file-based TPM backend.
location | Directory to store private keys |
Definition at line 79 of file back-end-file.cpp.
References ~BackEndFile().
|
overridedefault |
Referenced by BackEndFile().
|
static |
Definition at line 87 of file back-end-file.cpp.
References ndn::OBufferStream::buf(), ndn::security::transform::generatePrivateKey(), and ndn::security::tpm::BackEnd::setKeyName().