tpmr: Provide startsession for TPM1 and TPM2

It's a no-op on TPM1, but provide it so init doesn't have to
distinguish TPM1/TPM2.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
Jonathon Hall 2023-03-13 13:10:24 -04:00
parent 5c33130ddc
commit ea5b8dc30f
No known key found for this signature in database
GPG Key ID: 1E9C3CA91AE25114
2 changed files with 3 additions and 1 deletions

View File

@ -578,6 +578,8 @@ if [ "$CONFIG_TPM2_TOOLS" != "y" ]; then
shift; tpm1_calcfuturepcr "$@";;
seal)
shift; tpm1_seal "$@";;
startsession)
;; # Nothing on TPM1.
unseal)
shift; tpm1_unseal "$@";;
reset)

View File

@ -72,7 +72,7 @@ else
export BG_COLOR_ERROR="${CONFIG_ERROR_BG_COLOR:-""}"
fi
if [ "$CONFIG_TPM2_TOOLS" = "y" ]; then
if [ "$CONFIG_TPM" = "y" ]; then
# Initialize tpm2 encrypted sessions here
tpmr startsession
fi