tpm2: export tpm2_get_name()
authorLennart Poettering <lennart@poettering.net>
Tue, 16 Apr 2024 11:45:00 +0000 (13:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 18 Apr 2024 16:12:23 +0000 (18:12 +0200)
We later want to use this from pcrlock.c, hence export it.

src/shared/tpm2-util.c
src/shared/tpm2-util.h

index 69f8ee7a7c13727e7e29b3e4e5544e63d29127e4..0c20024b9883079d0d8c8d3c71bf713c7d5948c6 100644 (file)
@@ -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) {
index f9f29e310d9c0f0e85d04c02433a7b3e90060a18..7249ad04abe2e5557f86fdcf95c6c03a2260ad7b 100644 (file)
@@ -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);