lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

refactor: use rsa instead of openssl

Open dessalines opened this issue 1 year ago • 8 comments

Requirements

  • [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • [X] Did you check to see if this issue already exists?
  • [X] Is this only a feature request? Do not put multiple feature requests in one issue.
  • [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • [X] Do you agree to follow the rules in our Code of Conduct?

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

dessalines avatar Jul 15 '24 12:07 dessalines

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 avatar Jul 15 '24 13:07 kwaa

Lemmy:

  • [x] activitypub-federation (0.5.8) (https://github.com/LemmyNet/activitypub-federation-rust/pull/116, https://github.com/LemmyNet/activitypub-federation-rust/pull/118#event-13507502246)
  • [x] lemmy-utils (https://github.com/LemmyNet/lemmy/pull/4901)

Other libraries with openssl / native-tls deps:

  • [x] reqwest (https://github.com/LemmyNet/lemmy/pull/4901/commits/11e9d7a47fb490101f2c69699232f259b2e8b427)
  • [x] lettre (https://github.com/LemmyNet/lemmy/pull/4901/commits/11e9d7a47fb490101f2c69699232f259b2e8b427)

kwaa avatar Jul 15 '24 13:07 kwaa

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.

dessalines avatar Jul 15 '24 13:07 dessalines

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.

kwaa avatar Jul 15 '24 14:07 kwaa

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

dessalines avatar Jul 15 '24 14:07 dessalines

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

kwaa avatar Jul 18 '24 12:07 kwaa

Thx for helping with this!

dessalines avatar Jul 18 '24 12:07 dessalines

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

Nutomic avatar Jul 19 '24 08:07 Nutomic

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

Nutomic avatar Sep 19 '24 08:09 Nutomic