upgrade to native-tls 0.2 + invalid certs (#325)
- Bumps `native-tls` dependency to 0.2 and adapt code accordingly - Import code used from `tokio-tls` into `connect_async` and adapt dependencies accordinlgy - Add an option for using `danger_accept_invalid_certs` inside the `Config` struct
This commit is contained in:
committed by
Sean McArthur
parent
a25f62f4cb
commit
11f8588989
@@ -6,7 +6,7 @@ use hyper::client::connect::{Connect, Connected, Destination};
|
||||
use hyper_tls::{HttpsConnector, MaybeHttpsStream};
|
||||
use native_tls::TlsConnector;
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
use tokio_tls::{TlsConnectorExt, TlsStream};
|
||||
use connect_async::{TlsConnectorExt, TlsStream};
|
||||
|
||||
use std::io::{self, Cursor, Read, Write};
|
||||
use std::sync::Arc;
|
||||
@@ -33,10 +33,6 @@ impl Connector {
|
||||
tls: tls,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn danger_disable_hostname_verification(&mut self) {
|
||||
self.https.danger_disable_hostname_verification(true);
|
||||
}
|
||||
}
|
||||
|
||||
impl Connect for Connector {
|
||||
|
||||
Reference in New Issue
Block a user