commit
5a11e804f0
@ -13,8 +13,7 @@ Asynchronous TLS/SSL streams for [Tokio](https://tokio.rs/) using
|
|||||||
|
|
||||||
```rust
|
```rust
|
||||||
use webpki::DNSNameRef;
|
use webpki::DNSNameRef;
|
||||||
use rustls::ClientConfig;
|
use tokio_rustls::{ClientConfigExt, rustls::ClientConfig};
|
||||||
use tokio_rustls::ClientConfigExt;
|
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@ version = "0.1.0"
|
|||||||
authors = ["quininer <quininer@live.com>"]
|
authors = ["quininer <quininer@live.com>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustls = "0.13"
|
|
||||||
webpki = "0.18.1"
|
webpki = "0.18.1"
|
||||||
tokio-rustls = { path = "../..", default-features = false, features = [ "tokio" ] }
|
tokio-rustls = { path = "../..", default-features = false, features = [ "tokio" ] }
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
extern crate clap;
|
extern crate clap;
|
||||||
extern crate rustls;
|
|
||||||
extern crate tokio;
|
extern crate tokio;
|
||||||
extern crate webpki;
|
extern crate webpki;
|
||||||
extern crate webpki_roots;
|
extern crate webpki_roots;
|
||||||
@ -16,8 +15,7 @@ use tokio::io;
|
|||||||
use tokio::net::TcpStream;
|
use tokio::net::TcpStream;
|
||||||
use tokio::prelude::*;
|
use tokio::prelude::*;
|
||||||
use clap::{ App, Arg };
|
use clap::{ App, Arg };
|
||||||
use rustls::ClientConfig;
|
use tokio_rustls::{ClientConfigExt, rustls::ClientConfig};
|
||||||
use tokio_rustls::ClientConfigExt;
|
|
||||||
|
|
||||||
fn app() -> App<'static, 'static> {
|
fn app() -> App<'static, 'static> {
|
||||||
App::new("client")
|
App::new("client")
|
||||||
|
@ -4,7 +4,6 @@ version = "0.1.0"
|
|||||||
authors = ["quininer <quininer@live.com>"]
|
authors = ["quininer <quininer@live.com>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
rustls = "0.13"
|
|
||||||
tokio-rustls = { path = "../..", default-features = false, features = [ "tokio" ] }
|
tokio-rustls = { path = "../..", default-features = false, features = [ "tokio" ] }
|
||||||
|
|
||||||
tokio = { version = "0.1.6" }
|
tokio = { version = "0.1.6" }
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
extern crate clap;
|
extern crate clap;
|
||||||
extern crate rustls;
|
|
||||||
extern crate tokio;
|
extern crate tokio;
|
||||||
extern crate tokio_rustls;
|
extern crate tokio_rustls;
|
||||||
|
|
||||||
@ -7,14 +6,15 @@ use std::sync::Arc;
|
|||||||
use std::net::ToSocketAddrs;
|
use std::net::ToSocketAddrs;
|
||||||
use std::io::BufReader;
|
use std::io::BufReader;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use rustls::{ Certificate, NoClientAuth, PrivateKey, ServerConfig };
|
use tokio_rustls::{
|
||||||
use rustls::internal::pemfile::{ certs, rsa_private_keys };
|
ServerConfigExt,
|
||||||
|
rustls::{ Certificate, NoClientAuth, PrivateKey, ServerConfig,
|
||||||
|
internal::pemfile::{ certs, rsa_private_keys }},
|
||||||
|
};
|
||||||
use tokio::prelude::{ Future, Stream };
|
use tokio::prelude::{ Future, Stream };
|
||||||
use tokio::io::{ self, AsyncRead };
|
use tokio::io::{ self, AsyncRead };
|
||||||
use tokio::net::TcpListener;
|
use tokio::net::TcpListener;
|
||||||
use clap::{ App, Arg };
|
use clap::{ App, Arg };
|
||||||
use tokio_rustls::ServerConfigExt;
|
|
||||||
|
|
||||||
|
|
||||||
fn app() -> App<'static, 'static> {
|
fn app() -> App<'static, 'static> {
|
||||||
App::new("server")
|
App::new("server")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//! Asynchronous TLS/SSL streams for Tokio using [Rustls](https://github.com/ctz/rustls).
|
//! Asynchronous TLS/SSL streams for Tokio using [Rustls](https://github.com/ctz/rustls).
|
||||||
|
|
||||||
extern crate rustls;
|
pub extern crate rustls;
|
||||||
extern crate webpki;
|
pub extern crate webpki;
|
||||||
|
|
||||||
#[cfg(feature = "tokio")] mod tokio_impl;
|
#[cfg(feature = "tokio")] mod tokio_impl;
|
||||||
#[cfg(feature = "unstable-futures")] mod futures_impl;
|
#[cfg(feature = "unstable-futures")] mod futures_impl;
|
||||||
|
Loading…
Reference in New Issue
Block a user