NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::security::DummyTpm Class Reference

#include <dummy-keychain.hpp>

Inheritance diagram for ndn::security::DummyTpm:
Collaboration diagram for ndn::security::DummyTpm:

Classes

class  Error
 

Public Member Functions

 DummyTpm (const std::string &locator)
 
bool isTerminalMode () const override
 Check if TPM is in terminal mode. More...
 
void setTerminalMode (bool isTerminal) const override
 Set the terminal mode of TPM. More...
 
bool isTpmLocked () const override
 
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
 
unique_ptr< KeyHandlegetKeyHandle (const Name &keyName) const
 
unique_ptr< KeyHandlecreateKey (const Name &identity, const KeyParams &params)
 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 unlockTpm (const char *pw, size_t pwLen) const
 Unlock TPM. More...
 

Static Public Member Functions

static std::string getScheme ()
 

Static Public Attributes

static const std::string SCHEME = "tpm-dummy"
 

Additional Inherited Members

- Static Protected Member Functions inherited from ndn::security::tpm::BackEnd
static void setKeyName (KeyHandle &keyHandle, const Name &identity, const KeyParams &params)
 Set the key name in keyHandle according to identity and params. More...
 

Detailed Description

Definition at line 162 of file dummy-keychain.hpp.

Constructor & Destructor Documentation

◆ DummyTpm()

ndn::security::DummyTpm::DummyTpm ( const std::string &  locator)
explicit

Definition at line 273 of file dummy-keychain.cpp.

Member Function Documentation

◆ isTerminalMode()

bool ndn::security::DummyTpm::isTerminalMode ( ) const
overridevirtual

Check if TPM is in terminal mode.

Default implementation always returns true.

Reimplemented from ndn::security::tpm::BackEnd.

Definition at line 278 of file dummy-keychain.cpp.

◆ setTerminalMode()

void ndn::security::DummyTpm::setTerminalMode ( bool  isTerminal) const
overridevirtual

Set the terminal mode of TPM.

In terminal mode, TPM will not ask user permission from GUI.

Default implementation does nothing.

Reimplemented from ndn::security::tpm::BackEnd.

Definition at line 284 of file dummy-keychain.cpp.

◆ isTpmLocked()

bool ndn::security::DummyTpm::isTpmLocked ( ) const
overridevirtual
Returns
True if TPM is locked, otherwise false

Default implementation always returns false.

Reimplemented from ndn::security::tpm::BackEnd.

Definition at line 289 of file dummy-keychain.cpp.

◆ sign()

ConstBufferPtr ndn::security::DummyTpm::sign ( const uint8_t *  buf,
size_t  size,
const Name keyName,
DigestAlgorithm  digestAlgorithm 
) const

◆ getScheme()

std::string ndn::security::DummyTpm::getScheme ( )
static

Definition at line 333 of file dummy-keychain.cpp.

References SCHEME.

Member Data Documentation

◆ SCHEME

const std::string ndn::security::DummyTpm::SCHEME = "tpm-dummy"
static

Definition at line 213 of file dummy-keychain.hpp.

Referenced by getScheme().


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