aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2020-11-26 23:07:22 +0200
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2020-12-03 21:22:40 +0100
commite926136bb29cb9dda00f1b8960db963b6e97124b (patch)
tree6125a0fcda8cb9d079013084754843f21616ce51 /include
parentfc364424ac992ddae5779ae3ca8ddcd006a6ea27 (diff)
downloadu-boot-e926136bb29cb9dda00f1b8960db963b6e97124b.zip
u-boot-e926136bb29cb9dda00f1b8960db963b6e97124b.tar.gz
u-boot-e926136bb29cb9dda00f1b8960db963b6e97124b.tar.bz2
tpm: use more than sha256 on pcr_extend
The current tpm2_pcr_extend is hardcoded using SHA256. Let's make the actual command to the TPM2 configurable so we can support a wider range of algorithms and keep the current command line as-is i.e limited to SHA256 only Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/tpm-v2.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index 74c14fe..f1826ff 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -309,11 +309,14 @@ u32 tpm2_clear(struct udevice *dev, u32 handle, const char *pw,
*
* @dev TPM device
* @index Index of the PCR
+ * @algorithm Algorithm used, defined in 'enum tpm2_algorithms'
* @digest Value representing the event to be recorded
+ * @digest_len len of the hash
*
* @return code of the operation
*/
-u32 tpm2_pcr_extend(struct udevice *dev, u32 index, const uint8_t *digest);
+u32 tpm2_pcr_extend(struct udevice *dev, u32 index, u32 algorithm,
+ const u8 *digest, u32 digest_len);
/**
* Issue a TPM2_PCR_Read command.