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

pub trait NegotiateSsl {
    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.

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