Merge pull request #584 from infinityb/sni-fix

fix(client): use Ssl instance in creation of SslStream
This commit is contained in:
Sean McArthur
2015-06-26 21:16:43 -07:00

View File

@@ -444,7 +444,7 @@ mod openssl {
//} //}
let ssl = try!(Ssl::new(&self.context)); let ssl = try!(Ssl::new(&self.context));
try!(ssl.set_hostname(host)); try!(ssl.set_hostname(host));
SslStream::new(&self.context, stream).map_err(From::from) SslStream::new_from(ssl, stream).map_err(From::from)
} }
fn wrap_server(&self, stream: HttpStream) -> ::Result<Self::Stream> { fn wrap_server(&self, stream: HttpStream) -> ::Result<Self::Stream> {