From 4029815a0e1d6e4419a4e0ac8c8697f1edda09a0 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. --- 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);