Skip to content

crypto: Read OpenSSL config before init

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

crypto

Description of change

The OpenSSL configuration file allows a directive for a custom crypto engine to be used, but such a directive will not be respected if the config file is loaded after initializing all crypto subsystems.

This PR reads the configuration file first, and is meant to directly address the issues raised by @Burmisov and @fast0490f in https://github.com/nodejs/node/issues/5101.

The previous PR (https://github.com/nodejs/node/pull/5739) proposed to address the same problem introduces new runtime argument which is not strictly necessary and thus has a higher impact.

In this PR I've opted, after discussion, to propose the minimal possible change to resolve the issue reported with the GOST engine support. For more information, please see https://github.com/nodejs/node/pull/5739#issuecomment-213162214.

Merge request reports

Loading