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
Provided Methods§
Sourcefn accepted_cas(&self) -> Vec<ByteArray>
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().
Sourcefn server_identity(&self) -> SocketConnectable
fn server_identity(&self) -> SocketConnectable
Sourcefn validation_flags(&self) -> TlsCertificateFlags
👎Deprecated: Since 2.74
fn validation_flags(&self) -> TlsCertificateFlags
Sourcefn set_server_identity(&self, identity: &impl IsA<SocketConnectable>)
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
Sourcefn set_validation_flags(&self, flags: TlsCertificateFlags)
👎Deprecated: Since 2.74
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::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
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
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.