Free keys if DSA pairwise error.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 11 Feb 2011 14:21:01 +0000 (14:21 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 11 Feb 2011 14:21:01 +0000 (14:21 +0000)
crypto/dsa/dsa_key.c

index a90b3c460b7a9a250f2c18c2385e08393d8685f7..acc34a586513473aa847503c8497edad40f81ef0 100644 (file)
@@ -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: