22 #ifndef NDN_SECURITY_TPM_BACK_END_OSX_HPP 23 #define NDN_SECURITY_TPM_BACK_END_OSX_HPP 27 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS 28 #error "This file should not be compiled ..." 53 static const std::string&
67 unlockTpm(
const char* pw,
size_t pwLen)
const final;
84 doHasKey(
const Name& keyName)
const final;
87 doGetKeyHandle(
const Name& keyName)
const final;
90 doCreateKey(
const Name& identityName,
const KeyParams& params)
final;
93 doDeleteKey(
const Name& keyName)
final;
96 doExportKey(
const Name& keyName,
const char* pw,
size_t pwLen)
final;
99 doImportKey(
const Name& keyName,
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen)
final;
103 const unique_ptr<Impl> m_impl;
110 #endif // NDN_SECURITY_TPM_BACK_END_OSX_HPP
static ConstBufferPtr decrypt(const KeyRefOsx &key, const uint8_t *cipherText, size_t cipherSize)
bool isTpmLocked() const final
Check if the TPM is locked.
The back-end implementation of TPM based on macOS Keychain Services.
Abstract interface for a TPM backend implementation.
static const std::string & getScheme()
bool isTerminalMode() const final
Check if the TPM is in terminal mode.
void setTerminalMode(bool isTerminal) const final
Set the terminal mode of the TPM.
static ConstBufferPtr derivePublicKey(const KeyRefOsx &key)
BackEndOsx(const std::string &location="")
Create TPM backed based on macOS Keychain Services.
bool unlockTpm(const char *pw, size_t pwLen) const final
Unlock the TPM.
Represents an absolute name.
static ConstBufferPtr sign(const KeyRefOsx &key, DigestAlgorithm digestAlgorithm, const uint8_t *buf, size_t size)
Sign buf with key using digestAlgorithm.
Base class of key parameters.
shared_ptr< const Buffer > ConstBufferPtr