tpm2-util: rename tpm2_calculate_name() → tpm2_calculate_pubkey_name()
We'll soon have a function for determining the name of an NV index, hence let's rename the existing function for the same of a public key to make clear it's about public keys only.
This commit is contained in:
committed by
Luca Boccassi
parent
242b4bebcd
commit
b98c4f1d48
@@ -3090,7 +3090,7 @@ static int find_signature(
|
||||
*
|
||||
* Since we (currently) hardcode to always using SHA256 for hashing, this returns an error if the public key
|
||||
* nameAlg is not TPM2_ALG_SHA256. */
|
||||
int tpm2_calculate_name(const TPMT_PUBLIC *public, TPM2B_NAME *ret_name) {
|
||||
int tpm2_calculate_pubkey_name(const TPMT_PUBLIC *public, TPM2B_NAME *ret_name) {
|
||||
TSS2_RC rc;
|
||||
int r;
|
||||
|
||||
@@ -3354,7 +3354,7 @@ int tpm2_calculate_policy_authorize(
|
||||
"Offset 0x%zx wrong after marshalling PolicyAuthorize command", offset);
|
||||
|
||||
TPM2B_NAME name = {};
|
||||
r = tpm2_calculate_name(&public->publicArea, &name);
|
||||
r = tpm2_calculate_pubkey_name(&public->publicArea, &name);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ int tpm2_read_public(Tpm2Context *c, const Tpm2Handle *session, const Tpm2Handle
|
||||
int tpm2_pcr_read(Tpm2Context *c, const TPML_PCR_SELECTION *pcr_selection, Tpm2PCRValue **ret_pcr_values, size_t *ret_n_pcr_values);
|
||||
int tpm2_pcr_read_missing_values(Tpm2Context *c, Tpm2PCRValue *pcr_values, size_t n_pcr_values);
|
||||
|
||||
int tpm2_calculate_name(const TPMT_PUBLIC *public, TPM2B_NAME *ret_name);
|
||||
int tpm2_calculate_pubkey_name(const TPMT_PUBLIC *public, TPM2B_NAME *ret_name);
|
||||
int tpm2_calculate_policy_auth_value(TPM2B_DIGEST *digest);
|
||||
int tpm2_calculate_policy_authorize(const TPM2B_PUBLIC *public, const TPM2B_DIGEST *policy_ref, TPM2B_DIGEST *digest);
|
||||
int tpm2_calculate_policy_pcr(const Tpm2PCRValue *pcr_values, size_t n_pcr_values, TPM2B_DIGEST *digest);
|
||||
|
||||
Reference in New Issue
Block a user