-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Under Windows, node-gyp provides headers but not linkable libraries for OpenSSL #874
Comments
You should file that over at https://github.com/nodejs/node/issues. It's possible an issue already exists. The .lib files are created by the node.js release team, node-gyp only downloads them. FWIW, on UNIX, the node binary reexports the symbols from OpenSSL. I don't know how it's configured on Windows. |
Thanks for the pointer. I am definitely sure that node-gyp gives link failures if I attempt to use OpenSSL symbols on Windows, and that the downloaded node.lib file does not have any OpenSSL symbols. Plus, your own wiki's instructions imply that this is the case. |
Whoops, sorry, didn't see that your link to the wiki page that you already found. |
OK, I opened an issue at nodejs/node#4932 |
I am trying to statically link the openSSL like the wiki but on electron (Can't use bundle because electron changes openSSL to borinSSL and also I am on windows).It seems the user still needs some openSSL dlls, shouldn't the static library provide anything he needs ? |
@drFabio you're going to have to manage this yourself unfortunately. Download OpenSSL, put it in a predictable location and link to it. There are basic headers in the headers tarball but you don't get anything beyond that from Node. |
Yeah I did that using a fixed location and adding the '-l<(openssl_root)/lib/libeay32.lib', it compiles but on machines without openssl it launches a dlopen error. |
Well @rvagg I need to add the libeay32.dll alongside the electron executable for some reason for this to work. Just linking did not worked. don't know why |
@drFabio As of node.js v6.3.0, node exports the openssl symbols on Windows. Perhaps you can lobby Electron to pick up the relevant commit, nodejs/node@15a32dd? |
Electron changes the openSSL to borinSSL because of chromium so any openSSL addon needs to be done as if openSSL is not acessible (because it is not). I think I will just pack the dll alongside it |
I'm aware it uses BoringSSL but my thinking was that the script that is used to generate the symbols for OpenSSL can be reused. I see that the *.num files that are used as inputs have been removed in BoringSSL master though, so that is not going to work long-term. |
Yeah, they advised against using or trusting anything OpenSSL to be available at the near future. I will just ship the dll on windows, the static linking on linux seems to be working though. Thanks for your time |
This prevents users from using any OpenSSL library whose version does not match the provided headers, and it prevents library authors from shipping alternatives to OpenSSL.
In general, a library should not provide headers for symbols that its linkable libraries do not expose.
The text was updated successfully, but these errors were encountered: