### Method

# Gio TlsDatabase verify_chain_async

since: 2.30

#### Declaration

    void
    g_tls_database_verify_chain_async (
      GTlsDatabase* self,
      GTlsCertificate* chain,
      const gchar* purpose,
      GSocketConnectable* identity,
      GTlsInteraction* interaction,
      GTlsDatabaseVerifyFlags flags,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description

Asynchronously determines the validity of a certificate chain after looking up and adding any missing certificates to the chain. See `g_tls_database_verify_chain()` for more information.

Available since: 2.30

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

#### Parameters

`chain`

  Type: `GTlsCertificate`

  A `GTlsCertificate` chain.

  The data is owned by the caller of the method.

`purpose`

  Type: `const gchar*`

  The purpose that this certificate chain will be used for.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`identity`

  Type: `GSocketConnectable`

  The expected peer identity.

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

`interaction`

  Type: `GTlsInteraction`

  Used to interact with the user if necessary.

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

`flags`

  Type: `GTlsDatabaseVerifyFlags`

  Additional verify flags.

`cancellable`

  Type: `GCancellable`

  A `GCancellable`, or `NULL`.

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

`callback`

  Type: `GAsyncReadyCallback`

  Callback to call when the operation completes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  The data to pass to the callback function.

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