Merge public key FIPS code, RSA, DSA, DH.
[oweals/openssl.git] / crypto / dsa / dsa_key.c
index 5ba885e1e24ef3cc25c2700928279f38192bafe0..5e3912423014caf37ed9912f1c55886920bd8ca5 100644 (file)
@@ -64,6 +64,8 @@
 #include <openssl/dsa.h>
 #include <openssl/rand.h>
 
+#ifndef OPENSSL_FIPS
+
 static int dsa_builtin_keygen(DSA *dsa);
 
 int DSA_generate_key(DSA *dsa)
@@ -105,8 +107,9 @@ static int dsa_builtin_keygen(DSA *dsa)
 
                if ((dsa->flags & DSA_FLAG_NO_EXP_CONSTTIME) == 0)
                        {
+                       BN_init(&local_prk);
                        prk = &local_prk;
-                       BN_with_flags(prk, priv_key, BN_FLG_EXP_CONSTTIME);
+                       BN_with_flags(prk, priv_key, BN_FLG_CONSTTIME);
                        }
                else
                        prk = priv_key;
@@ -125,3 +128,5 @@ err:
        return(ok);
        }
 #endif
+
+#endif