Struct openssl::ssl::Ssl [] [src]

pub struct Ssl {
    // some fields omitted
}

Methods

impl Ssl

fn new(ctx: &SslContext) -> Result<Ssl, SslError>

fn state_string(&self) -> &'static str

fn state_string_long(&self) -> &'static str

fn set_hostname(&self, hostname: &str) -> Result<(), SslError>

Sets the host name to be used with SNI (Server Name Indication).

fn peer_certificate(&self) -> Option<X509>

Returns the certificate of the peer, if present.

fn pending(&self) -> usize

Returns the number of bytes remaining in the currently processed TLS record.

fn compression(&self) -> Option<String>

Returns the compression currently in use.

The result will be either None, indicating no compression is in use, or a string with the compression name.

fn get_ssl_method(&self) -> Option<SslMethod>

fn get_servername(&self) -> Option<String>

Returns the server's name for the current connection

fn set_ssl_context(&self, ctx: &SslContext) -> SslContext

change the context corresponding to the current connection

fn get_ssl_context(&self) -> SslContext

obtain the context corresponding to the current connection

Trait Implementations

impl Send for Ssl

impl Sync for Ssl

impl Debug for Ssl

fn fmt(&self, fmt: &mut Formatter) -> Result

impl Drop for Ssl

fn drop(&mut self)

impl Clone for Ssl

fn clone(&self) -> Ssl

fn clone_from(&mut self, source: &Self)

impl IntoSsl for Ssl

fn into_ssl(self) -> Result<Ssl, SslError>