From fa74b488a56e8d055924a88a3b7cc8f8f68efa5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Old=C5=99ich=20Jedli=C4=8Dka?= Date: Wed, 2 Oct 2024 23:13:22 +0200 Subject: [PATCH] TPM2 fixes --- src/pins/tpm2/tests/tpm2-common-test-functions | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pins/tpm2/tests/tpm2-common-test-functions b/src/pins/tpm2/tests/tpm2-common-test-functions index 08edd472..076189c2 100644 --- a/src/pins/tpm2/tests/tpm2-common-test-functions +++ b/src/pins/tpm2/tests/tpm2-common-test-functions @@ -77,8 +77,9 @@ tpm2_hw_available() { } tpm2_version() { - local _tpm2tools_info="$(tpm2_createprimary -v)" + local _tpm2tools_info local _match='version="(.)\.' + _tpm2tools_info="$(tpm2_createprimary -v)" [[ ${_tpm2tools_info} =~ ${_match} ]] && TPM2TOOLS_VERSION="${BASH_REMATCH[1]}" if [[ $TPM2TOOLS_VERSION -lt 3 ]] || [[ $TPM2TOOLS_VERSION -gt 5 ]]; then echo "The tpm2 pin requires a tpm2-tools version between 3 and 5" >&2