From a1a5885b6400cbc7475934771e2626caa161c24e Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 11 Feb 2011 14:21:01 +0000 Subject: [PATCH] Free keys if DSA pairwise error. --- crypto/dsa/dsa_key.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypto/dsa/dsa_key.c b/crypto/dsa/dsa_key.c index a90b3c460b..acc34a5865 100644 --- a/crypto/dsa/dsa_key.c +++ b/crypto/dsa/dsa_key.c @@ -162,8 +162,12 @@ static int dsa_builtin_keygen(DSA *dsa) if (fips_dsa_pairwise_fail) BN_add_word(dsa->pub_key, 1); if(!fips_check_dsa(dsa)) + { + dsa->pub_key = NULL; + dsa->priv_key = NULL; + goto err; + } #endif - goto err; ok=1; err: -- 2.25.1