Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Build against system OpenSSL on macOS #248

Closed
tie opened this issue Feb 21, 2019 · 3 comments
Closed

Build against system OpenSSL on macOS #248

tie opened this issue Feb 21, 2019 · 3 comments

Comments

@tie
Copy link

tie commented Feb 21, 2019

See deltachat/deltachat-desktop#659, deltachat/deltachat-desktop#660.

Any reason why deltachat-node does not use system OpenSSL library except it's considered outdated? I've monkey-patched[1] the application and it works fine with /usr/lib/libssl.dylib (libssl.0.9.8.dylib from macOS Mojave).

Asking the user to manually install or build the dependency is not a solution. While bundling OK, I can't see any movement in that direction and it could be hard to maintain security updates in a long term. On the other hand, I doubt Apple will drop support for OpenSSL or introduce breaking changes in the near future — but they still release security updates.

That said, if Delta Chat does not depend on any of the OpenSSL APIs not provided by the latest macOS release (due to the outdated library version), I'd rather define the minimum supported OS release and build against it. And looks like changing a few lines in .travis.yml and scripts/travis-before-install should build node bindings against system version of OpenSSL.

[1]: Replaced /usr/local/opt/openssl/lib/libssl.1.0.0.dylib with /////////////////////////usr/lib/libssl.dylib in Resoureces/app.asar.

@Jikstra
Copy link
Collaborator

Jikstra commented Feb 24, 2019

Not sure if we tried that, i think it caused problems because it was too old. @hpk42 @dignifiedquire do you still remember?

@tie
Copy link
Author

tie commented Feb 24, 2019

Oh, and I just found out that macOS actually uses LibreSSL.

# openssl version
LibreSSL 2.6.5

Which is fine too, but it's deprecated1 and no headers are provided2.

Then there are no other options but to bundle crypto library as part of deltachat/deltachat-desktop.

Sorry for the trouble, closing this issue.

@tie tie closed this as completed Feb 24, 2019
@tie
Copy link
Author

tie commented Feb 24, 2019

Note that macOS maintains compatibility with programs built against OpenSSL headers (i.e. from an older SDK or source). That's why my app.asar hack1 works.

As a temporary workaround Delta Chat can be built using headers from source but linked against system library.

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

No branches or pull requests

2 participants