From 46548da8edbfd155abffb6c2cdac042762794c39 Mon Sep 17 00:00:00 2001 From: Stefan Berger Date: Wed, 11 Sep 2024 16:14:49 -0400 Subject: [PATCH] tpm2: Add missing break statement Add a missing break statement that was forgotten in recent commit b389781f49e43. Signed-off-by: Stefan Berger --- src/tpm2/CryptUtil.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tpm2/CryptUtil.c b/src/tpm2/CryptUtil.c index 5fe51b7eb..1ac2e9451 100644 --- a/src/tpm2/CryptUtil.c +++ b/src/tpm2/CryptUtil.c @@ -1540,15 +1540,16 @@ CryptSign(OBJECT* signKey, // IN: signing key case TPM_ALG_RSA: case TPM_ALG_ECC: if (signScheme->details.any.hashAlg == TPM_ALG_SHA1 && - RuntimeProfileRequiresAttributeFlags(&g_RuntimeProfile, + RuntimeProfileRequiresAttributeFlags(&g_RuntimeProfile, RUNTIME_ATTRIBUTE_NO_SHA1_SIGNING)) return TPM_RC_HASH; + break; case TPM_ALG_KEYEDHASH: if (signScheme->details.any.hashAlg == TPM_ALG_SHA1 && - RuntimeProfileRequiresAttributeFlags(&g_RuntimeProfile, + RuntimeProfileRequiresAttributeFlags(&g_RuntimeProfile, RUNTIME_ATTRIBUTE_NO_SHA1_HMAC_CREATION)) return TPM_RC_HASH; - break; + break; } // libtpms added end // perform sign operation based on different key type