Browse Source

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 <fedor.indutny@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
v6.x
Stefan Budeanu 9 years ago
committed by James M Snell
parent
commit
d6237aa7c6
  1. 2
      src/node_crypto.cc

2
src/node_crypto.cc

@ -5696,10 +5696,10 @@ void ExportChallenge(const FunctionCallbackInfo<Value>& 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);

Loading…
Cancel
Save