Reputation: 601
Is there a possibility to make Node.js to use my own compiled, local OpenSSL version? Can I set that with environment variables or some other way?
I have to use an older Node.js Version, but an own compiled OpenSSL version.
node -pe process.versions
tells me, Node.js is using the older OpenSSL lib.
Upvotes: 1
Views: 2213
Reputation: 102205
Is there a possibility to make Node.js to use my own compiled, local OpenSSL version?
Yes.
On Linux, use LD_LIBRARY_PATH
. On OS X use, DYLD_LIBRARY_PATH
.
Be sure to choose a new OpenSSL that is binary compatible with whatever Node.js is linked against. For example, OpenSSL 0.9.7 and 0.9.8 are binary compatible, but not compatible with others like 1.0.0, 1.0.1, 1.0.2 or 1.1.0. And OpenSSL 1.0.0, 1.0.1 and 1.0.2 are binary compatible.
Or, build Node.js from sources and statically link to the OpenSSL version you choose. It will avoid the LD preload tricks. (I'm side stepping -rpath
since it does not work on OS X).
Upvotes: 1