diff options
author | Ilias Apalodimas <ilias.apalodimas@linaro.org> | 2020-11-27 00:07:22 +0300 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2020-12-03 23:22:40 +0300 |
commit | e926136bb29cb9dda00f1b8960db963b6e97124b (patch) | |
tree | 6125a0fcda8cb9d079013084754843f21616ce51 /cmd | |
parent | fc364424ac992ddae5779ae3ca8ddcd006a6ea27 (diff) | |
download | u-boot-e926136bb29cb9dda00f1b8960db963b6e97124b.tar.xz |
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 'cmd')
-rw-r--r-- | cmd/tpm-v2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c index 5fa4788a72..daae91100a 100644 --- a/cmd/tpm-v2.c +++ b/cmd/tpm-v2.c @@ -116,7 +116,8 @@ static int do_tpm2_pcr_extend(struct cmd_tbl *cmdtp, int flag, int argc, if (index >= priv->pcr_count) return -EINVAL; - rc = tpm2_pcr_extend(dev, index, digest); + rc = tpm2_pcr_extend(dev, index, TPM2_ALG_SHA256, digest, + TPM2_DIGEST_LEN); unmap_sysmem(digest); |