DtlsConnectionIfaceProxy

Proxy object for Gio.DtlsConnection interface when a GObject has no applicable D binding

class DtlsConnectionIfaceProxy : IfaceProxy , DtlsConnection {}

Mixed In Members

From mixin DtlsConnectionT!()

close
bool close(gio.cancellable.Cancellable cancellable)

Close the DTLS connection. This is equivalent to calling gio.dtls_connection.DtlsConnection.shutdown to shut down both sides of the connection.

closeAsync
void closeAsync(int ioPriority, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously close the DTLS connection. See gio.dtls_connection.DtlsConnection.close for more information.

closeFinish
bool closeFinish(gio.async_result.AsyncResult result)

Finish an asynchronous TLS close operation. See gio.dtls_connection.DtlsConnection.close for more information.

emitAcceptCertificate
bool emitAcceptCertificate(gio.tls_certificate.TlsCertificate peerCert, gio.types.TlsCertificateFlags errors)

Used by #GDtlsConnection implementations to emit the #GDtlsConnection::accept-certificate signal.

getCertificate
gio.tls_certificate.TlsCertificate getCertificate()

Gets conn's certificate, as set by gio.dtls_connection.DtlsConnection.setCertificate.

getCiphersuiteName
string getCiphersuiteName()

Returns the name of the current DTLS ciphersuite, or null if the connection has not handshaked or has been closed. Beware that the TLS backend may use any of multiple different naming conventions, because OpenSSL and GnuTLS have their own ciphersuite naming conventions that are different from each other and different from the standard, IANA- registered ciphersuite names. The ciphersuite name is intended to be displayed to the user for informative purposes only, and parsing it is not recommended.

getDatabase
gio.tls_database.TlsDatabase getDatabase()

Gets the certificate database that conn uses to verify peer certificates. See gio.dtls_connection.DtlsConnection.setDatabase.

getInteraction
gio.tls_interaction.TlsInteraction getInteraction()

Get the object that will be used to interact with the user. It will be used for things like prompting the user for passwords. If null is returned, then no user interaction will occur for this connection.

getNegotiatedProtocol
string getNegotiatedProtocol()

Gets the name of the application-layer protocol negotiated during the handshake.

getPeerCertificate
gio.tls_certificate.TlsCertificate getPeerCertificate()

Gets conn's peer's certificate after the handshake has completed or failed. (It is not set during the emission of #GDtlsConnection::accept-certificate.)

getPeerCertificateErrors
gio.types.TlsCertificateFlags getPeerCertificateErrors()

Gets the errors associated with validating conn's peer's certificate, after the handshake has completed or failed. (It is not set during the emission of #GDtlsConnection::accept-certificate.)

getProtocolVersion
gio.types.TlsProtocolVersion getProtocolVersion()

Returns the current DTLS protocol version, which may be gio.types.TlsProtocolVersion.Unknown if the connection has not handshaked, or has been closed, or if the TLS backend has implemented a protocol version that is not a recognized #GTlsProtocolVersion.

getRehandshakeMode
gio.types.TlsRehandshakeMode getRehandshakeMode()

Gets conn rehandshaking mode. See gio.dtls_connection.DtlsConnection.setRehandshakeMode for details.

getRequireCloseNotify
bool getRequireCloseNotify()

Tests whether or not conn expects a proper TLS close notification when the connection is closed. See gio.dtls_connection.DtlsConnection.setRequireCloseNotify for details.

handshake
bool handshake(gio.cancellable.Cancellable cancellable)

Attempts a TLS handshake on conn.

handshakeAsync
void handshakeAsync(int ioPriority, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously performs a TLS handshake on conn. See gio.dtls_connection.DtlsConnection.handshake for more information.

handshakeFinish
bool handshakeFinish(gio.async_result.AsyncResult result)

Finish an asynchronous TLS handshake operation. See gio.dtls_connection.DtlsConnection.handshake for more information.

setAdvertisedProtocols
void setAdvertisedProtocols(string[] protocols)

Sets the list of application-layer protocols to advertise that the caller is willing to speak on this connection. The Application-Layer Protocol Negotiation (ALPN) extension will be used to negotiate a compatible protocol with the peer; use gio.dtls_connection.DtlsConnection.getNegotiatedProtocol to find the negotiated protocol after the handshake. Specifying null for the the value of protocols will disable ALPN negotiation.

setCertificate
void setCertificate(gio.tls_certificate.TlsCertificate certificate)

This sets the certificate that conn will present to its peer during the TLS handshake. For a #GDtlsServerConnection, it is mandatory to set this, and that will normally be done at construct time.

setDatabase
void setDatabase(gio.tls_database.TlsDatabase database)

Sets the certificate database that is used to verify peer certificates. This is set to the default database by default. See gio.tls_backend.TlsBackend.getDefaultDatabase. If set to null, then peer certificate validation will always set the gio.types.TlsCertificateFlags.UnknownCa error (meaning #GDtlsConnection::accept-certificate will always be emitted on client-side connections, unless that bit is not set in #GDtlsClientConnection:validation-flags).

setInteraction
void setInteraction(gio.tls_interaction.TlsInteraction interaction)

Set the object that will be used to interact with the user. It will be used for things like prompting the user for passwords.

setRehandshakeMode
void setRehandshakeMode(gio.types.TlsRehandshakeMode mode)

Since GLib 2.64, changing the rehandshake mode is no longer supported and will have no effect. With TLS 1.3, rehandshaking has been removed from the TLS protocol, replaced by separate post-handshake authentication and rekey operations.

setRequireCloseNotify
void setRequireCloseNotify(bool requireCloseNotify)

Sets whether or not conn expects a proper TLS close notification before the connection is closed. If this is true (the default), then conn will expect to receive a TLS close notification from its peer before the connection is closed, and will return a gio.types.TlsError.Eof error if the connection is closed without proper notification (since this may indicate a network error, or man-in-the-middle attack).

shutdown
bool shutdown(bool shutdownRead, bool shutdownWrite, gio.cancellable.Cancellable cancellable)

Shut down part or all of a DTLS connection.

shutdownAsync
void shutdownAsync(bool shutdownRead, bool shutdownWrite, int ioPriority, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously shut down part or all of the DTLS connection. See gio.dtls_connection.DtlsConnection.shutdown for more information.

shutdownFinish
bool shutdownFinish(gio.async_result.AsyncResult result)

Finish an asynchronous TLS shutdown operation. See gio.dtls_connection.DtlsConnection.shutdown for more information.

connectAcceptCertificate
ulong connectAcceptCertificate(T callback, Flag!"After" after)

Connect to AcceptCertificate signal.

Inherited Members

From DtlsConnection

close
bool close(gio.cancellable.Cancellable cancellable)

Close the DTLS connection. This is equivalent to calling gio.dtls_connection.DtlsConnection.shutdown to shut down both sides of the connection.

closeAsync
void closeAsync(int ioPriority, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously close the DTLS connection. See gio.dtls_connection.DtlsConnection.close for more information.

closeFinish
bool closeFinish(gio.async_result.AsyncResult result)

Finish an asynchronous TLS close operation. See gio.dtls_connection.DtlsConnection.close for more information.

emitAcceptCertificate
bool emitAcceptCertificate(gio.tls_certificate.TlsCertificate peerCert, gio.types.TlsCertificateFlags errors)

Used by #GDtlsConnection implementations to emit the #GDtlsConnection::accept-certificate signal.

getCertificate
gio.tls_certificate.TlsCertificate getCertificate()

Gets conn's certificate, as set by gio.dtls_connection.DtlsConnection.setCertificate.

getCiphersuiteName
string getCiphersuiteName()

Returns the name of the current DTLS ciphersuite, or null if the connection has not handshaked or has been closed. Beware that the TLS backend may use any of multiple different naming conventions, because OpenSSL and GnuTLS have their own ciphersuite naming conventions that are different from each other and different from the standard, IANA- registered ciphersuite names. The ciphersuite name is intended to be displayed to the user for informative purposes only, and parsing it is not recommended.

getDatabase
gio.tls_database.TlsDatabase getDatabase()

Gets the certificate database that conn uses to verify peer certificates. See gio.dtls_connection.DtlsConnection.setDatabase.

getInteraction
gio.tls_interaction.TlsInteraction getInteraction()

Get the object that will be used to interact with the user. It will be used for things like prompting the user for passwords. If null is returned, then no user interaction will occur for this connection.

getNegotiatedProtocol
string getNegotiatedProtocol()

Gets the name of the application-layer protocol negotiated during the handshake.

getPeerCertificate
gio.tls_certificate.TlsCertificate getPeerCertificate()

Gets conn's peer's certificate after the handshake has completed or failed. (It is not set during the emission of #GDtlsConnection::accept-certificate.)

getPeerCertificateErrors
gio.types.TlsCertificateFlags getPeerCertificateErrors()

Gets the errors associated with validating conn's peer's certificate, after the handshake has completed or failed. (It is not set during the emission of #GDtlsConnection::accept-certificate.)

getProtocolVersion
gio.types.TlsProtocolVersion getProtocolVersion()

Returns the current DTLS protocol version, which may be gio.types.TlsProtocolVersion.Unknown if the connection has not handshaked, or has been closed, or if the TLS backend has implemented a protocol version that is not a recognized #GTlsProtocolVersion.

getRehandshakeMode
gio.types.TlsRehandshakeMode getRehandshakeMode()

Gets conn rehandshaking mode. See gio.dtls_connection.DtlsConnection.setRehandshakeMode for details.

getRequireCloseNotify
bool getRequireCloseNotify()

Tests whether or not conn expects a proper TLS close notification when the connection is closed. See gio.dtls_connection.DtlsConnection.setRequireCloseNotify for details.

handshake
bool handshake(gio.cancellable.Cancellable cancellable)

Attempts a TLS handshake on conn.

handshakeAsync
void handshakeAsync(int ioPriority, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously performs a TLS handshake on conn. See gio.dtls_connection.DtlsConnection.handshake for more information.

handshakeFinish
bool handshakeFinish(gio.async_result.AsyncResult result)

Finish an asynchronous TLS handshake operation. See gio.dtls_connection.DtlsConnection.handshake for more information.

setAdvertisedProtocols
void setAdvertisedProtocols(string[] protocols)

Sets the list of application-layer protocols to advertise that the caller is willing to speak on this connection. The Application-Layer Protocol Negotiation (ALPN) extension will be used to negotiate a compatible protocol with the peer; use gio.dtls_connection.DtlsConnection.getNegotiatedProtocol to find the negotiated protocol after the handshake. Specifying null for the the value of protocols will disable ALPN negotiation.

setCertificate
void setCertificate(gio.tls_certificate.TlsCertificate certificate)

This sets the certificate that conn will present to its peer during the TLS handshake. For a #GDtlsServerConnection, it is mandatory to set this, and that will normally be done at construct time.

setDatabase
void setDatabase(gio.tls_database.TlsDatabase database)

Sets the certificate database that is used to verify peer certificates. This is set to the default database by default. See gio.tls_backend.TlsBackend.getDefaultDatabase. If set to null, then peer certificate validation will always set the gio.types.TlsCertificateFlags.UnknownCa error (meaning #GDtlsConnection::accept-certificate will always be emitted on client-side connections, unless that bit is not set in #GDtlsClientConnection:validation-flags).

setInteraction
void setInteraction(gio.tls_interaction.TlsInteraction interaction)

Set the object that will be used to interact with the user. It will be used for things like prompting the user for passwords.

setRehandshakeMode
void setRehandshakeMode(gio.types.TlsRehandshakeMode mode)

Since GLib 2.64, changing the rehandshake mode is no longer supported and will have no effect. With TLS 1.3, rehandshaking has been removed from the TLS protocol, replaced by separate post-handshake authentication and rekey operations.

setRequireCloseNotify
void setRequireCloseNotify(bool requireCloseNotify)

Sets whether or not conn expects a proper TLS close notification before the connection is closed. If this is true (the default), then conn will expect to receive a TLS close notification from its peer before the connection is closed, and will return a gio.types.TlsError.Eof error if the connection is closed without proper notification (since this may indicate a network error, or man-in-the-middle attack).

shutdown
bool shutdown(bool shutdownRead, bool shutdownWrite, gio.cancellable.Cancellable cancellable)

Shut down part or all of a DTLS connection.

shutdownAsync
void shutdownAsync(bool shutdownRead, bool shutdownWrite, int ioPriority, gio.cancellable.Cancellable cancellable, gio.types.AsyncReadyCallback callback)

Asynchronously shut down part or all of the DTLS connection. See gio.dtls_connection.DtlsConnection.shutdown for more information.

shutdownFinish
bool shutdownFinish(gio.async_result.AsyncResult result)

Finish an asynchronous TLS shutdown operation. See gio.dtls_connection.DtlsConnection.shutdown for more information.

connectAcceptCertificate
ulong connectAcceptCertificate(T callback, Flag!"After" after)

Connect to AcceptCertificate signal.