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 issue #7

Closed
LeonardLaszlo opened this issue May 5, 2017 · 8 comments
Closed

OpenSSL issue #7

LeonardLaszlo opened this issue May 5, 2017 · 8 comments

Comments

@LeonardLaszlo
Copy link
Owner

LeonardLaszlo commented May 5, 2017

There is a problem with the OpenSSL in ARMv7 builds.
When I run something like:

var request = require('request');

request('https://www.google.com', function (error, response, body) {
  console.log('error:', error); // Print the error if one occurred
  console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received
  console.log('body:', body); // Print the HTML for the Google homepage.
});

I get the following error:

error: Error: write EPROTO 2970357760:error:1006706B:elliptic curve routines:ec_GFp_simple_oct2point:point is not on curve:../../third_party/node/deps/openssl/openssl/crypto/ec/ecp_oct.c:417:
2970357760:error:1408D132:SSL routines:ssl3_get_key_exchange:bad ecpoint:../../third_party/node/deps/openssl/openssl/ssl/s3_clnt.c:1875:


    at exports._errnoException (util.js:1022:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:804:14)

@jtg-gg Any idea what is wrong?

@jtg-gg
Copy link
Collaborator

jtg-gg commented May 12, 2017

@LeonardLaszlo I am not sure, FYI this arm build was experimental, we are not using this yet in our daily build, so I can't help you to debug run time error :(

@LeonardLaszlo
Copy link
Owner Author

LeonardLaszlo commented May 13, 2017

Here I've found some additional information about the problem:

microsoft/openssl@68886be
https://trac.macports.org/ticket/38015?cversion=0&cnum_hist=10

EDIT:

I checked the problematic file https://github.com/nwjs/node/blob/nw23/deps/openssl/openssl/crypto/ec/ecp_oct.c

The invocation of EC_POINT_is_on_curve(group, point, ctx) <= 0 seems correct. However the OpenSSL library of the Node fork used for NW.JS seems not to be updated in the last 8 moths.

I suggest to update the version of Node / OpenSSL to the latest version.

@gizmopt
Copy link

gizmopt commented May 23, 2017

Hello @LeonardLaszlo I experiencing this problem too, I tried different versions and have always the same issue. I tried to use the version 22 but it gives-me an error like you reference on the issue #9

With this ported version https://github.com/jalbam/nwjs_rpi I don't have this problem but have others due to the old version its on it.

Any ideas? I really need to use nw with an Rpi3
Thank's.

@LeonardLaszlo
Copy link
Owner Author

Well we need some enthuziast developer, who is able to debug Chromium and it's dependencies. Unfortunately I cannot help with that...

@jtg-gg
Copy link
Collaborator

jtg-gg commented Jul 6, 2017

@LeonardLaszlo I've "fixed" the openssl issue, by disabling openssl assembly files
I am currently testing it on nw24 beta, will patch nw23 later, I'll update you once I am done

@LeonardLaszlo
Copy link
Owner Author

thank you!

@jtg-gg
Copy link
Collaborator

jtg-gg commented Jul 8, 2017

Apply these 3 patches on top of original nwjs/chromium.src repository
screen shot 2017-07-07 at 11 46 12 am

Apply these 3 patches on top of original nwjs/nw.js repository
screen shot 2017-07-07 at 11 47 54 am

if you curious, this is the actual node.js openssl patch that "fix" the https connection problem
jtg-gg/node-webkit@27537f1#diff-63fcc6b9d8ae5bba928e573d8340e3c3

@LeonardLaszlo
Copy link
Owner Author

Fixed with release: NW.js ARMv7 v0.24.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants