:right-sidebar: True DtlsClientConnection =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.48 .. class:: DtlsClientConnection(*args, **kwargs) :no-contents-entry: ``GDtlsClientConnection`` is the client-side subclass of :obj:`~gi.repository.Gio.DtlsConnection`\, representing a client-side DTLS connection. Methods ------- .. rst-class:: interim-class .. class:: DtlsClientConnection :no-index: .. method:: 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 :const:`None`. Each item in the list is a ``GByteArray`` which contains the complete subject DN of the certificate authority. .. versionadded:: 2.48 .. method:: get_server_identity() -> ~gi.repository.Gio.SocketConnectable Gets ``conn``\'s expected server identity .. versionadded:: 2.48 .. method:: get_validation_flags() -> ~gi.repository.Gio.TlsCertificateFlags Gets ``conn``\'s validation flags This function does not work as originally designed and is impossible to use correctly. See :obj:`~gi.repository.Gio.DtlsClientConnection`\:validation-flags for more information. .. versionadded:: 2.48 .. deprecated:: 2.74 Do not attempt to ignore validation errors. .. classmethod:: new(server_identity: ~gi.repository.Gio.SocketConnectable | None = None) -> ~gi.repository.Gio.DtlsClientConnection Creates a new :obj:`~gi.repository.Gio.DtlsClientConnection` wrapping ``base_socket`` which is assumed to communicate with the server identified by ``server_identity``\. .. versionadded:: 2.48 :param server_identity: the expected identity of the server .. method:: set_server_identity(identity: ~gi.repository.Gio.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 let ``conn`` know what name to look for in the certificate when performing :const:`~gi.repository.Gio.TlsCertificateFlags.BAD_IDENTITY` validation, if enabled. .. versionadded:: 2.48 :param identity: a :obj:`~gi.repository.Gio.SocketConnectable` describing the expected server identity .. method:: set_validation_flags(flags: ~gi.repository.Gio.TlsCertificateFlags) -> None Sets ``conn``\'s validation flags, to override the default set of checks performed when validating a server certificate. By default, :const:`~gi.repository.Gio.TlsCertificateFlags.VALIDATE_ALL` is used. This function does not work as originally designed and is impossible to use correctly. See :obj:`~gi.repository.Gio.DtlsClientConnection`\:validation-flags for more information. .. versionadded:: 2.48 .. deprecated:: 2.74 Do not attempt to ignore validation errors. :param flags: the :obj:`~gi.repository.Gio.TlsCertificateFlags` to use Properties ---------- .. rst-class:: interim-class .. class:: DtlsClientConnection :no-index: .. attribute:: props.accepted_cas :type: list[~typing.Any] The type of the None singleton. .. versionadded:: 2.48 .. attribute:: props.server_identity :type: ~gi.repository.Gio.SocketConnectable The type of the None singleton. .. versionadded:: 2.48 .. attribute:: props.validation_flags :type: ~gi.repository.Gio.TlsCertificateFlags The type of the None singleton. .. versionadded:: 2.48 .. deprecated:: 2.74 Do not attempt to ignore validation errors.