22 #ifndef NDN_SECURITY_TPM_BACK_END_OSX_HPP 23 #define NDN_SECURITY_TPM_BACK_END_OSX_HPP 28 #ifndef NDN_CXX_HAVE_OSX_FRAMEWORKS 29 #error "This file should not be compiled ..." 62 static const std::string&
76 unlockTpm(
const char* pw,
size_t pwLen)
const final;
96 doHasKey(
const Name& keyName)
const final;
101 unique_ptr<KeyHandle>
102 doGetKeyHandle(
const Name& keyName)
const final;
112 unique_ptr<KeyHandle>
113 doCreateKey(
const Name& identityName,
const KeyParams& params)
final;
121 doDeleteKey(
const Name& keyName)
final;
128 doExportKey(
const Name& keyName,
const char* pw,
size_t pwLen)
final;
141 doImportKey(
const Name& keyName,
const uint8_t* buf,
size_t size,
const char* pw,
size_t pwLen)
final;
145 const unique_ptr<Impl> m_impl;
152 #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
Copyright (c) 2013-2017 Regents of the University of California.
The back-end implementation of TPM based on macOS Keychain Services.
Error(const std::string &what)
Abstraction of Tpm back-end.
static const std::string & getScheme()
bool isTerminalMode() const final
Check if TPM is in terminal mode.
void setTerminalMode(bool isTerminal) const final
Set the terminal mode of TPM.
static ConstBufferPtr derivePublicKey(const KeyRefOsx &key)
BackEndOsx(const std::string &location="")
Create TPM backed based on macOS KeyChain service.
bool unlockTpm(const char *pw, size_t pwLen) const final
Unlock 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