22 #ifndef NDN_SECURITY_TPM_BACK_END_OSX_HPP
23 #define NDN_SECURITY_TPM_BACK_END_OSX_HPP
28 #ifndef NDN_CXX_HAVE_OSX_SECURITY
29 #error "This file should not be compiled ..."
62 static const std::string&
76 unlockTpm(const
char* pw,
size_t pwLen) const final;
86 decrypt(const
KeyRefOsx& key, const uint8_t* cipherText,
size_t cipherSize) const;
97 doHasKey(const
Name& keyName) const final;
103 doGetKeyHandle(const
Name& keyName) const final;
114 doCreateKey(const
Name& identityName, const
KeyParams& params) final;
122 doDeleteKey(const
Name& keyName) final;
129 doExportKey(const
Name& keyName, const
char* pw,
size_t pwLen) final;
142 doImportKey(const
Name& keyName, const uint8_t* buf,
size_t size, const
char* pw,
size_t pwLen) final;
146 unique_ptr<Impl> m_impl;
153 #endif // NDN_SECURITY_TPM_BACK_END_OSX_HPP
bool isTpmLocked() const final
Copyright (c) 2013-2016 Regents of the University of California.
The back-end implementation of TPM based on macOS Keychain Services.
ConstBufferPtr sign(const KeyRefOsx &key, DigestAlgorithm digestAlgorithm, const uint8_t *buf, size_t size) const
Sign buf with key using digestAlgorithm.
bool isTerminalMode() const final
Check if TPM is in terminal mode.
Abstraction of TPM key handle.
Error(const std::string &what)
Abstraction of Tpm back-end.
static const std::string & getScheme()
ConstBufferPtr derivePublicKey(const KeyRefOsx &key) const
ConstBufferPtr decrypt(const KeyRefOsx &key, const uint8_t *cipherText, size_t cipherSize) const
void setTerminalMode(bool isTerminal) const final
Set the terminal mode of TPM.
BackEndOsx(const std::string &location="")
Create TPM backed based on macOS KeyChain service.
Name abstraction to represent an absolute name.
bool unlockTpm(const char *pw, size_t pwLen) const final
Unlock TPM.
Base class of key parameters.
shared_ptr< const Buffer > ConstBufferPtr