Botan 3.6.1
Crypto and TLS for C&
|
#include <tpm.h>
Public Types | |
typedef std::function< std::string(std::string)> | pin_cb |
Public Member Functions | |
uint32_t | current_counter () |
void | gen_random (uint8_t out[], size_t out_len) |
std::string | get_user_pin (const std::string &who) |
TSS_HCONTEXT | handle () const |
TSS_HKEY | srk () const |
void | stir_random (const uint8_t in[], size_t in_len) |
TPM_Context (pin_cb cb, const char *srk_password) | |
~TPM_Context () | |
Creates a connection to the TPM. All other TPM types take and hold a TPM_Context reference, so all other objects must be deallocated before ~TPM_Context runs.
Use nullptr for the srk_password to indicate the well known secret (ie, an unencrypted SRK). This is usually what you want.
TODO: handling owner password?
std::function<std::string(std::string)> Botan::TPM_Context::pin_cb |
Botan::TPM_Context::TPM_Context | ( | pin_cb | cb, |
const char * | srk_password ) |
Definition at line 136 of file tpm.cpp.
References TSPI_CHECK_SUCCESS.
Botan::TPM_Context::~TPM_Context | ( | ) |
Definition at line 153 of file tpm.cpp.
References TSPI_CHECK_SUCCESS.
uint32_t Botan::TPM_Context::current_counter | ( | ) |
Definition at line 160 of file tpm.cpp.
References TSPI_CHECK_SUCCESS.
void Botan::TPM_Context::gen_random | ( | uint8_t | out[], |
size_t | out_len ) |
Definition at line 166 of file tpm.cpp.
References Botan::copy_mem(), and TSPI_CHECK_SUCCESS.
|
inline |
|
inline |
Definition at line 65 of file tpm.h.
Referenced by Botan::TPM_PrivateKey::export_blob(), Botan::TPM_PrivateKey::get_e(), Botan::TPM_PrivateKey::get_n(), Botan::TPM_PrivateKey::register_key(), Botan::TPM_PrivateKey::registered_keys(), Botan::TPM_PrivateKey::TPM_PrivateKey(), Botan::TPM_PrivateKey::TPM_PrivateKey(), and Botan::TPM_PrivateKey::TPM_PrivateKey().
|
inline |
Definition at line 67 of file tpm.h.
Referenced by Botan::TPM_PrivateKey::TPM_PrivateKey(), and Botan::TPM_PrivateKey::TPM_PrivateKey().
void Botan::TPM_Context::stir_random | ( | const uint8_t | in[], |
size_t | in_len ) |