-
Notifications
You must be signed in to change notification settings - Fork 135
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
Usage in Electron #161
Comments
Same problem here. @aleclarson, have you found a solution? |
@dsagal Nope 😢 |
It does not seem like @zcbenz's "wontfix" comment in #1410 still applies today. Is there any reason not to include |
@aleclarson and anyone else struggling with this. Until we hear back from electron folks, you can build like so:
The disturl is a bundle I build from electron which includes openssl. I only built it for version 1.7.11 (but it's easy to build for any version). In addition, here's a fork of ursa https://github.com/gristlabs/ursa which allows different versions of the native module to exist side-by-side (so that you can build for node and for electron, and run either one). Depending on feedback here, I'll decide whether it's worth asking to incorporate it upstream. |
hi @dsagal, could you provide a quick howto for building a version of electron with openssl headers for current electron versoin (@2.0.9) not really sure how to do so. Thx ! |
What I used for 1.7.11 release is here: https://github.com/dsagal/electron/tree/openssl-fix (see my commits on that branch). Just tried to apply it to the 2.0.x branch -- a few things changed so it's not very quick. Will need to dig a bit deeper when I have time. |
Well, I could help if I could build the current electron version, but I can't seem to do THAT, and don't have time to dig into that. Now, if you can build electron @2.0.9, then try this branch https://github.com/dsagal/electron/tree/openssl-fix-2.0.x (it's a one-line change to |
FYI I pushed headers with openssl for electron versions 2.0.9 and 3.0.7, available with
On electron branches 2x and 3x, I can add more versions easily, or you can make your own repo using the fork/branch at https://github.com/dsagal/electron/tree/openssl-fix3, script |
Node now has native support for generating RSA and ECDSA keypairs as of v10.12 (and technically it had support for ECDSA much sooner, but it was disguised under ECDH). Could you use the node native support and something lightweight like Rasha.js or Eckles.js to import / export JWK, PEM, and SSH keys? Or do you need specifically need I feel like crypto has been really challenging in JavaScript for a long time, but I'm hopeful that with native key generation and signing both and node and in the browser, we won't have to worry as much with the compiled and heavyweight libs much longer (hence I'm actively building libs like the aforementioned to solve this). |
This is a really useful comment for this thread. Yes, the new crypto methods (like |
It seems that Electron doesn't support OpenSSL due to a conflict with Chromium's BoringSSL. electron/electron#1410 (comment)
Also evident by the error thrown when trying to use
node-gyp
:ursa
with Electron?ursa
uses?Thanks!
edit: Maybe this could help: https://github.com/nodejs/node-gyp/wiki/Linking-to-OpenSSL
edit2: Also found this, but might be too much effort?
The text was updated successfully, but these errors were encountered: