#tokio #tls #ssl #networking #nonblocking #runtime

tokio-tls

An implementation of TLS/SSL streams for Tokio giving an implementation of TLS for nonblocking I/O streams

13 releases

✓ Uses Rust 2018 edition

0.3.0 Nov 26, 2019
0.3.0-alpha.5 Sep 19, 2019
0.2.1 Jan 7, 2019
0.2.0 Aug 8, 2018
0.1.0 Dec 21, 2016

#21 in Network programming

Download history 24571/week @ 2019-12-02 29889/week @ 2019-12-09 27346/week @ 2019-12-16 13502/week @ 2019-12-23 20727/week @ 2019-12-30 36260/week @ 2020-01-06 38799/week @ 2020-01-13 42627/week @ 2020-01-20 44316/week @ 2020-01-27 43257/week @ 2020-02-03 43328/week @ 2020-02-10 41185/week @ 2020-02-17 45940/week @ 2020-02-24 46733/week @ 2020-03-02 45111/week @ 2020-03-09 47436/week @ 2020-03-16

70,477 downloads per month
Used in 726 crates (83 directly)

MIT license

1.5MB
24K SLoC

Razor 24K SLoC // 0.4% comments Rust 337 SLoC // 0.2% comments

tokio-tls

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

License

This project is licensed under the MIT license.

Contribution

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.


lib.rs:

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.

Dependencies

~240–750KB
~15K SLoC