invoke_request_certificate


Description:

[ Version ( since = "2.40" ) ]
public TlsInteractionResult invoke_request_certificate (TlsConnection connection, TlsCertificateRequestFlags flags, Cancellable? cancellable = null) throws Error

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 MainContext returned by get_thread_default when the interaction is created. This is called by called by 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 g_tls_interaction_failed will be returned with an error that contains a g_io_error_cancelled error code. Certain implementations may not support immediate cancellation.

Parameters:

this

a TlsInteraction object

connection

a TlsConnection object

flags

flags providing more information about the request

cancellable

an optional Cancellable cancellation object

Returns:

The status of the certificate request interaction.




2022 vala-language.org