drive: tpm: fix default version in schema

Since the check in start_swtpm() only checks for an explicitly
configured v2.0 to opt-in to version 2, the actual default is v1.2
and not v2.0 like the schema stated.

Of course, it would be nicer to have the default be v2.0, but changing
the check to use that default would break any TPM state without an
explicitly configured version.

There doesn't seem to be any code beside start_swtpm() accessing the
version.

Fixes: f9dde219 ("fix #3075: add TPM v1.2 and v2.0 support via swtpm")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fiona Ebner 2024-06-27 13:03:16 +02:00 committed by Fabian Grünbichler
parent 6ee6046ef2
commit 87084b18dd

View File

@ -394,7 +394,7 @@ my %tpmversion_fmt = (
description => "The TPM interface version. v2.0 is newer and should be preferred."
." Note that this cannot be changed later on.",
optional => 1,
default => 'v2.0',
default => 'v1.2',
},
);
my $tpmstate_fmt = {