Skip to content

Commit

Permalink
tpm2: Add missing break statement
Browse files Browse the repository at this point in the history
Add a missing break statement that was forgotten in recent
commit b389781.

Signed-off-by: Stefan Berger <[email protected]>
  • Loading branch information
stefanberger committed Sep 11, 2024
1 parent c7baa7e commit 46548da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/tpm2/CryptUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46548da

Please sign in to comment.