Bump rustls to 0.20.1; add src to rustls error (#438)
This commit is contained in:
@@ -30,7 +30,7 @@ cookie = { version = "0.15", default-features = false, optional = true}
|
||||
once_cell = "1"
|
||||
url = "2"
|
||||
socks = { version = "0.3", optional = true }
|
||||
rustls = { version = "0.20", optional = true }
|
||||
rustls = { version = "0.20.1", optional = true }
|
||||
webpki = { version = "0.22", optional = true }
|
||||
webpki-roots = { version = "0.22", optional = true }
|
||||
rustls-native-certs = { version = "0.6", optional = true }
|
||||
|
||||
@@ -368,10 +368,9 @@ pub(crate) fn connect_https(unit: &Unit, hostname: &str) -> Result<Stream, Error
|
||||
let mut sock = connect_host(unit, hostname, port)?;
|
||||
let mut sess = rustls::ClientConnection::new(
|
||||
tls_conf,
|
||||
rustls::ServerName::try_from(hostname).map_err(|_e| ErrorKind::Dns.new())?,
|
||||
rustls::ServerName::try_from(hostname).map_err(|e| ErrorKind::Dns.new().src(e))?,
|
||||
)
|
||||
.map_err(|e| ErrorKind::Io.new().src(e))?;
|
||||
// TODO rustls 0.20.1: Add src to ServerName error (0.20 didn't implement StdError trait for it)
|
||||
|
||||
sess.complete_io(&mut sock)
|
||||
.map_err(|err| ErrorKind::ConnectionFailed.new().src(err))?;
|
||||
|
||||
Reference in New Issue
Block a user