summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2024-05-25 23:00:49 +0300
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2024-05-27 09:00:27 +0300
commit89aa8463cdf3919ca4f04fc24ec8b154ff56d97e (patch)
treedb01b2d58c7b3d7bf8124519114a41b35129f1a9 /test
parent954b95e77ef0a857a0b5272e3e6c0e5318dc1208 (diff)
downloadu-boot-89aa8463cdf3919ca4f04fc24ec8b154ff56d97e.tar.xz
tpm-v2: allow algorithm name to be configured for pcr_read and pcr_extend
For pcr_read and pcr_extend commands allow the digest algorithm to be specified by an additional argument. If not specified it will default to SHA256 for backwards compatibility. Additionally update test_tpm2.py for the changes in output in pcr_read which now shows the algo and algo length in the output. A follow-on to this could be to extend all PCR banks with the detected algo when the <digest_algo> argument is 'auto'. Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'test')
-rw-r--r--test/py/tests/test_tpm2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
index 1d654cd4a2..75f5d31fc6 100644
--- a/test/py/tests/test_tpm2.py
+++ b/test/py/tests/test_tpm2.py
@@ -257,7 +257,7 @@ def test_tpm2_pcr_read(u_boot_console):
updates = int(re.findall(r'\d+', str)[0])
# Check the output value
- assert 'PCR #10 content' in read_pcr
+ assert 'PCR #10 sha256 32 byte content' in read_pcr
assert '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' in read_pcr
@pytest.mark.buildconfigspec('cmd_tpm_v2')