summaryrefslogtreecommitdiff
path: root/src/libtpmtss/tpm_tss.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtpmtss/tpm_tss.h')
-rw-r--r--src/libtpmtss/tpm_tss.h24
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);