You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLSv1_2_client_method and TLSv1_2_server_method are not exported.
there is TLS_client_method() and TLS_server_method(); but then node versions previous to 10 don't export that, but instead export the previous methods.
As a workaround - going to investigate a node version definition to #ifdef the code.
They previously were available, so addons can link to and use the same version of OpenSSL as node.
Edit: very annoying to workaround; the code that links against most of OpenSSL doesn't itself know about node.h (node_version.h) and it's not an issue with OpenSSL itself; that and I no longer get to control 'only 1.2' instead of 'best available'
Edit2: Node-gyp doesn't seem to have/get the node version to pass to projects; I can get that with cmake-js but was trying to support both (for those that don't have cmake for some odd reason). So I can't even pass it a define when compiling to specify the NODE_MAJOR_VERSION.
@d3x0r I’m not sure but that might be caused by 2b85127. Can you revert that locally and try again? I don’t understand why it would fail for you but not in CI, but there’s a decent chance it’s causing that issue
@d3x0r Yes, might even be the case that that fixes the problem for you then. 😄 The patch completely changed the mechanism of the copy operation that’s failing there, so I just thought it would be related to that
Hello @d3x0r,
I'll see what I can do. If I can formulate a way to test this, and we figure out what is causing it, we will do our best to fix it, regardless of if the issue is open or closed.
// warning - casting from the definition in the header, to an int....
m:\tmp\node_test\test.c(4): warning C4311: 'type cast': pointer truncation from 'const SSL_METHOD *(__cdecl *)(void)' to 'int' [M:\tmp\node_test\build\test_tls_method.vcxproj]
// and then it fails to link.
test.obj : error LNK2001: unresolved external symbol TLSv1_2_server_method [M:\tmp\node_test\build\test_tls_method.vcxproj]
M:\tmp\node_test\build\Release\test_tls_method.node : fatal error LNK1120: 1 unresolved externals [M:\tmp\node_test\build\test_tls_method.vcxproj]
Activity
[-]Missing exports : TLSv1_2_client_methodm, TLSv1_2_server_method[/-][+]Missing exports : TLSv1_2_client_method, TLSv1_2_server_method[/+]addaleax commentedon Apr 27, 2018
Just for clarity: What you are saying is that these symbols are not available to addons on Windows when they should be?
d3x0r commentedon Apr 27, 2018
They previously were available, so addons can link to and use the same version of OpenSSL as node.
Edit: very annoying to workaround; the code that links against most of OpenSSL doesn't itself know about node.h (node_version.h) and it's not an issue with OpenSSL itself; that and I no longer get to control 'only 1.2' instead of 'best available'
Edit2: Node-gyp doesn't seem to have/get the node version to pass to projects; I can get that with cmake-js but was trying to support both (for those that don't have cmake for some odd reason). So I can't even pass it a define when compiling to specify the NODE_MAJOR_VERSION.
bnoordhuis commentedon Apr 28, 2018
Should be easy to fix. @d3x0r Does this patch work for you?
bnoordhuis commentedon Apr 30, 2018
@d3x0r Any luck with that patch?
d3x0r commentedon Apr 30, 2018
Applied to version tagged 10.0.0
And ... I dunno; it's not building.
even cleaned everything from old builds so it would build clean... but no joy; I don't know.
if you can get a node 10.0.0 to build; the node.lib should contain
TLSv1_2_server_methodTLSv1_2_client_methodshould be able to be found in clear text
addaleax commentedon Apr 30, 2018
@d3x0r I’m not sure but that might be caused by 2b85127. Can you revert that locally and try again? I don’t understand why it would fail for you but not in CI, but there’s a decent chance it’s causing that issue
d3x0r commentedon Apr 30, 2018
committed 5 days ago (I think that is after the tag I have?) Commits on Apr 27, 2018
That's after V10.0.0 tag.
SHA-1: cf41627
I guess it's not that long ago; I can just build against head...
addaleax commentedon Apr 30, 2018
@d3x0r Yes, might even be the case that that fixes the problem for you then. 😄 The patch completely changed the mechanism of the copy operation that’s failing there, so I just thought it would be related to that
d3x0r commentedon Apr 30, 2018
Yes that change restores the two missing methods that I know of :) (clicked wrong button close and commented)
18 remaining items
refack commentedon Nov 12, 2018
Hello @d3x0r,
I'll see what I can do. If I can formulate a way to test this, and we figure out what is causing it, we will do our best to fix it, regardless of if the issue is open or closed.
d3x0r commentedon Nov 12, 2018
node-gyp configure buildbinding.gyp
test.c
Could make it a gist instead....
d3x0r commentedon Nov 12, 2018
#20369 (comment)
this worked before...
refack commentedon Nov 12, 2018
Thanks! This will surely help. I hope to get to it tomorrow.
refack commentedon Nov 13, 2018
So the problem is that the
TLSv1_2_*were deprecated in openSSL_1_1:node/deps/openssl/openssl/util/libssl.num
Line 157 in 49b0f7f
PR - #24329
richardlau commentedon Feb 7, 2019
Opened #25991.
build: export deprecated OpenSSL symbols on Windows
build: export deprecated OpenSSL symbols on Windows
build: export deprecated OpenSSL symbols on Windows
richardlau commentedon Feb 14, 2019
Fixed by fcaeb1f.
Released in Node.js 11.10.0 (d5d163d8b9).