DtlsClientConnection#
Added in version 2.48.
- class DtlsClientConnection(*args, **kwargs)#
GDtlsClientConnection is the client-side subclass of
DtlsConnection, representing a client-side DTLS connection.
Methods#
- class DtlsClientConnection
- get_accepted_cas() list[list[int]]#
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
GByteArraywhich contains the complete subject DN of the certificate authority.Added in version 2.48.
- get_server_identity() SocketConnectable#
Gets
conn's expected server identityAdded in version 2.48.
- get_validation_flags() TlsCertificateFlags#
Gets
conn's validation flagsThis function does not work as originally designed and is impossible to use correctly. See
DtlsClientConnection:validation-flags for more information.Added in version 2.48.
Deprecated since version 2.74: Do not attempt to ignore validation errors.
- classmethod new(server_identity: SocketConnectable | None = None) DtlsClientConnection#
Creates a new
DtlsClientConnectionwrappingbase_socketwhich is assumed to communicate with the server identified byserver_identity.Added in version 2.48.
- Parameters:
server_identity – the expected identity of the server
- set_server_identity(identity: SocketConnectable) None#
Sets
conn's expected server identity, which is used both to tell servers on virtual hosts which certificate to present, and also to letconnknow what name to look for in the certificate when performingBAD_IDENTITYvalidation, if enabled.Added in version 2.48.
- Parameters:
identity – a
SocketConnectabledescribing the expected server identity
- set_validation_flags(flags: TlsCertificateFlags) None#
Sets
conn's validation flags, to override the default set of checks performed when validating a server certificate. By default,VALIDATE_ALLis used.This function does not work as originally designed and is impossible to use correctly. See
DtlsClientConnection:validation-flags for more information.Added in version 2.48.
Deprecated since version 2.74: Do not attempt to ignore validation errors.
- Parameters:
flags – the
TlsCertificateFlagsto use
Properties#
- class DtlsClientConnection
-
- props.server_identity: SocketConnectable#
The type of the None singleton.
Added in version 2.48.
- props.validation_flags: TlsCertificateFlags#
The type of the None singleton.
Added in version 2.48.
Deprecated since version 2.74: Do not attempt to ignore validation errors.