Commit e9e851f4 authored by Daniel Bevenius's avatar Daniel Bevenius
Browse files

src: set CONF_MFLAGS_DEFAULT_SECTION for OpenSSL 3

This commit adds a call to OPENSSL_init_crypto to initialize
OPENSSL_INIT_LOAD_CONFIG to avoid the default behavior where errors
raised during the parsing of the OpenSSL configuration file are not
propagated and cannot be detected.

The motivation for this is that if FIPS is configured the OpenSSL
configuration file will have an .include pointing to the fipsmodule.cnf
file generated by the openssl fipsinstall command. If the path to this
file is incorrect no error will be reported. For Node.js this will mean
that EntropySource will be called by V8 as part of its initalization
process, and EntropySource will in turn call CheckEntropy. CheckEntropy
will call RAND_status which will now always return 0 leading to an
endless loop and the node process will appear to hang/freeze.

I'll continue investigating the cause of this and see if this is
expected behavior or not, but in the mean time it would be good to be
able to workaround this issue with this commit.

PR-URL: https://github.com/nodejs/node/pull/38732


Reviewed-By: default avatarRichard Lau <rlau@redhat.com>
Reviewed-By: default avatarMinwoo Jung <nodecorelab@gmail.com>
Refs: https://github.com/nodejs/node/pull/38633#pullrequestreview-658811317
parent dc43066e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment