summaryrefslogtreecommitdiff
path: root/board/cr50/tpm2/endorsement.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/tpm2/endorsement.c')
-rw-r--r--board/cr50/tpm2/endorsement.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/board/cr50/tpm2/endorsement.c b/board/cr50/tpm2/endorsement.c
index 49f542f782..f929f1c405 100644
--- a/board/cr50/tpm2/endorsement.c
+++ b/board/cr50/tpm2/endorsement.c
@@ -594,9 +594,9 @@ enum manufacturing_status tpm_endorse(void)
HMAC_SHA256_update(&hmac, "RSA", 4);
HMAC_SHA256_hw_init(&hmac, HMAC_SHA256_hw_final(&hmac), 32);
HMAC_SHA256_update(&hmac, p, RO_CERTS_REGION_SIZE - 32);
- if (!DCRYPTO_equals(p + RO_CERTS_REGION_SIZE - 32,
- HMAC_SHA256_hw_final(&hmac), 32)) {
-
+ if (DCRYPTO_equals(p + RO_CERTS_REGION_SIZE - 32,
+ HMAC_SHA256_hw_final(&hmac),
+ 32) != DCRYPTO_OK) {
CPRINTF("%s: bad cert region hmac;", __func__);
#ifdef CR50_INCLUDE_FALLBACK_CERT
/* HMAC verification failure indicates either