mirror of https://github.com/rwf2/Rocket.git
Use 'hyper_sync_rustls' for hyper/rustls interop.
This commit is contained in:
parent
4609413828
commit
85846c2af1
|
@ -15,7 +15,7 @@ build = "build.rs"
|
|||
categories = ["web-programming::http-server"]
|
||||
|
||||
[features]
|
||||
tls = ["rustls", "hyper-rustls"]
|
||||
tls = ["rustls", "hyper-sync-rustls"]
|
||||
|
||||
[dependencies]
|
||||
yansi = { version = "0.3", features = ["nightly"] }
|
||||
|
@ -33,16 +33,10 @@ pear_codegen = "0.0.10"
|
|||
rustls = { version = "0.9.0", optional = true }
|
||||
cookie = { version = "0.9.1", features = ["percent-encode", "secure"] }
|
||||
hyper = { version = "0.10.11", default-features = false }
|
||||
hyper-sync-rustls = { version = "0.1", features = ["server"], optional = true }
|
||||
ordermap = "0.2"
|
||||
isatty = "0.1"
|
||||
|
||||
[dependencies.hyper-rustls]
|
||||
git = "https://github.com/SergioBenitez/hyper-rustls"
|
||||
rev = "ef1e8c"
|
||||
default-features = false
|
||||
features = ["server"]
|
||||
optional = true
|
||||
|
||||
[dev-dependencies]
|
||||
lazy_static = "0.2"
|
||||
rocket_codegen = { version = "0.3.0-dev", path = "../codegen" }
|
||||
|
|
|
@ -490,8 +490,8 @@ impl Config {
|
|||
/// ```
|
||||
#[cfg(feature = "tls")]
|
||||
pub fn set_tls(&mut self, certs_path: &str, key_path: &str) -> Result<()> {
|
||||
use hyper_rustls::util as tls;
|
||||
use hyper_rustls::util::Error::Io;
|
||||
use hyper_sync_rustls::util as tls;
|
||||
use hyper_sync_rustls::util::Error::Io;
|
||||
let pem_err = "malformed PEM file";
|
||||
|
||||
// Load the certificates.
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::io;
|
|||
use std::net::{SocketAddr, Shutdown};
|
||||
use std::time::Duration;
|
||||
|
||||
#[cfg(feature = "tls")] use hyper_rustls::{WrappedStream, ServerSession};
|
||||
#[cfg(feature = "tls")] use hyper_sync_rustls::{WrappedStream, ServerSession};
|
||||
use http::hyper::net::{HttpStream, NetworkStream};
|
||||
|
||||
use self::NetStream::*;
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
#[macro_use] extern crate log;
|
||||
#[macro_use] extern crate pear;
|
||||
#[cfg(feature = "tls")] extern crate rustls;
|
||||
#[cfg(feature = "tls")] extern crate hyper_rustls;
|
||||
#[cfg(feature = "tls")] extern crate hyper_sync_rustls;
|
||||
extern crate yansi;
|
||||
extern crate hyper;
|
||||
extern crate url;
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::mem;
|
|||
use yansi::Paint;
|
||||
use state::Container;
|
||||
|
||||
#[cfg(feature = "tls")] use hyper_rustls::TlsServer;
|
||||
#[cfg(feature = "tls")] use hyper_sync_rustls::TlsServer;
|
||||
use {logger, handler};
|
||||
use ext::ReadExt;
|
||||
use config::{self, Config, LoggedValue};
|
||||
|
|
Loading…
Reference in New Issue