Trait postgres::io::NegotiateSsl [] [src]

pub trait NegotiateSsl: Debug {
    fn negotiate_ssl(&self, host: &str, stream: Stream) -> Result<Box<StreamWrapper>, Box<Error + Sync + Send>>;
}

A trait implemented by types that can negotiate SSL over a Postgres stream.

If the openssl Cargo feature is enabled, this trait will be implemented for openssl::ssl::SslContext.

If the security-framework Cargo feature is enabled, this trait will be implemented for security_framework::secure_transport::ClientBuilder.

Required Methods

fn negotiate_ssl(&self, host: &str, stream: Stream) -> Result<Box<StreamWrapper>, Box<Error + Sync + Send>>

Negotiates an SSL session, returning a wrapper around the provided stream.

The host portion of the connection parameters is provided for hostname verification.

Implementors