TlsBackend

Added in version 2.28.

class TlsBackend(*args, **kwargs)

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

class TlsBackend
get_certificate_type() type

Gets the Type of backend’s TlsCertificate implementation.

Added in version 2.28.

get_client_connection_type() type

Gets the Type of backend’s TlsClientConnection implementation.

Added in version 2.28.

get_default() TlsBackend

Gets the default TlsBackend for the system.

Added in version 2.28.

get_default_database() TlsDatabase

Gets the default TlsDatabase used to verify TLS connections.

Added in version 2.30.

get_dtls_client_connection_type() type

Gets the Type of backend’s DtlsClientConnection implementation.

Added in version 2.48.

get_dtls_server_connection_type() type

Gets the Type of backend’s GDtlsServerConnection implementation.

Added in version 2.48.

get_file_database_type() type

Gets the Type of backend’s GTlsFileDatabase implementation.

Added in version 2.30.

get_server_connection_type() type

Gets the Type of backend’s GTlsServerConnection implementation.

Added in version 2.28.

set_default_database(database: TlsDatabase | None = None) None

Set the default TlsDatabase used to verify TLS connections

Any subsequent call to 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 set_default_database() had never been called.

Added in version 2.60.

Parameters:

database – the TlsDatabase

supports_dtls() bool

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

Added in version 2.48.

supports_tls() bool

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

Added in version 2.28.

Virtual Methods

class TlsBackend
do_get_default_database() TlsDatabase

Gets the default TlsDatabase used to verify TLS connections.

Added in version 2.30.

do_supports_dtls() bool

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

Added in version 2.48.

do_supports_tls() bool

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

Added in version 2.28.