|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
22 #ifndef NDN_SECURITY_TPM_BACK_END_HPP
23 #define NDN_SECURITY_TPM_BACK_END_HPP
110 importKey(
const Name& keyName,
const uint8_t* pkcs8,
size_t pkcs8Len,
const char* pw,
size_t pwLen);
118 importKey(
const Name& keyName, shared_ptr<transform::PrivateKey> key);
160 unlockTpm(
const char* pw,
size_t pwLen)
const;
179 doHasKey(
const Name& keyName)
const = 0;
181 virtual unique_ptr<KeyHandle>
182 doGetKeyHandle(
const Name& keyName)
const = 0;
184 virtual unique_ptr<KeyHandle>
185 doCreateKey(
const Name& identity,
const KeyParams& params) = 0;
188 doDeleteKey(
const Name& keyName) = 0;
191 doExportKey(
const Name& keyName,
const char* pw,
size_t pwLen) = 0;
194 doImportKey(
const Name& keyName,
const uint8_t* pkcs8,
size_t pkcs8Len,
const char* pw,
size_t pwLen) = 0;
197 doImportKey(
const Name& keyName, shared_ptr<transform::PrivateKey> key) = 0;
204 #endif // NDN_SECURITY_TPM_BACK_END_HPP
Base class for key parameters.
ConstBufferPtr exportKey(const Name &keyName, const char *pw, size_t pwLen)
Get the private key with name keyName in encrypted PKCS #8 format.
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.
virtual void setTerminalMode(bool isTerminal) const
Set the terminal mode of the TPM.
Abstract interface for a TPM backend implementation.
unique_ptr< KeyHandle > createKey(const Name &identityName, const KeyParams ¶ms)
Create a key for identityName according to params.
Abstraction of TPM key handle.
Represents an absolute name.
#define NDN_CXX_NODISCARD
unique_ptr< KeyHandle > getKeyHandle(const Name &keyName) const
Get the handle of the key with name keyName.
virtual bool isTpmLocked() const
Check if the TPM is locked.
virtual NDN_CXX_NODISCARD bool unlockTpm(const char *pw, size_t pwLen) const
Unlock the TPM.
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.
virtual bool isTerminalMode() const
Check if the TPM is in terminal mode.
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.
bool hasKey(const Name &keyName) const
Check if the key with name keyName exists in the TPM.
void deleteKey(const Name &keyName)
Delete the key with name keyName.
shared_ptr< const Buffer > ConstBufferPtr
Copyright (c) 2011-2015 Regents of the University of California.