From: Jelle van der Waa Date: Thu, 15 May 2025 08:58:52 +0000 (+0200) Subject: tpm2-util: rename tpm2_unseal arguments X-Git-Tag: v258-rc1~593^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f75e5efa193f0bf4b552ecc30c50ef28ad4f92a;p=thirdparty%2Fsystemd.git tpm2-util: rename tpm2_unseal arguments To make it consistent with its implementation. --- diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h index 08c6bd45dd6..c9b0c43ae5a 100644 --- a/src/shared/tpm2-util.h +++ b/src/shared/tpm2-util.h @@ -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); diff --git a/src/test/test-tpm2.c b/src/test/test-tpm2.c index e42fcfe8170..529b33ec1fb 100644 --- a/src/test/test-tpm2.c +++ b/src/test/test-tpm2.c @@ -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);