Skip to content

Commit e930dd8

Browse files
committed
Fix up for openssl changes
1 parent 3b42288 commit e930dd8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub fn initialize_stream(params: &PostgresConnectParams, ssl: &SslMode)
117117
}
118118
}
119119

120-
match SslStream::try_new(ctx, socket) {
120+
match SslStream::new(ctx, socket) {
121121
Ok(stream) => Ok(SslStream(stream)),
122122
Err(err) => Err(SslError(err))
123123
}

tests/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,15 +628,15 @@ fn test_cancel_query() {
628628

629629
#[test]
630630
fn test_require_ssl_conn() {
631-
let ctx = SslContext::new(Sslv3);
631+
let ctx = SslContext::new(Sslv3).unwrap();
632632
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost",
633633
&RequireSsl(ctx)));
634634
or_fail!(conn.execute("SELECT 1::VARCHAR", []));
635635
}
636636

637637
#[test]
638638
fn test_prefer_ssl_conn() {
639-
let ctx = SslContext::new(Sslv3);
639+
let ctx = SslContext::new(Sslv3).unwrap();
640640
let conn = or_fail!(PostgresConnection::connect("postgres://postgres@localhost",
641641
&PreferSsl(ctx)));
642642
or_fail!(conn.execute("SELECT 1::VARCHAR", []));

0 commit comments

Comments
 (0)