Implemented rustls support, fixes #195
This PR adds support for rustls, and makes using a TLS implementation optional.
I've inspired this commit purely on https://github.com/blackbeam/rust-mysql-simple/pull/295 and the documentation for the various crates. I'm not familiar with the workings of rustls or native-tls though.
This PR adds the following features:
flate2-zlibAflatebackend is needed to compile this crate. Users ofrustlswill turn off the default features when using it, hence causing compilation issues. The usual fix for this is for the user to include flate2 in their own Cargo.toml, though this seems suboptimal. So I've made the default flate2 backend it's own feature for ease of use.native-tls-tlsYes, the doubletlsis intentional. This enabls the native-tls backend and the required crates for it.rustls-tlsEnables the rustls-tls backend
Hopefully this all is to spec. Thanks!
The mysql v57 and v80 tests seem to be failing due to missing cc (so unrelated to this PR)
However I'm not sure why TestBasixLinux * is failing. I don't think any of the default behavior was changed (i.e. native-tls), so that should work if it was not already failing.
@TobiasDeBruijn Thanks very much for this, I really wanted mysql without openssl. I don't know about the tests, but your branch is working fine for me (on Linux).
Awesome! Might just be CI then.
Is there anything still blocking this pr?
I dont believe so
Hi all. Sorry for delay. I will merge and publish this until next monday.