Use new SslStream constructor

This commit is contained in:
Steven Fackler 2015-08-15 13:05:51 -07:00
parent 369961a416
commit 0d5f254e7d
2 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ log = "0.3"
phf = "0.7" phf = "0.7"
rustc-serialize = "0.3" rustc-serialize = "0.3"
chrono = { version = "0.2.14", optional = true } 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 } serde = { version = "0.3", optional = true }
time = { version = "0.1.14", optional = true } time = { version = "0.1.14", optional = true }
unix_socket = { version = ">= 0.3, < 0.5", optional = true } unix_socket = { version = ">= 0.3, < 0.5", optional = true }

View File

@ -18,7 +18,7 @@ impl StreamWrapper for SslStream<Stream> {
impl NegotiateSsl for SslContext { impl NegotiateSsl for SslContext {
fn negotiate_ssl(&self, _: &str, stream: Stream) fn negotiate_ssl(&self, _: &str, stream: Stream)
-> Result<Box<StreamWrapper>, Box<Error+Send+Sync>> { -> Result<Box<StreamWrapper>, Box<Error+Send+Sync>> {
let stream = try!(SslStream::new(self, stream)); let stream = try!(SslStream::connect(self, stream));
Ok(Box::new(stream)) Ok(Box::new(stream))
} }
} }