TlsInteraction.requestCertificate
gio.types.TlsInteractionResult requestCertificate(gio.tls_connection.TlsConnection connection, gio.types.TlsCertificateRequestFlags flags, gio.cancellable.Cancellable cancellable = null)Run synchronous interaction to ask the user to choose a certificate to use with the connection. In general, gio.tls_interaction.TlsInteraction.invokeRequestCertificate should be used instead of this function.
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 will usually abort the TLS connection.
If gio.types.TlsInteractionResult.Handled is returned, then the #GTlsConnection passed to gio.tls_interaction.TlsInteraction.requestCertificate will have had its #GTlsConnection:certificate filled in.
If the interaction is cancelled by the cancellation object, or by the user then gio.types.TlsInteractionResult.Failed will be returned with an error that contains a gio.types.IOErrorEnum.Cancelled error code. Certain implementations may not support immediate cancellation.
Parameters
connection | a #GTlsConnection object |
flags | flags providing more information about the request |
cancellable | an optional #GCancellable cancellation object |