From: Lennart Poettering Date: Tue, 16 Apr 2024 11:45:00 +0000 (+0200) Subject: tpm2: export tpm2_get_name() X-Git-Tag: v256-rc1~127^2~9 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=98ef5f8419ade95b7df0022ced6559cf47b80b83;p=systemd%2F.git tpm2: export tpm2_get_name() We later want to use this from pcrlock.c, hence export it. --- diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index 69f8ee7a7c..0c20024b98 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -3396,7 +3396,7 @@ int tpm2_calculate_pubkey_name(const TPMT_PUBLIC *public, TPM2B_NAME *ret_name) * * The handle must reference a key already present in the TPM. It may be either a public key only, or a * public/private keypair. */ -static int tpm2_get_name( +int tpm2_get_name( Tpm2Context *c, const Tpm2Handle *handle, TPM2B_NAME **ret_name) { diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h index f9f29e310d..7249ad04ab 100644 --- a/src/shared/tpm2-util.h +++ b/src/shared/tpm2-util.h @@ -131,6 +131,7 @@ int tpm2_marshal_nv_public(const TPM2B_NV_PUBLIC *nv_public, void **ret, size_t int tpm2_unmarshal_nv_public(const void *data, size_t size, TPM2B_NV_PUBLIC *ret_nv_public); int tpm2_marshal_blob(const TPM2B_PUBLIC *public, const TPM2B_PRIVATE *private, const TPM2B_ENCRYPTED_SECRET *seed, void **ret_blob, size_t *ret_blob_size); int tpm2_unmarshal_blob(const void *blob, size_t blob_size, TPM2B_PUBLIC *ret_public, TPM2B_PRIVATE *ret_private, TPM2B_ENCRYPTED_SECRET *ret_seed); +int tpm2_get_name(Tpm2Context *c, const Tpm2Handle *handle, TPM2B_NAME **ret_name); bool tpm2_supports_alg(Tpm2Context *c, TPM2_ALG_ID alg); bool tpm2_supports_command(Tpm2Context *c, TPM2_CC command);