Remove specialized error message for complete_io. (#349)
This was triggering for errors like InvalidCertificate and giving the message "Sometimes this means the host doesn't support any of the same ciphersuites as rustls, or doesn't support TLS 1.2 and above," which is confusing in that situation. For now, offer no specialized error. I'd like to come back when I find more time and restore this, but only for the error cases where it's useful.
This commit is contained in:
committed by
GitHub
parent
026cf75690
commit
a34d450657
@@ -353,11 +353,8 @@ pub(crate) fn connect_https(unit: &Unit, hostname: &str) -> Result<Stream, Error
|
||||
let mut sock = connect_host(unit, hostname, port)?;
|
||||
let mut sess = rustls::ClientSession::new(&tls_conf, sni);
|
||||
|
||||
sess.complete_io(&mut sock).map_err(|err| {
|
||||
ErrorKind::ConnectionFailed
|
||||
.msg("error during TLS handshake. Sometimes this means the host doesn't support any of the same ciphersuites as rustls, or doesn't support TLS 1.2 and above")
|
||||
.src(err)
|
||||
})?;
|
||||
sess.complete_io(&mut sock)
|
||||
.map_err(|err| ErrorKind::ConnectionFailed.new().src(err))?;
|
||||
let stream = rustls::StreamOwned::new(sess, sock);
|
||||
|
||||
Ok(Stream::from_tls_stream(stream))
|
||||
|
||||
Reference in New Issue
Block a user