Skip to content

Commit

Permalink
crypto: Read OpenSSL config before init
Browse files Browse the repository at this point in the history
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: #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>
  • Loading branch information
stefanmb authored and jasnell committed Apr 26, 2016
1 parent 92a02d5 commit 56b9478
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 56b9478

Please sign in to comment.