Gio.TlsInteraction.request_certificate_async

### Method

# Gio TlsInteractionrequest_certificate_async

since: 2.40

#### Declaration [src]

    void
    g_tls_interaction_request_certificate_async (
      GTlsInteraction* interaction,
      GTlsConnection* connection,
      GTlsCertificateRequestFlags flags,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Run asynchronous interaction to ask the user for a certificate to use with the connection. In general, `g_tls_interaction_invoke_request_certificate()` 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. `callback` will be called when the operation completes. Alternatively the user may abort this certificate request, which will usually abort the TLS connection.

Available since: 2.40

This method completes asynchronously. Use `g_tls_interaction_request_certificate_finish()` inside the `GAsyncReadyCallback` to obtain the result of the operation.

#### Parameters

`connection`

  Type: `GTlsConnection`

  A `GTlsConnection` object.

  The data is owned by the caller of the method.

`flags`

  Type: `GTlsCertificateRequestFlags`

  Flags providing more information about the request.

`cancellable`

  Type: `GCancellable`

  An optional `GCancellable` cancellation object.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`callback`

  Type: `GAsyncReadyCallback`

  Will be called when the interaction completes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to pass to the `callback`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.