diff options
author | Yves-Alexis Perez <corsac@corsac.net> | 2017-04-01 16:26:44 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@corsac.net> | 2017-04-01 16:26:44 +0200 |
commit | 05ddd767992d68bb38c7f16ece142e8c2e9ae016 (patch) | |
tree | 302c618be306d4ed3c7f9fc58a1f6aaad4dd252f /src/libtpmtss/tpm_tss.h | |
parent | 25663e04c3ab01ef8dc9f906608282319cfea2db (diff) | |
download | vyos-strongswan-05ddd767992d68bb38c7f16ece142e8c2e9ae016.tar.gz vyos-strongswan-05ddd767992d68bb38c7f16ece142e8c2e9ae016.zip |
New upstream version 5.5.2
Diffstat (limited to 'src/libtpmtss/tpm_tss.h')
-rw-r--r-- | src/libtpmtss/tpm_tss.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libtpmtss/tpm_tss.h b/src/libtpmtss/tpm_tss.h index 4f4b9e2cf..f408d0440 100644 --- a/src/libtpmtss/tpm_tss.h +++ b/src/libtpmtss/tpm_tss.h @@ -120,6 +120,30 @@ struct tpm_tss_t { tpm_tss_quote_info_t **quote_info, chunk_t *quote_sig); /** + * Do a signature over a data hash using a TPM key handle (TPM 2.0 only) + * + * @param handle object handle of TPM key to be used for signature + * @param hierarchy hierarchy the TPM key object is attached to + * @param scheme scheme to be used for signature + * @param data data to be hashed and signed + * @param pin PIN code or empty chunk + * @param signature returns signature + * @return TRUE if signature succeeded + */ + bool (*sign)(tpm_tss_t *this, uint32_t hierarchy, uint32_t handle, + signature_scheme_t scheme, chunk_t data, chunk_t pin, + chunk_t *signature); + + /** + * Get random bytes from the TPM + * + * @param bytes number of random bytes requested + * @param buffer buffer where the random bytes are written into + * @return TRUE if random bytes could be delivered + */ + bool (*get_random)(tpm_tss_t *this, size_t bytes, uint8_t *buffer); + + /** * Destroy a tpm_tss_t. */ void (*destroy)(tpm_tss_t *this); |