Allow all of SSL2, SSL3 and TLS1 connections
This commit is contained in:
parent
d68e998f44
commit
2da5f4defc
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ impl NetConnection {
|
||||||
#[cfg(feature = "ssl")]
|
#[cfg(feature = "ssl")]
|
||||||
fn connect_ssl_internal(host: &str, port: u16) -> Result<NetReadWritePair> {
|
fn connect_ssl_internal(host: &str, port: u16) -> Result<NetReadWritePair> {
|
||||||
let socket = try!(TcpStream::connect(&format!("{}:{}", host, port)[..]));
|
let socket = try!(TcpStream::connect(&format!("{}:{}", host, port)[..]));
|
||||||
let ssl = try!(ssl_to_io(SslContext::new(SslMethod::Tlsv1)));
|
let ssl = try!(ssl_to_io(SslContext::new(SslMethod::Sslv23)));
|
||||||
let ssl_socket = try!(ssl_to_io(SslStream::connect_generic(&ssl, socket)));
|
let ssl_socket = try!(ssl_to_io(SslStream::connect_generic(&ssl, socket)));
|
||||||
Ok((BufReader::new(NetStream::Ssl(try!(ssl_socket.try_clone()))),
|
Ok((BufReader::new(NetStream::Ssl(try!(ssl_socket.try_clone()))),
|
||||||
BufWriter::new(NetStream::Ssl(ssl_socket))))
|
BufWriter::new(NetStream::Ssl(ssl_socket))))
|
||||||
|
|
Loading…
Reference in a new issue