From d6237aa7c642e82b539803b6d2069eb4eddce6a6 Mon Sep 17 00:00:00 2001 From: Stefan Budeanu Date: Mon, 25 Apr 2016 11:14:35 -0400 Subject: [PATCH] crypto: Read OpenSSL config before init The OpenSSL configuration file allows custom crypto engines but those directives will not be respected if the config file is loaded after initializing all crypto subsystems. This patch reads the configuration file first. PR-URL: https://github.com/nodejs/node/pull/6374 Reviewed-By: Fedor Indutny Reviewed-By: Michael Dawson Reviewed-By: James M Snell --- src/node_crypto.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 1e9226c9256d24..a143576227b80f 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -5696,10 +5696,10 @@ void ExportChallenge(const FunctionCallbackInfo& args) { void InitCryptoOnce() { + OPENSSL_config(NULL); SSL_library_init(); OpenSSL_add_all_algorithms(); SSL_load_error_strings(); - OPENSSL_config(NULL); crypto_lock_init(); CRYPTO_set_locking_callback(crypto_lock_cb);