Connect to AcceptCertificate signal.
Used by #GTlsConnection implementations to emit the #GTlsConnection::accept-certificate signal.
Gets conn's certificate, as set by gio.tls_connection.TlsConnection.setCertificate.
Returns the name of the current TLS 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.
Gets the certificate database that conn uses to verify peer certificates. See gio.tls_connection.TlsConnection.setDatabase.
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.
Gets the name of the application-layer protocol negotiated during the handshake.
Gets conn's peer's certificate after the handshake has completed or failed. (It is not set during the emission of #GTlsConnection::accept-certificate.)
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 #GTlsConnection::accept-certificate.)
Returns the current TLS 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.
Gets conn rehandshaking mode. See gio.tls_connection.TlsConnection.setRehandshakeMode for details.
Tests whether or not conn expects a proper TLS close notification when the connection is closed. See gio.tls_connection.TlsConnection.setRequireCloseNotify for details.
Gets whether conn uses the system certificate database to verify peer certificates. See gio.tls_connection.TlsConnection.setUseSystemCertdb.
Attempts a TLS handshake on conn.
Asynchronously performs a TLS handshake on conn. See gio.tls_connection.TlsConnection.handshake for more information.
Finish an asynchronous TLS handshake operation. See gio.tls_connection.TlsConnection.handshake for more information.
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.tls_connection.TlsConnection.getNegotiatedProtocol to find the negotiated protocol after the handshake. Specifying null for the the value of protocols will disable ALPN negotiation.
This sets the certificate that conn will present to its peer during the TLS handshake. For a #GTlsServerConnection, it is mandatory to set this, and that will normally be done at construct time.
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 #GTlsConnection::accept-certificate will always be emitted on client-side connections, unless that bit is not set in #GTlsClientConnection:validation-flags).
Set the object that will be used to interact with the user. It will be used for things like prompting the user for passwords.
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.
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).
Sets whether conn uses the system certificate database to verify peer certificates. This is true by default. If set to false, then peer certificate validation will always set the gio.types.TlsCertificateFlags.UnknownCa error (meaning #GTlsConnection::accept-certificate will always be emitted on client-side connections, unless that bit is not set in #GTlsClientConnection:validation-flags).
Finishes an asynchronous io stream splice operation.
Clears the pending flag on stream.
Closes the stream, releasing resources related to it. This will also close the individual input and output streams, if they are not already closed.
Requests an asynchronous close of the stream, releasing resources related to it. When the operation is finished callback will be called. You can then call gio.iostream.IOStream.closeFinish to get the result of the operation.
Closes a stream.
Gets the input stream for this object. This is used for reading.
Gets the output stream for this object. This is used for writing.
Checks if a stream has pending actions.
Checks if a stream is closed.
Sets stream to have actions pending. If the pending flag is already set or stream is closed, it will return false and set error.
Asynchronously splice the output stream of stream1 to the input stream of stream2, and splice the output stream of stream2 to the input stream of stream1.
gio.tls_connection.TlsConnection is the base TLS connection class type, which wraps a gio.iostream.IOStream and provides TLS encryption on top of it. Its subclasses, gio.tls_client_connection.TlsClientConnection and gio.tls_server_connection.TlsServerConnection, implement client-side and server-side TLS, respectively.
For DTLS (Datagram TLS) support, see gio.dtls_connection.DtlsConnection.