LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.21k stars 876 forks source link

refactor: use rsa instead of openssl #4900

Closed dessalines closed 1 month ago

dessalines commented 3 months ago

Requirements

Is your proposal related to a problem?

Use the rsa crate instead of openssl, as this will make lemmy much more portable.

It also could potentially mean we could stop using these custom docker images (iirc bundling openssl was one of the main reasons they're necessary, and also possibly postres libs)

Describe the solution you'd like.

NA

Describe alternatives you've considered.

NA

Additional context

https://github.com/LemmyNet/activitypub-federation-rust/pull/116

cc @kwaa

kwaa commented 3 months ago

It looks like Lemmy is only using OpenSSL here, and this file is not used.

Maybe delete it to solve this issue? I can create a PR.

kwaa commented 3 months ago

Lemmy:

Other libraries with openssl / native-tls deps:

dessalines commented 3 months ago

Ya, if its unused go ahead and delete it in a PR.

reqwest might already have a non-openssl feature that we just need to use: https://docs.rs/reqwest/latest/reqwest/#optional-features

lettre would also appreciate a PR I'm sure, and we stay on the latest versions of that also.

kwaa commented 3 months ago

lettre would also appreciate a PR I'm sure, and we stay on the latest versions of that also.

lettre also has rustls-tls feature: https://github.com/lettre/lettre/blob/0132bee59d4963ba21c532b35281e00aae8ce81e/Cargo.toml#L111

I can't test them since I don't plan to clone Lemmy locally.

dessalines commented 3 months ago

I'll test that one and add it to your PR

kwaa commented 3 months ago

Lemmy's Cargo.lock no longer contains openssl, so this issue can be closed.

dessalines commented 3 months ago

Thx for helping with this!

Nutomic commented 3 months ago

Blocked by https://github.com/LemmyNet/lemmy/pull/4904

Nutomic commented 1 month ago

https://github.com/LemmyNet/lemmy/pull/4976