sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

Feature to disable SSL

Open Proximyst opened this issue 3 years ago • 5 comments

I'm writing a service which is designed to be ran in Docker where SSL really only adds unnecessary overhead and is as such not used. I'd love for a feature gate to disable SSL altogether in this crate. I personally do not care if SSL is enabled by default, as long as it is possible to remove SSL.

Thank you! :)

Proximyst avatar Jul 13 '20 16:07 Proximyst

Depends on the database. For instance, you can add ?sslmode=disable for postgres.

mehcode avatar Jul 13 '20 19:07 mehcode

I'm aware how to disable the SSL from the connection, I'm saying I'd prefer if I didn't have a dependency on the openssl crate at all. This is completely fine if you smack a "priority: low" or something label on, though, as it's not exactly a problem per se.

Proximyst avatar Jul 13 '20 20:07 Proximyst

I have problems with the openssl crate as well on NixOS. I can either get fast linking with lld or working openssl linking, but not both.

Edit: I just noticed things works fine for me with https://github.com/launchbadge/sqlx/issues/473#issuecomment-655517309, thank you for that very helpful pointer.

ivan avatar Jul 13 '20 20:07 ivan

@Proximyst This is unfortunately blocked on: https://github.com/rust-lang/cargo/issues/3494

mehcode avatar Jul 19 '20 03:07 mehcode

I think this is possible in rust 1.60 https://blog.rust-lang.org/2022/04/07/Rust-1.60.0.html

juchiast avatar Jun 18 '22 14:06 juchiast

Pending fixes in #2039

abonander avatar Jan 18 '23 01:01 abonander