f287 harden wc_DhImportKeyPair

This commit is contained in:
Eric Blankenhorn
2026-03-05 15:44:12 -06:00
parent 296493acf0
commit 203cce48ef
+1 -1
View File
@@ -2404,7 +2404,7 @@ int wc_DhImportKeyPair(DhKey* key, const byte* priv, word32 privSz,
}
if (havePriv) {
if (mp_read_unsigned_bin(&key->priv, priv, privSz) != MP_OKAY) {
mp_clear(&key->priv);
mp_forcezero(&key->priv);
havePriv = 0;
} else {
WOLFSSL_MSG("DH Private Key Set");