[−][src]Struct openssl::ssl::Ssl
Methods
impl Ssl[src]
impl Sslpub fn new(ctx: &SslContext) -> Result<Ssl, SslError>[src]
pub fn new(ctx: &SslContext) -> Result<Ssl, SslError>pub fn set_verify(&mut self, mode: SslVerifyMode)[src]
pub fn set_verify(&mut self, mode: SslVerifyMode)Sets the verification mode to be used during the handshake process.
Use set_verify_callback to additionally add a callback.
pub fn set_verify_callback<F>(&mut self, mode: SslVerifyMode, verify: F) where
F: Fn(bool, &X509StoreContext) -> bool + Any + 'static + Sync + Send, [src]
pub fn set_verify_callback<F>(&mut self, mode: SslVerifyMode, verify: F) where
F: Fn(bool, &X509StoreContext) -> bool + Any + 'static + Sync + Send, Sets the certificate verification callback to be used during the handshake process.
The callback is provided with a boolean indicating if the
preveification process was successful, and an object providing access
to the certificate chain. It should return true if the certificate
chain is valid and false otherwise.
pub fn get_current_cipher<'a>(&'a self) -> Option<SslCipher<'a>>[src]
pub fn get_current_cipher<'a>(&'a self) -> Option<SslCipher<'a>>pub fn state_string(&self) -> &'static str[src]
pub fn state_string(&self) -> &'static strpub fn state_string_long(&self) -> &'static str[src]
pub fn state_string_long(&self) -> &'static strpub fn set_hostname(&self, hostname: &str) -> Result<(), SslError>[src]
pub fn set_hostname(&self, hostname: &str) -> Result<(), SslError>Sets the host name to be used with SNI (Server Name Indication).
pub fn peer_certificate(&self) -> Option<X509>[src]
pub fn peer_certificate(&self) -> Option<X509>Returns the certificate of the peer, if present.
pub fn version(&self) -> &'static str[src]
pub fn version(&self) -> &'static strReturns the name of the protocol used for the connection, e.g. "TLSv1.2", "SSLv3", etc.
pub fn pending(&self) -> usize[src]
pub fn pending(&self) -> usizeReturns the number of bytes remaining in the currently processed TLS record.
pub fn compression(&self) -> Option<String>[src]
pub 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.
pub fn get_ssl_method(&self) -> Option<SslMethod>[src]
pub fn get_ssl_method(&self) -> Option<SslMethod>pub fn get_servername(&self) -> Option<String>[src]
pub fn get_servername(&self) -> Option<String>Returns the server's name for the current connection
pub fn set_ssl_context(&self, ctx: &SslContext) -> SslContext[src]
pub fn set_ssl_context(&self, ctx: &SslContext) -> SslContextchange the context corresponding to the current connection
Returns a clone of the SslContext @ctx (ie: the new context). The old context is freed.
pub fn get_ssl_context(&self) -> SslContext[src]
pub fn get_ssl_context(&self) -> SslContextobtain the context corresponding to the current connection
Trait Implementations
impl IntoSsl for Ssl[src]
impl IntoSsl for Sslimpl Clone for Ssl[src]
impl Clone for Sslfn clone(&self) -> Ssl[src]
fn clone(&self) -> Sslfn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Drop for Ssl[src]
impl Drop for Sslimpl Sync for Ssl[src]
impl Sync for Sslimpl Send for Ssl[src]
impl Send for Sslimpl Debug for Ssl[src]
impl Debug for SslBlanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more