#tokio #tls #ssl #native #nonblocking


An implementation of TLS/SSL streams for Tokio using native-tls giving an implementation of TLS for nonblocking I/O streams

3 releases (breaking)

0.3.0 Dec 24, 2020
0.2.0 Oct 16, 2020
0.1.0 Apr 3, 2020

#74 in Network programming

Download history 17930/week @ 2020-11-02 17181/week @ 2020-11-09 18649/week @ 2020-11-16 13824/week @ 2020-11-23 18828/week @ 2020-11-30 19024/week @ 2020-12-07 18368/week @ 2020-12-14 10540/week @ 2020-12-21 10916/week @ 2020-12-28 31749/week @ 2021-01-04 39079/week @ 2021-01-11 40954/week @ 2021-01-18 55205/week @ 2021-01-25 71525/week @ 2021-02-01 68998/week @ 2021-02-08 73502/week @ 2021-02-15

69,207 downloads per month
Used in 376 crates (42 directly)

MIT license

310 lines


An implementation of TLS/SSL streams for Tokio built on top of the [native-tls crate]


This project is licensed under the MIT license.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tokio by you, shall be licensed as MIT, without any additional terms or conditions.


Async TLS streams

This library is an implementation of TLS streams using the most appropriate system library by default for negotiating the connection. That is, on Windows this library uses SChannel, on OSX it uses SecureTransport, and on other platforms it uses OpenSSL.

Each TLS stream implements the Read and Write traits to interact and interoperate with the rest of the futures I/O ecosystem. Client connections initiated from this crate verify hostnames automatically and by default.

This crate primarily exports this ability through two newtypes, TlsConnector and TlsAcceptor. These newtypes augment the functionality provided by the native-tls crate, on which this crate is built. Configuration of TLS parameters is still primarily done through the native-tls crate.


~37K SLoC