fix(client): use Ssl instance in creation of SslStream

This fix brings SNI into working order
This commit is contained in:
Stacey Ell
2015-06-26 09:27:27 -06:00
parent 5bf91f09ee
commit 1a490e25c3

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> {