summaryrefslogtreecommitdiff
path: root/board/cr50/dcrypto/p256_ec.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/cr50/dcrypto/p256_ec.c')
-rw-r--r--board/cr50/dcrypto/p256_ec.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/board/cr50/dcrypto/p256_ec.c b/board/cr50/dcrypto/p256_ec.c
index ac39813abb..6fae0cb52c 100644
--- a/board/cr50/dcrypto/p256_ec.c
+++ b/board/cr50/dcrypto/p256_ec.c
@@ -117,10 +117,18 @@ enum dcrypto_result dcrypto_p256_key_pwct(struct drbg_ctx *drbg,
#endif
result = dcrypto_p256_fips_sign_internal(drbg, d, &message, &r, &s);
- if (result != DCRYPTO_OK)
+ if (result != DCRYPTO_OK) {
+ fips_set_status(FIPS_FATAL_ECDSA_PWCT);
return result;
+ }
+
+ result = dcrypto_p256_ecdsa_verify(x, y, &message, &r, &s);
+ if (result != DCRYPTO_OK) {
+ fips_set_status(FIPS_FATAL_ECDSA_PWCT);
+ return result;
+ }
- return dcrypto_p256_ecdsa_verify(x, y, &message, &r, &s);
+ return result;
}
/**