tokio-tls

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

7 releases

0.2.1 Jan 7, 2019
0.2.0 Aug 8, 2018
0.1.4 Jan 3, 2018
0.1.3 Jun 24, 2017
0.1.0 Dec 21, 2016

#5 in Network programming

Download history 6419/week @ 2018-12-20 5583/week @ 2018-12-27 9202/week @ 2019-01-03 9245/week @ 2019-01-10 8456/week @ 2019-01-17 8890/week @ 2019-01-24 8336/week @ 2019-01-31 8756/week @ 2019-02-07 7746/week @ 2019-02-14 7433/week @ 2019-02-21 8198/week @ 2019-02-28 8640/week @ 2019-03-07 8705/week @ 2019-03-14 9801/week @ 2019-03-21 9333/week @ 2019-03-28

43,479 downloads per month
Used in 432 crates (60 directly)

MIT license

147KB
2.5K SLoC

tokio-tls

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

Documentation

Usage

First, add this to your Cargo.toml:

[dependencies]
native-tls = "0.2"
tokio-tls = "0.2"

Next, add this to your crate:

extern crate native_tls;
extern crate tokio_tls;

use tokio_tls::{TlsConnector, TlsAcceptor};

You can find few examples how to use this crate in examples directory (using TLS in hyper server or client).

By default the native-tls crate currently uses the "platform appropriate" backend for a TLS implementation. This means:

Typically these selections mean that you don't have to worry about a portability when using TLS, these libraries are all normally installed by default.

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.

Dependencies

~2MB
~27K SLoC