diff --git a/Cargo.toml b/Cargo.toml index 557a54f3..353d465f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ log = "0.3" phf = "0.7" rustc-serialize = "0.3" chrono = { version = "0.2.14", optional = true } -openssl = { version = "0.6", optional = true } +openssl = { version = "0.6.4", optional = true } serde = { version = "0.3", optional = true } time = { version = "0.1.14", optional = true } unix_socket = { version = ">= 0.3, < 0.5", optional = true } diff --git a/src/io/openssl.rs b/src/io/openssl.rs index bbdc1231..0ddd4691 100644 --- a/src/io/openssl.rs +++ b/src/io/openssl.rs @@ -18,7 +18,7 @@ impl StreamWrapper for SslStream { impl NegotiateSsl for SslContext { fn negotiate_ssl(&self, _: &str, stream: Stream) -> Result, Box> { - let stream = try!(SslStream::new(self, stream)); + let stream = try!(SslStream::connect(self, stream)); Ok(Box::new(stream)) } }