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>
This commit is contained in:
parent
92a02d51dc
commit
56b9478f53
@ -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…
x
Reference in New Issue
Block a user