Skip to content

Commit d6237aa

Browse files
stefanmbjasnell
authored andcommitted
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: #6374 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent af8dd44 commit d6237aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_crypto.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5696,10 +5696,10 @@ void ExportChallenge(const FunctionCallbackInfo<Value>& args) {
56965696

56975697

56985698
void InitCryptoOnce() {
5699+
OPENSSL_config(NULL);
56995700
SSL_library_init();
57005701
OpenSSL_add_all_algorithms();
57015702
SSL_load_error_strings();
5702-
OPENSSL_config(NULL);
57035703

57045704
crypto_lock_init();
57055705
CRYPTO_set_locking_callback(crypto_lock_cb);

0 commit comments

Comments
 (0)