[][src]Trait gio::TlsClientConnectionExt

pub trait TlsClientConnectionExt: 'static {
    fn get_server_identity(&self) -> Option<SocketConnectable>;
fn get_use_ssl3(&self) -> bool;
fn get_validation_flags(&self) -> TlsCertificateFlags;
fn set_server_identity<P: IsA<SocketConnectable>>(&self, identity: &P);
fn set_use_ssl3(&self, use_ssl3: bool);
fn set_validation_flags(&self, flags: TlsCertificateFlags);
fn connect_property_accepted_cas_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_server_identity_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_use_ssl3_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_validation_flags_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all TlsClientConnection methods.

Implementors

TlsClientConnection

Required methods

fn get_server_identity(&self) -> Option<SocketConnectable>

Gets self's expected server identity

Returns

a SocketConnectable describing the expected server identity, or None if the expected identity is not known.

fn get_use_ssl3(&self) -> bool

Gets whether self will force the lowest-supported TLS protocol version rather than attempt to negotiate the highest mutually- supported version of TLS; see TlsClientConnection::set_use_ssl3.

Deprecated since 2.56

SSL 3.0 is insecure, and this function does not actually indicate whether it is enabled.

Returns

whether self will use the lowest-supported TLS protocol version

fn get_validation_flags(&self) -> TlsCertificateFlags

Gets self's validation flags

Returns

the validation flags

fn set_server_identity<P: IsA<SocketConnectable>>(&self, identity: &P)

Sets self's expected server identity, which is used both to tell servers on virtual hosts which certificate to present, and also to let self know what name to look for in the certificate when performing TlsCertificateFlags::BadIdentity validation, if enabled.

identity

a SocketConnectable describing the expected server identity

fn set_use_ssl3(&self, use_ssl3: bool)

Since 2.42.1, if use_ssl3 is true, this forces self to use the lowest-supported TLS protocol version rather than trying to properly negotiate the highest mutually-supported protocol version with the peer. Be aware that SSL 3.0 is generally disabled by the TlsBackend, so the lowest-supported protocol version is probably not SSL 3.0.

Since 2.58, this may additionally cause an RFC 7507 fallback SCSV to be sent to the server, causing modern TLS servers to immediately terminate the connection. You should generally only use this function if you need to connect to broken servers that exhibit TLS protocol version intolerance, and when an initial attempt to connect to a server normally has already failed.

Deprecated since 2.56

SSL 3.0 is insecure, and this function does not generally enable or disable it, despite its name.

use_ssl3

whether to use the lowest-supported protocol version

fn set_validation_flags(&self, flags: TlsCertificateFlags)

Sets self's validation flags, to override the default set of checks performed when validating a server certificate. By default, TlsCertificateFlags::ValidateAll is used.

flags

the TlsCertificateFlags to use

fn connect_property_accepted_cas_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_server_identity_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_use_ssl3_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

fn connect_property_validation_flags_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId

Loading content...

Implementors

impl<O: IsA<TlsClientConnection>> TlsClientConnectionExt for O[src]

Loading content...