Package org.gnome.gio
Interface DtlsClientConnection
- All Superinterfaces:
DatagramBased
,DtlsConnection
,Proxy
- All Known Implementing Classes:
DtlsClientConnection.DtlsClientConnectionImpl
@Generated("io.github.jwharm.JavaGI")
public interface DtlsClientConnection
extends Proxy, DatagramBased, DtlsConnection
GDtlsClientConnection
is the client-side subclass of
DtlsConnection
, representing a client-side DTLS connection.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
DtlsClientConnection.Builder<B extends Builder<B>>
static class
The DtlsClientConnectionImpl type represents a native instance of the DtlsClientConnection interface.static class
vtable for aGDtlsClientConnection
implementation.Nested classes/interfaces inherited from interface org.gnome.gio.DatagramBased
DatagramBased.DatagramBasedImpl, DatagramBased.DatagramBasedInterface
Nested classes/interfaces inherited from interface org.gnome.gio.DtlsConnection
DtlsConnection.AcceptCertificateCallback, DtlsConnection.DtlsConnectionImpl, DtlsConnection.DtlsConnectionInterface
-
Method Summary
Modifier and TypeMethodDescriptiondefault List
<MemorySegment> Gets the list of distinguished names of the Certificate Authorities that the server will accept certificates from.default SocketConnectable
Gets this DtlsClientConnection's expected server identitystatic Type
getType()
Get the GType of the DtlsClientConnection classdefault Set
<TlsCertificateFlags> Deprecated.Do not attempt to ignore validation errors.static DtlsClientConnection
new_
(DatagramBased baseSocket, @Nullable SocketConnectable serverIdentity) Creates a newGDtlsClientConnection
wrappingbaseSocket
which is assumed to communicate with the server identified byserverIdentity
.default void
setServerIdentity
(SocketConnectable identity) Sets this DtlsClientConnection's expected server identity, which is used both to tell servers on virtual hosts which certificate to present, and also to let this DtlsClientConnection know what name to look for in the certificate when performingTlsCertificateFlags.BAD_IDENTITY
validation, if enabled.default void
setValidationFlags
(Set<TlsCertificateFlags> flags) Deprecated.Do not attempt to ignore validation errors.default void
setValidationFlags
(TlsCertificateFlags... flags) Deprecated.Do not attempt to ignore validation errors.Methods inherited from interface org.gnome.gio.DatagramBased
conditionCheck, conditionCheck, conditionWait, conditionWait, createSource, createSource, receiveMessages, sendMessages
Methods inherited from interface org.gnome.gio.DtlsConnection
close, closeAsync, closeFinish, emitAcceptCertificate, emitAcceptCertificate, getCertificate, getChannelBindingData, getCiphersuiteName, getDatabase, getInteraction, getNegotiatedProtocol, getPeerCertificate, getPeerCertificateErrors, getProtocolVersion, getRehandshakeMode, getRequireCloseNotify, handshake, handshakeAsync, handshakeFinish, onAcceptCertificate, setAdvertisedProtocols, setCertificate, setDatabase, setInteraction, setRehandshakeMode, setRequireCloseNotify, shutdown, shutdownAsync, shutdownFinish
-
Method Details
-
getType
-
new_
static DtlsClientConnection new_(DatagramBased baseSocket, @Nullable @Nullable SocketConnectable serverIdentity) throws GErrorException Creates a newGDtlsClientConnection
wrappingbaseSocket
which is assumed to communicate with the server identified byserverIdentity
.- Parameters:
baseSocket
- theGDatagramBased
to wrapserverIdentity
- the expected identity of the server- Returns:
- the new
GDtlsClientConnection
, ornull
on error - Throws:
GErrorException
- seeGError
-
getAcceptedCas
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 benull
.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().
-
getServerIdentity
Gets this DtlsClientConnection's expected server identity- Returns:
- a
GSocketConnectable
describing the expected server identity, ornull
if the expected identity is not known.
-
getValidationFlags
Deprecated.Do not attempt to ignore validation errors.Gets this DtlsClientConnection's validation flagsThis function does not work as originally designed and is impossible to use correctly. See
GDtlsClientConnection
:validation-flags for more information.- Returns:
- the validation flags
-
setServerIdentity
Sets this DtlsClientConnection's expected server identity, which is used both to tell servers on virtual hosts which certificate to present, and also to let this DtlsClientConnection know what name to look for in the certificate when performingTlsCertificateFlags.BAD_IDENTITY
validation, if enabled.- Parameters:
identity
- aGSocketConnectable
describing the expected server identity
-
setValidationFlags
Deprecated.Do not attempt to ignore validation errors.Sets this DtlsClientConnection'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.- Parameters:
flags
- theGTlsCertificateFlags
to use
-
setValidationFlags
Deprecated.Do not attempt to ignore validation errors.Sets this DtlsClientConnection'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.- Parameters:
flags
- theGTlsCertificateFlags
to use
-