mirror of
https://github.com/stefanberger/swtpm.git
synced 2026-02-04 21:19:14 +00:00
swtpm_bios: Use TPM2_ALG_SHA256 as parameter to TPM2_IncrementalSelfTest
Do not use TPM2_ALG_SHA1 anymore as parameter to TPM2_IncrementalSelfTest() so that this also works when SHA1 support in libtpms is runtime-disabled. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
parent
933ac94d5d
commit
9ebd925619
@ -422,7 +422,7 @@ static int TPM2_IncrementalSelfTest(int *tpm_errcode)
|
||||
.to_test = {
|
||||
.num_entries = htobe32(1),
|
||||
.algids = {
|
||||
htobe16(TPM2_ALG_SHA1),
|
||||
htobe16(TPM2_ALG_SHA256),
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -613,7 +613,7 @@ static int tpm2_bios(int contselftest, unsigned char startupparm,
|
||||
ret = TPM2_IncrementalSelfTest(&tpm_errcode);
|
||||
if (tpm_errcode != 0) {
|
||||
tpm_error = 1;
|
||||
printf("TPM2_ImcrementalSelfTest returned error "
|
||||
printf("TPM2_IncrementalSelfTest returned error "
|
||||
"code 0x%08x\n", tpm_errcode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,7 +130,7 @@ struct tpm_get_capability_permflags_res {
|
||||
#define TPM2_SU_CLEAR 0x0000
|
||||
#define TPM2_SU_STATE 0x0001
|
||||
|
||||
#define TPM2_ALG_SHA1 0x0004
|
||||
#define TPM2_ALG_SHA256 0x000b
|
||||
|
||||
#define TPM2_RS_PW 0x40000009
|
||||
#define TPM2_RH_PLATFORM 0x4000000c
|
||||
|
||||
Loading…
Reference in New Issue
Block a user