Package org.gnome.gio
Interface DtlsClientConnection
- All Superinterfaces:
DatagramBased,DtlsConnection,Proxy
- All Known Implementing Classes:
DtlsClientConnection.DtlsClientConnection$Impl
@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.- Since:
- 2.48
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDtlsClientConnection.Builder<B extends Builder<B>>static classThe DtlsClientConnection$Impl type represents a native instance of the DtlsClientConnection interface.static classvtable for aGDtlsClientConnectionimplementation.Nested classes/interfaces inherited from interface org.gnome.gio.DatagramBased
DatagramBased.DatagramBased$Impl, DatagramBased.DatagramBasedInterfaceNested classes/interfaces inherited from interface org.gnome.gio.DtlsConnection
DtlsConnection.AcceptCertificateCallback, DtlsConnection.DtlsConnection$Impl, 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 SocketConnectableGets this DtlsClientConnection's expected server identitystatic TypegetType()Get the GType of the DtlsClientConnection classdefault Set<TlsCertificateFlags> Deprecated.Do not attempt to ignore validation errors.static DtlsClientConnectionnew_(DatagramBased baseSocket, @Nullable SocketConnectable serverIdentity) Creates a newGDtlsClientConnectionwrappingbaseSocketwhich is assumed to communicate with the server identified byserverIdentity.default voidsetServerIdentity(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_IDENTITYvalidation, if enabled.default voidsetValidationFlags(Set<TlsCertificateFlags> flags) Deprecated.Do not attempt to ignore validation errors.default voidsetValidationFlags(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, sendMessagesMethods 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 newGDtlsClientConnectionwrappingbaseSocketwhich is assumed to communicate with the server identified byserverIdentity.- Parameters:
baseSocket- theGDatagramBasedto wrapserverIdentity- the expected identity of the server- Returns:
- the new
GDtlsClientConnection, ornullon error - Throws:
GErrorException- seeGError- Since:
- 2.48
-
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
GByteArraywhich 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().
- Since:
- 2.48
-
getServerIdentity
Gets this DtlsClientConnection's expected server identity- Returns:
- a
GSocketConnectabledescribing the expected server identity, ornullif the expected identity is not known. - Since:
- 2.48
-
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
- Since:
- 2.48
-
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_IDENTITYvalidation, if enabled.- Parameters:
identity- aGSocketConnectabledescribing the expected server identity- Since:
- 2.48
-
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_ALLis used.This function does not work as originally designed and is impossible to use correctly. See
GDtlsClientConnection:validation-flags for more information.- Parameters:
flags- theGTlsCertificateFlagsto use- Since:
- 2.48
-
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_ALLis used.This function does not work as originally designed and is impossible to use correctly. See
GDtlsClientConnection:validation-flags for more information.- Parameters:
flags- theGTlsCertificateFlagsto use- Since:
- 2.48
-