tpm2: rename tpm2 alg id<->string functions

The 'pcr_bank' functions operate on hash algs, and are not specific to the PCR
banks, while the 'primary_alg' functions operate on asymmetric algs, and are
not specific to primary keys.
This commit is contained in:
Dan Streetman
2023-02-01 18:13:48 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 92fc007902
commit 7bfe0a48d9
5 changed files with 33 additions and 33 deletions
+1 -1
View File
@@ -855,7 +855,7 @@ static int verb_sign(int argc, char *argv[], void *userdata) {
assert(sizeof(intermediate_digest.buffer) >= SHA256_DIGEST_SIZE);
sha256_direct(p->value, p->value_size, intermediate_digest.buffer);
int tpmalg = tpm2_pcr_bank_from_string(EVP_MD_name(p->md));
int tpmalg = tpm2_hash_alg_from_string(EVP_MD_name(p->md));
if (tpmalg < 0) {
log_error_errno(tpmalg, "Unsupported PCR bank");
goto finish;