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 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< KeyHandlegetKeyHandle (const Name &keyName) const
 Get the handle of the key with name keyName. More...
 
unique_ptr< KeyHandlecreateKey (const Name &identityName, const KeyParams &params)
 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, const uint8_t *pkcs8, size_t pkcs8Len, 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 &params) 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 &params) const
 Construct and return the name of a HMAC key, based on identity and params. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ DummyTpm()

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

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

Member Function Documentation

◆ isTerminalMode()

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

Check if the TPM is in terminal mode.

The default implementation always returns true.

Returns
True if in terminal mode, false otherwise.

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

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

◆ setTerminalMode()

void ndn::security::DummyTpm::setTerminalMode ( bool  isTerminal) const
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 291 of file dummy-keychain.cpp.

◆ isTpmLocked()

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

Check if the TPM is locked.

The default implementation always returns false.

Returns
True if locked, false otherwise.

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

Definition at line 296 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 346 of file dummy-keychain.cpp.

References SCHEME.

Member Data Documentation

◆ SCHEME

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

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

Referenced by getScheme().


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