diff --git a/src/common/crypto.c b/src/common/crypto.c index a07cc96575..647d634fa7 100644 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@ -105,6 +105,9 @@ static tor_mutex_t **_openssl_mutexes = NULL; static int _n_openssl_mutexes = 0; #endif +/** True if we use dynamic primes. */ +static int use_dynamic_primes = 0; + /** A public key, or a public/private key-pair. */ struct crypto_pk_env_t { @@ -1817,8 +1820,6 @@ static BIGNUM *dh_param_p = NULL; static BIGNUM *dh_param_p_tls = NULL; /** Shared G parameter for our DH key exchanges. */ static BIGNUM *dh_param_g = NULL; -/** True if we use dynamic primes. */ -static int use_dynamic_primes = 0; /** Generate and return a reasonable and safe DH parameter p. */ static BIGNUM * @@ -1869,7 +1870,7 @@ init_dh_param(void) tor_assert(g); /* Set our generator for all DH parameters */ - r = BN_set_word(g, generator); + r = BN_set_word(g, DH_GENERATOR); tor_assert(r); /* This implements the prime number strategy outlined in prop 179 */