mysql_async icon indicating copy to clipboard operation
mysql_async copied to clipboard

Implemented rustls support, fixes #195

Open TobiasDeBruijn opened this issue 4 years ago • 3 comments

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-zlib A flate backend is needed to compile this crate. Users of rustls will 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-tls Yes, the double tls is intentional. This enabls the native-tls backend and the required crates for it.
  • rustls-tls Enables the rustls-tls backend

Hopefully this all is to spec. Thanks!

TobiasDeBruijn avatar Aug 10 '22 21:08 TobiasDeBruijn

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 avatar Aug 13 '22 20:08 TobiasDeBruijn

@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).

rosscanning avatar Aug 13 '22 22:08 rosscanning

Awesome! Might just be CI then.

TobiasDeBruijn avatar Aug 14 '22 09:08 TobiasDeBruijn

Is there anything still blocking this pr?

jepcd avatar Nov 02 '22 23:11 jepcd

I dont believe so

TobiasDeBruijn avatar Nov 09 '22 15:11 TobiasDeBruijn

Hi all. Sorry for delay. I will merge and publish this until next monday.

blackbeam avatar Nov 09 '22 17:11 blackbeam