build: fix HAVE_OPENSSL macro for cctest
I found this bug while writing tests for nodejs/node#14901, because Environment::handle_wrap_queue()
, Environment::req_wrap_queue()
and Environment::context()
weren't working as expected inside C++ tests.
cctest build target wasn't defining the HAVE_OPENSSL
macro when node_use_openssl
was true
, causing inconsistencies on most node::Environment
member's addresses (every member defined after AsyncHooks async_hooks_
). For example, if someone wanted to access the context of an environment by using Environment::context()
, the object returned by the function was pointing to an invalid address, causing a segmentation fault.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
build