From 378bef369768bbaf121f5eb0705b85ad4b976814 Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Wed, 8 Mar 2023 18:18:48 +0100 Subject: [PATCH] wolfSSL: Use wc_ecc_forcezero_point() in non-FIPS builds Signed-off-by: Juliusz Sosinowicz --- src/crypto/crypto_wolfssl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 356a8abe5..dee462bef 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -1642,9 +1642,13 @@ void crypto_ec_point_deinit(struct crypto_ec_point *p, int clear) return; if (clear) { +#ifdef CONFIG_FIPS mp_forcezero(point->x); mp_forcezero(point->y); mp_forcezero(point->z); +#else /* CONFIG_FIPS */ + wc_ecc_forcezero_point(point); +#endif /* CONFIG_FIPS */ } wc_ecc_del_point(point); }