Skip to content
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

OpenSSL export missing in Node 11.9.0 on Windows #25981

Closed
davedoesdev opened this issue Feb 7, 2019 · 4 comments
Closed

OpenSSL export missing in Node 11.9.0 on Windows #25981

davedoesdev opened this issue Feb 7, 2019 · 4 comments
Labels
build Issues and PRs related to build files or the CI. openssl Issues and PRs related to the OpenSSL dependency. windows Issues and PRs related to the Windows platform.

Comments

@davedoesdev
Copy link
Contributor

davedoesdev commented Feb 7, 2019

  • Version: v11.9.0
  • Platform: Windows 10 32-bit
  • Subsystem: OpenSSL (native addon)

Basically EC_POINT_get_affine_coordinates_GFp isn't exported on Windows:

C:\Users\David>dumpbin /exports .node-gyp\10.15.1\ia32\node.lib | find "_EC_POINT_get_affine_coordinates_GFp"
                  _EC_POINT_get_affine_coordinates_GFp

C:\Users\David>dumpbin /exports .node-gyp\11.9.0\ia32\node.lib | find "_EC_POINT_get_affine_coordinates_GFp"

Manifests itself in a compile error when doing:

$ npm install node-webcrypto-ossl

> node-webcrypto-ossl@1.0.39 install C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl
> node-gyp rebuild


C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl>if not defined npm_config_node_gyp (node "C:\Users\Lucie\AppData\Roaming\nvm\v11.9.0\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Lucie\AppData\Roaming\nvm\v11.9.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  main.cpp
  key_exp.cpp
  scoped_ssl.cpp
  logger.cpp
  excep.cpp
  digest.cpp
  bn.cpp
  rsa_gen.cpp
  rsa_jwk.cpp
  rsa_pkcs1.cpp
  rsa_oaep.cpp
  rsa_pss.cpp
  ec_gen.cpp
  ec_dsa.cpp
  ec_dh.cpp
  ec_jwk.cpp
  aes_gen.cpp
  aes_ecb.cpp
  aes_cbc.cpp
  aes_gcm.cpp
  aes_ctr.cpp
  hmac_gen.cpp
  hmac_sign.cpp
  pbkdf2_derive.cpp
  common.cpp
..\src\node\common.cpp(5): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
  w_key.cpp
  w_aes.cpp
..\src\node\w_key.cpp(269): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(293): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(294): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(298): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(299): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(300): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(301): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(302): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(303): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(321): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(322): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(327): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(472): warning C4996: 'v8::Value::BooleanValue': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(2568): note: see declaration of 'v8::Value::BooleanValue'
..\src\node\w_key.cpp(560): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
..\src\node\w_key.cpp(584): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
  w_hmac.cpp
  w_pbkdf2.cpp
..\src\node\w_pbkdf2.cpp(71): warning C4996: 'v8::Value::Uint32Value': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(2571): note: see declaration of 'v8::Value::Uint32Value'
..\src\node\w_pbkdf2.cpp(74): warning C4996: 'v8::Value::Uint32Value': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(2571): note: see declaration of 'v8::Value::Uint32Value'
..\src\node\w_pbkdf2.cpp(89): warning C4996: 'v8::Value::ToObject': was declared deprecated [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
  c:\users\lucie\.node-gyp\11.9.0\include\node\v8.h(10254): note: see declaration of 'v8::Value::ToObject'
  w_core.cpp
  async_rsa.cpp
  async_ec.cpp
  async_aes.cpp
  async_hmac.cpp
  async_pbkdf2.cpp
  async_core.cpp
  win_delay_load_hook.cc
     Creating library C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\Release\nodessl.lib and object C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\Release\nodessl.exp
ec_jwk.obj : error LNK2001: unresolved external symbol _EC_POINT_get_affine_coordinates_GFp [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\Release\nodessl.node : fatal error LNK1120: 1 unresolved externals [C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl\build\nodessl.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Lucie\AppData\Roaming\nvm\v11.9.0\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:197:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Lucie\\AppData\\Roaming\\nvm\\v11.9.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Lucie\wup\node_modules\node-webcrypto-ossl
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\Lucie\wup\package.json'
npm WARN wup No description
npm WARN wup No repository field.
npm WARN wup No README data
npm WARN wup No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-webcrypto-ossl@1.0.39 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-webcrypto-ossl@1.0.39 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Lucie\AppData\Roaming\npm-cache\_logs\2019-02-07T09_03_01_375Z-debug.log
@davedoesdev
Copy link
Contributor Author

davedoesdev commented Feb 7, 2019

Note that EC_POINT_get_affine_coordinates_GFp is resolved on Linux and Windows OpenSSL 1.1.1a binary from here does export EC_POINT_get_affine_coordinates_GFp.

@richardlau
Copy link
Member

EC_POINT_get_affine_coordinates_GFp is marked DEPRECATEDIN_1_2_0:

DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,

EC_POINT_get_affine_coordinates_GFp 266 1_1_0 EXIST::FUNCTION:DEPRECATEDIN_1_2_0,EC

so I think we need some variant of #24329 (which looks like it was closed without landing).

@richardlau richardlau added windows Issues and PRs related to the Windows platform. build Issues and PRs related to build files or the CI. openssl Issues and PRs related to the OpenSSL dependency. labels Feb 7, 2019
@richardlau
Copy link
Member

Opened #25991.

richardlau added a commit to richardlau/node-1 that referenced this issue Feb 7, 2019
Methods such as `TLSv1_server_method` are categorized as
`DEPRECATEDIN_1_1_0`. Add the deprecated categories to
the list of categories to include passed to `mkssldef.py`.

Adds a regression test to `test/addons/openssl-binding`.

Refs: nodejs#20369
Refs: nodejs#25981
danbev pushed a commit that referenced this issue Feb 11, 2019
Methods such as `TLSv1_server_method` are categorized as
`DEPRECATEDIN_1_1_0`. Add the deprecated categories to
the list of categories to include passed to `mkssldef.py`.

Adds a regression test to `test/addons/openssl-binding`.

PR-URL: #25991
Refs: #20369
Refs: #25981
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
targos pushed a commit that referenced this issue Feb 11, 2019
Methods such as `TLSv1_server_method` are categorized as
`DEPRECATEDIN_1_1_0`. Add the deprecated categories to
the list of categories to include passed to `mkssldef.py`.

Adds a regression test to `test/addons/openssl-binding`.

PR-URL: #25991
Refs: #20369
Refs: #25981
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@richardlau
Copy link
Member

Fixed by fcaeb1f.

Released in Node.js 11.10.0 (d5d163d8b9).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. openssl Issues and PRs related to the OpenSSL dependency. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

2 participants