Support dynamically linking with OpenSSL 3.0
This PR enables node to dynamically link against OpenSSL 3.0.
The motivation for opening this PR even though OpenSSL 3.0 has not been released yet is to
allow a nightly CI job to be created. This will allow us stay on top of changes required for
OpenSSL 3.0, and also to make sure that changes to node crypto do not cause issues when
linking to OpenSSL 3.0.
While most changes have been in tests, there have been updates to src/crypto as well.
Refs: https://github.com/nodejs/node/issues/29817
Steps to build and link
During development we have been building OpenSSL upstream and linking against that and used the following commands.
Configure and build OpenSSL
We specify an prefix
where this build will be installed into. This path will later be used when configuring Node's build:
$ ./config -Werror --strict-warnings --debug --prefix=/path/openssl_build_master linux-x86_64
$ make -j8 install_sw
Configure and build Node.js
The following will configure Node to link against OpenSSl 3.0 that was configured and built in the previous step.
$ ./configure --shared-openssl --shared-openssl-libpath=/path/openssl_build_master/lib --shared-openssl-includes=/path/openssl_build_master/include --shared-openssl-libname=crypto,ssl
$ make -j8 test