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

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

#55 in Asynchronous

Download history 814880/week @ 2024-07-17 786536/week @ 2024-07-24 817722/week @ 2024-07-31 863188/week @ 2024-08-07 838308/week @ 2024-08-14 888977/week @ 2024-08-21 816839/week @ 2024-08-28 911677/week @ 2024-09-04 861376/week @ 2024-09-11 1019569/week @ 2024-09-18 1082588/week @ 2024-09-25 1432238/week @ 2024-10-02 1484998/week @ 2024-10-09 1538541/week @ 2024-10-16 1075720/week @ 2024-10-23 934831/week @ 2024-10-30

5,325,433 downloads per month
Used in 2,265 crates (186 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–12MB
~151K SLoC