You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.3 KiB
26 lines
1.3 KiB
From 70ab69fd242a719fb3ce0e8d5fdeb18025ab6f96 Mon Sep 17 00:00:00 2001
|
|
From: Dan Streetman <ddstreet@ieee.org>
|
|
Date: Mon, 21 Aug 2023 19:21:21 -0400
|
|
Subject: [PATCH] tpm2: wrap (7) in UINT32_C()
|
|
|
|
(cherry picked from commit 81e3d37211362a4a0549f57abb56ba030337a135)
|
|
|
|
Related: RHEL-16182
|
|
---
|
|
src/shared/tpm2-util.h | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h
|
|
index f74efbd223..f9efca9311 100644
|
|
--- a/src/shared/tpm2-util.h
|
|
+++ b/src/shared/tpm2-util.h
|
|
@@ -249,7 +249,7 @@ int tpm2_make_luks2_json(int keyslot, uint32_t hash_pcr_mask, uint16_t pcr_bank,
|
|
int tpm2_parse_luks2_json(JsonVariant *v, int *ret_keyslot, uint32_t *ret_hash_pcr_mask, uint16_t *ret_pcr_bank, void **ret_pubkey, size_t *ret_pubkey_size, uint32_t *ret_pubkey_pcr_mask, uint16_t *ret_primary_alg, void **ret_blob, size_t *ret_blob_size, void **ret_policy_hash, size_t *ret_policy_hash_size, void **ret_salt, size_t *ret_salt_size, void **ret_srk_buf, size_t *ret_srk_buf_size, TPM2Flags *ret_flags);
|
|
|
|
/* Default to PCR 7 only */
|
|
-#define TPM2_PCR_INDEX_DEFAULT (7)
|
|
+#define TPM2_PCR_INDEX_DEFAULT UINT32_C(7)
|
|
#define TPM2_PCR_MASK_DEFAULT INDEX_TO_MASK(uint32_t, TPM2_PCR_INDEX_DEFAULT)
|
|
|
|
/* We want the helpers below to work also if TPM2 libs are not available, hence define these four defines if
|