Fix up for openssl changes
This commit is contained in:
parent
3b422889d9
commit
e930dd8105
@ -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))
|
||||||
}
|
}
|
||||||
|
@ -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", []));
|
||||||
|
Loading…
Reference in New Issue
Block a user