analyze: add new "pcrs" verb

It shows the PCRs we know about along with their name strings and
current values.
This commit is contained in:
Lennart Poettering
2023-06-28 16:50:50 +02:00
parent 51c425dc93
commit f70c90f5ca
8 changed files with 205 additions and 3 deletions
+1
View File
@@ -4046,3 +4046,4 @@ static const char* const pcr_index_table[_PCR_INDEX_MAX_DEFINED] = {
};
DEFINE_STRING_TABLE_LOOKUP_FROM_STRING_WITH_FALLBACK(pcr_index, int, TPM2_PCRS_MAX - 1);
DEFINE_STRING_TABLE_LOOKUP_TO_STRING(pcr_index, int);
+2 -1
View File
@@ -221,4 +221,5 @@ int tpm2_util_pbkdf2_hmac_sha256(const void *pass,
size_t saltlen,
uint8_t res[static SHA256_DIGEST_SIZE]);
int pcr_index_from_string(const char *s);
int pcr_index_from_string(const char *s) _pure_;
const char *pcr_index_to_string(int pcr) _const_;