mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-02-04 21:19:14 +00:00
swtpm: Ignore error if TPMLIB_ChooseTPMVersion for printing caps fails
Revert the change from the previous patch that shows an error when TPMLIB_ChooseTPMVersion fails but rather ignore the error as before. If a TPM 2 is supported then tpm-2.0 capability verb will be shown and if a TPM 1.2 is supported then tpm-1.2 will be shown, thus allowing someone reading the JSON to determine what is supported. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
bf3f517539
commit
76001cd26c
@ -130,10 +130,8 @@ int capabilities_print_json(bool cusetpm, TPMLIB_TPMVersion tpmversion)
|
||||
const char *nvram_backend_dir = "\"nvram-backend-dir\", ";
|
||||
const char *nvram_backend_file = "\"nvram-backend-file\"";
|
||||
|
||||
if (TPMLIB_ChooseTPMVersion(tpmversion) != TPM_SUCCESS) {
|
||||
logprintf(STDERR_FILENO, "Could not choose TPM version.\n");
|
||||
goto cleanup;
|
||||
}
|
||||
/* ignore errors */
|
||||
TPMLIB_ChooseTPMVersion(tpmversion);
|
||||
|
||||
ret = get_rsa_keysize_caps(&keysizecaps);
|
||||
if (ret < 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user