Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to use rustls over native-tls #209

Merged
merged 13 commits into from
Jul 16, 2024

Conversation

azat
Copy link
Contributor

@azat azat commented Dec 25, 2023

This PR adds ability to use rustls over native-tls, this can be useful for two reasons:

  • performance (though I haven't checked by myself, but this article shows pretty decent results)
  • reduce extra dependencies (since native-tls requires some C ssl library)

Previous feature tls is now an alias to tls-native-tls (and "meta" feature _tls is now shows that some of TLS features had been enabled), so on other words everything should be backward compatible.

Also I've extended CI to make cover native-tls and rustls as well (for that builds I have to run docker manually, since services executed before cloning repo, while I need some files from it), and clickhouse-server in that checks does not expose 9000 port, which should ensure that everything goes via secure protocol.

P.S. one interesting thing that I found out is that rustls is faster for establishing connections (though I did not dig deeply enough, since there are tons of reasons for this, especially in the library that doing cryptography).

Refs: https://users.rust-lang.org/t/any-reasons-to-prefer-native-tls-over-rustls/37626/7

@azat
Copy link
Contributor Author

azat commented Mar 31, 2024

@suharev7 can you take a look please?

@azat
Copy link
Contributor Author

azat commented Jul 16, 2024

@suharev7 kind ping

@suharev7
Copy link
Owner

It's looking great! Thanks.

@suharev7 suharev7 merged commit abfe517 into suharev7:async-await Jul 16, 2024
3 checks passed
@azat azat deleted the rustls branch July 16, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants