#tls-stream #async-tls #io-stream #native-tls #tokio #non-blocking #async-io

tokio-native-tls

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

4 releases (2 breaking)

0.3.1 Feb 7, 2023
0.3.0 Dec 24, 2020
0.2.0 Oct 16, 2020
0.1.0 Apr 3, 2020

#44 in Network programming

Download history 568145/week @ 2023-12-08 542230/week @ 2023-12-15 307160/week @ 2023-12-22 413379/week @ 2023-12-29 554645/week @ 2024-01-05 572426/week @ 2024-01-12 639706/week @ 2024-01-19 608445/week @ 2024-01-26 648085/week @ 2024-02-02 658792/week @ 2024-02-09 606275/week @ 2024-02-16 651380/week @ 2024-02-23 692814/week @ 2024-03-01 691055/week @ 2024-03-08 716194/week @ 2024-03-15 581396/week @ 2024-03-22

2,803,847 downloads per month
Used in 1,965 crates (160 directly)

MIT license

21KB
326 lines

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

~2–14MB
~152K SLoC