]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tpm2-util: rename tpm2_unseal arguments
authorJelle van der Waa <jvanderwaa@redhat.com>
Thu, 15 May 2025 08:58:52 +0000 (10:58 +0200)
committerJelle van der Waa <jvanderwaa@redhat.com>
Thu, 15 May 2025 09:12:28 +0000 (11:12 +0200)
To make it consistent with its implementation.

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

index 08c6bd45dd6d3ffe65f923cb5ac59634f48c9e16..c9b0c43ae5a9dd0debc0831456b62598fb2f3ad8 100644 (file)
@@ -289,7 +289,7 @@ int tpm2_get_srk(Tpm2Context *c, const Tpm2Handle *session, TPM2B_PUBLIC **ret_p
 int tpm2_get_or_create_srk(Tpm2Context *c, const Tpm2Handle *session, TPM2B_PUBLIC **ret_public, TPM2B_NAME **ret_name, TPM2B_NAME **ret_qname, Tpm2Handle **ret_handle);
 
 int tpm2_seal(Tpm2Context *c, uint32_t seal_key_handle, const TPM2B_DIGEST policy_hash[], size_t n_policy, const char *pin, struct iovec *ret_secret, struct iovec **ret_blobs, size_t *ret_n_blobs, uint16_t *ret_primary_alg, struct iovec *ret_srk);
-int tpm2_unseal(Tpm2Context *c, uint32_t hash_pcr_mask, uint16_t pcr_bank, const struct iovec *pubkey, uint32_t pubkey_pcr_mask, sd_json_variant *signature, const char *pin, const Tpm2PCRLockPolicy *pcrlock_policy, uint16_t primary_alg, const struct iovec blobs[], size_t n_blobs, const struct iovec policy_hash[], size_t n_policy_hash, const struct iovec *srk, struct iovec *ret_secret);
+int tpm2_unseal(Tpm2Context *c, uint32_t hash_pcr_mask, uint16_t pcr_bank, const struct iovec *pubkey, uint32_t pubkey_pcr_mask, sd_json_variant *signature, const char *pin, const Tpm2PCRLockPolicy *pcrlock_policy, uint16_t primary_alg, const struct iovec blobs[], size_t n_blobs, const struct iovec known_policy_hash[], size_t n_known_policy_hash, const struct iovec *srk, struct iovec *ret_secret);
 
 #if HAVE_OPENSSL
 int tpm2_tpm2b_public_to_openssl_pkey(const TPM2B_PUBLIC *public, EVP_PKEY **ret);
index e42fcfe8170859d111661e9c347d9eef8e655b86..529b33ec1fb5c6d5630d852c93c0d670cfe486e5 100644 (file)
@@ -1259,8 +1259,8 @@ static void check_seal_unseal_for_handle(Tpm2Context *c, TPM2_HANDLE handle) {
                         /* primary_alg= */ 0,
                         blobs,
                         n_blobs,
-                        /* policy_hash= */ NULL,
-                        /* n_policy_hash= */ 0,
+                        /* known_policy_hash= */ NULL,
+                        /* n_known_policy_hash= */ 0,
                         &srk,
                         &unsealed_secret) >= 0);