tokio-tls

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

6 releases

0.2.0 Aug 8, 2018
0.1.4 Jan 3, 2018
0.1.3 Jun 24, 2017
0.1.2 Mar 15, 2017
0.1.0 Dec 21, 2016

#10 in Asynchronous

Download history 9050/week @ 2018-05-16 11360/week @ 2018-05-23 10763/week @ 2018-05-30 11189/week @ 2018-06-06 11419/week @ 2018-06-13 12121/week @ 2018-06-20 11106/week @ 2018-06-27 9592/week @ 2018-07-04 9423/week @ 2018-07-11 11515/week @ 2018-07-18 11632/week @ 2018-07-25 9965/week @ 2018-08-01 10850/week @ 2018-08-08

46,655 downloads per month
Used in 509 crates (40 directly)

MIT license

145KB
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