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 | dc9380af81fbce8e1a9532b07bc671b9d346101b (patch) | |
tree | 219f7df0b01243ac1c41c7f679d1b4c6aef36b27 /src/libtpmtss/tpm_tss.h | |
parent | 212c0ba74c0e453497b840f9cd131ec99f73754a (diff) | |
parent | 05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff) | |
download | vyos-strongswan-dc9380af81fbce8e1a9532b07bc671b9d346101b.tar.gz vyos-strongswan-dc9380af81fbce8e1a9532b07bc671b9d346101b.zip |
Merge tag 'upstream/5.5.2'
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); |