Fix strange formatting by indent
[oweals/openssl.git] / crypto / dh / dh_key.c
index cb5abdcf47c4a18fd1d15d7d08d7c0f3801617f6..79dd3318634108130ea9ff7991f91640d4a01b3e 100644 (file)
@@ -62,6 +62,8 @@
 #include <openssl/rand.h>
 #include <openssl/dh.h>
 
+#ifndef OPENSSL_FIPS
+
 static int generate_key(DH *dh);
 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
 static int dh_bn_mod_exp(const DH *dh, BIGNUM *r,
@@ -150,7 +152,7 @@ static int generate_key(DH *dh)
                        {
                        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;
@@ -173,7 +175,7 @@ err:
 
 static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
        {
-       BN_CTX *ctx;
+       BN_CTX *ctx=NULL;
        BN_MONT_CTX *mont=NULL;
        BIGNUM *tmp;
        int ret= -1;
@@ -203,7 +205,7 @@ static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
                if ((dh->flags & DH_FLAG_NO_EXP_CONSTTIME) == 0)
                        {
                        /* XXX */
-                       BN_set_flags(dh->priv_key, BN_FLG_EXP_CONSTTIME);
+                       BN_set_flags(dh->priv_key, BN_FLG_CONSTTIME);
                        }
                if (!mont)
                        goto err;
@@ -261,3 +263,5 @@ static int dh_finish(DH *dh)
                BN_MONT_CTX_free(dh->method_mont_p);
        return(1);
        }
+
+#endif