tpm: use more algorithms than sha256 on pcr_read
authorRuchika Gupta <ruchika.gupta@linaro.org>
Mon, 29 Nov 2021 07:39:45 +0000 (13:09 +0530)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 30 Nov 2021 08:23:49 +0000 (09:23 +0100)
commit2957a1e22407a84a2cc7c4ea5a8136af1d0278d9
tree7f4cc42de253c761e6d94906a6f777e3216b8174
parent34287efdaf6ed186a64445f65227b5407a1dcd63
tpm: use more algorithms than sha256 on pcr_read

The current tpm2_pcr_read is hardcoded using SHA256. Make the
actual command to TPM configurable to use wider range of algorithms.
The current command line is kept as is i.e limited to SHA-256 only.

Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
cmd/tpm-v2.c
include/tpm-v2.h
lib/tpm-v2.c