Skip to content

Gio.TlsBackend

interface

TLS (Transport Layer Security, aka SSL) and DTLS backend. This is an internal type used to coordinate the different classes implemented by a TLS backend.

Methods

get_certificate_type

def get_certificate_type(self) -> type | GObject.Type

Gets the GType of backend's TlsCertificate implementation.

get_client_connection_type

def get_client_connection_type(self) -> type | GObject.Type

Gets the GType of backend's TlsClientConnection implementation.

get_default_database

def get_default_database(self) -> TlsDatabase

Gets the default TlsDatabase used to verify TLS connections.

get_dtls_client_connection_type

def get_dtls_client_connection_type(self) -> type | GObject.Type

Gets the GType of backend’s DtlsClientConnection implementation.

get_dtls_server_connection_type

def get_dtls_server_connection_type(self) -> type | GObject.Type

Gets the GType of backend’s DtlsServerConnection implementation.

get_file_database_type

def get_file_database_type(self) -> type | GObject.Type

Gets the GType of backend's TlsFileDatabase implementation.

get_server_connection_type

def get_server_connection_type(self) -> type | GObject.Type

Gets the GType of backend's TlsServerConnection implementation.

set_default_database

def set_default_database(self, database: TlsDatabase | None = ...) -> None

Set the default TlsDatabase used to verify TLS connections

Any subsequent call to TlsBackend.get_default_database will return the database set in this call. Existing databases and connections are not modified.

Setting a None default database will reset to using the system default database as if TlsBackend.set_default_database had never been called.

Parameters:

supports_dtls

def supports_dtls(self) -> bool

Checks if DTLS is supported. DTLS support may not be available even if TLS support is available, and vice-versa.

supports_tls

def supports_tls(self) -> bool

Checks if TLS is supported; if this returns False for the default TlsBackend, it means no "real" TLS backend is available.

Static functions

get_default

@staticmethod
def get_default() -> TlsBackend

Gets the default TlsBackend for the system.

Virtual methods

do_get_default_database

def do_get_default_database(self) -> TlsDatabase

Gets the default TlsDatabase used to verify TLS connections.

do_supports_dtls

def do_supports_dtls(self) -> bool

Checks if DTLS is supported. DTLS support may not be available even if TLS support is available, and vice-versa.

do_supports_tls

def do_supports_tls(self) -> bool

Checks if TLS is supported; if this returns False for the default TlsBackend, it means no "real" TLS backend is available.