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.
systemd/SOURCES/0590-tpm2-split-TPM2_PCR_VA...

32 lines
1.3 KiB

From e2358ec64ed4d204a5c62617da494d5928a0dbc9 Mon Sep 17 00:00:00 2001
From: Dan Streetman <ddstreet@ieee.org>
Date: Mon, 21 Aug 2023 17:42:39 -0400
Subject: [PATCH] tpm2: split TPM2_PCR_VALUE_MAKE() over multiple lines
(cherry picked from commit c6e5178220237fb10187c573a8ac4384993c0206)
Related: RHEL-16182
---
src/shared/tpm2-util.h | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/shared/tpm2-util.h b/src/shared/tpm2-util.h
index ff90f034fe..6c836180c6 100644
--- a/src/shared/tpm2-util.h
+++ b/src/shared/tpm2-util.h
@@ -75,7 +75,13 @@ typedef struct {
TPM2B_DIGEST value;
} Tpm2PCRValue;
-#define TPM2_PCR_VALUE_MAKE(i, h, v) (Tpm2PCRValue) { .index = (i), .hash = (h), .value = ((TPM2B_DIGEST) v), }
+#define TPM2_PCR_VALUE_MAKE(i, h, v) \
+ (Tpm2PCRValue) { \
+ .index = (i), \
+ .hash = (h), \
+ .value = ((TPM2B_DIGEST) v), \
+ }
+
bool tpm2_pcr_value_valid(const Tpm2PCRValue *pcr_value);
int tpm2_pcr_value_from_string(const char *arg, Tpm2PCRValue *ret_pcr_value);
char *tpm2_pcr_value_to_string(const Tpm2PCRValue *pcr_value);