All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
ndn::TpmBackEndFile Class Reference

TpmBackEndFile extends TpmBackEnd to implement a TPM back-end using on-disk file storage. More...

#include <tpm-back-end-file.hpp>

Inheritance diagram for ndn::TpmBackEndFile:
ndn::TpmBackEnd

Classes

class  Error
 A TpmBackEndFile::Error extends TpmBackEnd::Error and represents a non-semantic error in backend TPM file processing. More...
 

Public Member Functions

 TpmBackEndFile (const std::string &locationPath="")
 Create a TpmBackEndFile to use the given path to store files. More...
 
- Public Member Functions inherited from ndn::TpmBackEnd
bool hasKey (const Name &keyName) const
 Check if the key with name keyName exists in the TPM. More...
 
ptr_lib::shared_ptr< TpmKeyHandlegetKeyHandle (const Name &keyName) const
 Get the handle of the key with name keyName. More...
 
ptr_lib::shared_ptr< TpmKeyHandlecreateKey (const Name &identityName, const KeyParams &params)
 Create a key for the identityName according to params. More...
 
void deleteKey (const Name &keyName)
 Delete the key with name keyName. More...
 
Blob exportKey (const Name &keyName, const uint8_t *password, size_t passwordLength)
 Get the encoded private key with name keyName in PKCS #8 format, possibly password-encrypted. More...
 
void importKey (const Name &keyName, const uint8_t *pkcs8, size_t pkcs8Length, const uint8_t *password, size_t passwordLength)
 Import an encoded private key with name keyName in PKCS #8 format, possibly password-encrypted. More...
 
virtual bool isTerminalMode () const
 Check if the TPM is in terminal mode. More...
 
virtual void setTerminalMode (bool isTerminal) const
 Set the terminal mode of the TPM. More...
 
virtual bool isTpmLocked () const
 Check if the TPM is locked. More...
 
virtual bool unlockTpm (const uint8_t *password, size_t passwordLength) const
 Unlock the TPM. More...
 

Static Public Member Functions

static std::string getScheme ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from ndn::TpmBackEnd
static void setKeyName (TpmKeyHandle &keyHandle, const Name &identityName, const KeyParams &params)
 Set the key name in keyHandle according to identityName and params.
 

Detailed Description

TpmBackEndFile extends TpmBackEnd to implement a TPM back-end using on-disk file storage.

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.

Constructor & Destructor Documentation

ndn::TpmBackEndFile::TpmBackEndFile ( const std::string &  locationPath = "")

Create a TpmBackEndFile to use the given path to store files.

Parameters
locationPath(optional) The path of the directory to store private keys. This creates the directory if it doesn't exist. If omitted or empty use $HOME/.ndn/ndnsec-key-file .

The documentation for this class was generated from the following files: