This commit was manufactured by cvs2svn to create branch
[openssl.git] / crypto / dh / dh_key.c
index cb5abdcf47c4a18fd1d15d7d08d7c0f3801617f6..e7db440342fad71b8c0bdc23b4fbfa5e46d8549b 100644 (file)
@@ -150,7 +150,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 +173,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 +203,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;