tree-wide: relax TPM available checks for many cases
In many cases it's essential to know if the firmware supports a TPM, but in others we should accept it if the firmware doesn't have TPM support, in particular if we want to run the OS with a software TPM. Hence, add tpm2_is_mostly_supported() as function similar to tpm2_is_fully_supported(), with the only difference that the former doesn't insist on a firmware supported TPM. Then, change a number of users over to this (but not all).
This commit is contained in:
@@ -894,7 +894,7 @@ int encrypt_credential_and_warn(
|
||||
* container tpm2_support will detect this, and will return a different flag combination of
|
||||
* TPM2_SUPPORT_FULL, effectively skipping the use of TPM2 when inside one. */
|
||||
|
||||
try_tpm2 = tpm2_is_fully_supported();
|
||||
try_tpm2 = tpm2_is_mostly_supported();
|
||||
if (!try_tpm2)
|
||||
log_debug("System lacks TPM2 support or running in a container, not attempting to use TPM2.");
|
||||
} else
|
||||
|
||||
Reference in New Issue
Block a user