systemd/0518-tpm2-replace-magic-number.patch
Jan Macku e5f65c3fc6 systemd-252-27
Resolves: RHEL-1086,RHEL-11591,RHEL-16182,RHEL-19483,RHEL-7026
2024-02-15 09:36:23 +01:00

26 lines
1018 B
Diff

From ee0427588b7052bee4c9fbb42eded8187466f7d1 Mon Sep 17 00:00:00 2001
From: Dan Streetman <ddstreet@ieee.org>
Date: Fri, 9 Dec 2022 15:05:49 -0500
Subject: [PATCH] tpm2: replace magic number
(cherry picked from commit 1200777b21936bf5647a90504e0ea27e3ec3e42b)
Related: RHEL-16182
---
src/shared/tpm2-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
index ab88b94f1f..002e2c01da 100644
--- a/src/shared/tpm2-util.c
+++ b/src/shared/tpm2-util.c
@@ -2097,7 +2097,7 @@ int tpm2_seal(const char *device,
.nameAlg = TPM2_ALG_SHA256,
.objectAttributes = TPMA_OBJECT_FIXEDTPM | TPMA_OBJECT_FIXEDPARENT,
.parameters.keyedHashDetail.scheme.scheme = TPM2_ALG_NULL,
- .unique.keyedHash.size = 32,
+ .unique.keyedHash.size = SHA256_DIGEST_SIZE,
.authPolicy = *policy_digest,
},
};