From e930dd8105074434476ad175dbc8c63ce380de18 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Fri, 5 Sep 2014 21:57:08 -0700 Subject: [PATCH] Fix up for openssl changes --- src/io.rs | 2 +- tests/test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io.rs b/src/io.rs index 826f303b..2168b5b8 100644 --- a/src/io.rs +++ b/src/io.rs @@ -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)), Err(err) => Err(SslError(err)) } diff --git a/tests/test.rs b/tests/test.rs index 3e547cf4..4e8e33a3 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -628,7 +628,7 @@ fn test_cancel_query() { #[test] 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", &RequireSsl(ctx))); or_fail!(conn.execute("SELECT 1::VARCHAR", [])); @@ -636,7 +636,7 @@ fn test_require_ssl_conn() { #[test] 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", &PreferSsl(ctx))); or_fail!(conn.execute("SELECT 1::VARCHAR", []));