tpm2-util: TPM2_PCR_MASK_VALID() should take 64-bit parameter
... as some of the fields like `pcr_mask` field of `struct tpm2_credential_header` that are passed to this function are 64-bit. (cherry picked from commit de827820240d56a142aea7a2b012121a8869282d)
This commit is contained in:
committed by
Luca Boccassi
parent
32cfe286c9
commit
e9ba92f7f0
@@ -40,7 +40,9 @@ typedef enum TPM2Flags {
|
||||
static inline bool TPM2_PCR_INDEX_VALID(unsigned pcr) {
|
||||
return pcr < TPM2_PCRS_MAX;
|
||||
}
|
||||
static inline bool TPM2_PCR_MASK_VALID(uint32_t pcr_mask) {
|
||||
|
||||
/* Some fields like `pcr_mask` field of `struct tpm2_credential_header` are 64-bit. */
|
||||
static inline bool TPM2_PCR_MASK_VALID(uint64_t pcr_mask) {
|
||||
return pcr_mask <= TPM2_PCRS_MASK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user