Gio.TlsInteraction.prototype.invoke_request_certificate
function invoke_request_certificate(connection: Gio.TlsConnection, flags: Gio.TlsCertificateRequestFlags, cancellable: Gio.Cancellable): Gio.TlsInteractionResult { // Gjs wrapper for g_tls_interaction_invoke_request_certificate() }
Invoke the interaction to ask the user to choose a certificate to use with the connection. It invokes this interaction in the main loop, specifically the GLib.MainContext returned by GLib.main_context_get_thread_default when the interaction is created. This is called by called by Gio.TlsConnection when the peer requests a certificate during the handshake.
Derived subclasses usually implement a certificate selector, although they may also choose to provide a certificate from elsewhere. Alternatively the user may abort this certificate request, which may or may not abort the TLS connection.
The implementation can either be a synchronous (eg: modal dialog) or an asynchronous one (eg: modeless dialog). This function will take care of calling which ever one correctly.
If the interaction is cancelled by the cancellation object, or by the user then Gio.TlsInteractionResult.failed will be returned with an error that contains a Gio.IOErrorEnum.cancelled error code. Certain implementations may not support immediate cancellation.
Since 2.40
- connection
a Gio.TlsConnection object
- flags
flags providing more information about the request
- cancellable
an optional Gio.Cancellable cancellation object
- Returns
The status of the certificate request interaction.