Fix up for openssl changes

This commit is contained in:
Steven Fackler 2014-09-05 21:57:08 -07:00
parent 3b422889d9
commit e930dd8105
2 changed files with 3 additions and 3 deletions

View File

@ -117,7 +117,7 @@ pub fn initialize_stream(params: &PostgresConnectParams, ssl: &SslMode)
} }
} }
match SslStream::try_new(ctx, socket) { match SslStream::new(ctx, socket) {
Ok(stream) => Ok(SslStream(stream)), Ok(stream) => Ok(SslStream(stream)),
Err(err) => Err(SslError(err)) Err(err) => Err(SslError(err))
} }

View File

@ -628,7 +628,7 @@ fn test_cancel_query() {
#[test] #[test]
fn test_require_ssl_conn() { fn test_require_ssl_conn() {
let ctx = SslContext::new(Sslv3); let ctx = SslContext::new(Sslv3).unwrap();
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost", let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost",
&RequireSsl(ctx))); &RequireSsl(ctx)));
or_fail!(conn.execute("SELECT 1::VARCHAR", [])); or_fail!(conn.execute("SELECT 1::VARCHAR", []));
@ -636,7 +636,7 @@ fn test_require_ssl_conn() {
#[test] #[test]
fn test_prefer_ssl_conn() { fn test_prefer_ssl_conn() {
let ctx = SslContext::new(Sslv3); let ctx = SslContext::new(Sslv3).unwrap();
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost", let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost",
&PreferSsl(ctx))); &PreferSsl(ctx)));
or_fail!(conn.execute("SELECT 1::VARCHAR", [])); or_fail!(conn.execute("SELECT 1::VARCHAR", []));