Skip to content

Commit

Permalink
TPM2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oldium committed Oct 2, 2024
1 parent 9f67252 commit fa74b48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pins/tpm2/tests/tpm2-common-test-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa74b48

Please sign in to comment.