aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2011-02-11 14:21:01 +0000
committerDr. Stephen Henson <steve@openssl.org>2011-02-11 14:21:01 +0000
commita1a5885b6400cbc7475934771e2626caa161c24e (patch)
treed6c4487da849855b4f0170d76ac37e1da34c9011 /crypto/dsa
parentf84a8ea5261c0eb9ac038d612562062002b3c277 (diff)
downloadopenssl-a1a5885b6400cbc7475934771e2626caa161c24e.tar.gz
Free keys if DSA pairwise error.
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_key.c6
1 files changed, 5 insertions, 1 deletions
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: