gio::prelude

Trait DtlsClientConnectionExt

Source
pub trait DtlsClientConnectionExt: IsA<DtlsClientConnection> + 'static {
    // Provided methods
    fn accepted_cas(&self) -> Vec<ByteArray> { ... }
    fn server_identity(&self) -> SocketConnectable { ... }
    fn validation_flags(&self) -> TlsCertificateFlags { ... }
    fn set_server_identity(&self, identity: &impl IsA<SocketConnectable>) { ... }
    fn set_validation_flags(&self, flags: TlsCertificateFlags) { ... }
    fn connect_accepted_cas_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_server_identity_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_validation_flags_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all DtlsClientConnection methods.

§Implementors

DtlsClientConnection

Provided Methods§

Source

fn accepted_cas(&self) -> Vec<ByteArray>

Gets the list of distinguished names of the Certificate Authorities that the server will accept certificates from. This will be set during the TLS handshake if the server requests a certificate. Otherwise, it will be None.

Each item in the list is a #GByteArray which contains the complete subject DN of the certificate authority.

§Returns

the list of CA DNs. You should unref each element with g_byte_array_unref() and then the free the list with g_list_free().

Source

fn server_identity(&self) -> SocketConnectable

Gets @self’s expected server identity

§Returns

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

Source

fn validation_flags(&self) -> TlsCertificateFlags

👎Deprecated: Since 2.74

Gets @self’s validation flags

This function does not work as originally designed and is impossible to use correctly. See #GDtlsClientConnection:validation-flags for more information.

§Deprecated since 2.74

Do not attempt to ignore validation errors.

§Returns

the validation flags

Source

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

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::BAD_IDENTITY validation, if enabled.

§identity

a #GSocketConnectable describing the expected server identity

Source

fn set_validation_flags(&self, flags: TlsCertificateFlags)

👎Deprecated: Since 2.74

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

This function does not work as originally designed and is impossible to use correctly. See #GDtlsClientConnection:validation-flags for more information.

§Deprecated since 2.74

Do not attempt to ignore validation errors.

§flags

the #GTlsCertificateFlags to use

Source

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

Source

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

Source

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

👎Deprecated: Since 2.74

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§