### Function

# EDataServerUI4 trust_prompt_run_for_source

since: 3.16

#### Declaration [src]

    void
    e_trust_prompt_run_for_source (
      GtkWindow* parent,
      ESource* source,
      const gchar* certificate_pem,
      GTlsCertificateFlags certificate_errors,
      const gchar* error_text,
      gboolean allow_source_save,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Similar to e_trust_prompt_run_modal(), except it also manages all the necessary things around the `source`‘s SSL/TLS trust properties when it also contains `E_SOURCE_EXTENSION_WEBDAV`, thus the SSL/TLS trust on the WebDAV `source` is properly updated based on the user’s choice. The call is finished with e_trust_prompt_run_for_source_finish(), which also returns the user’s choice. The finish happens in the `callback`. This is necessary, because the `source` can be also saved.

The function fails, if the `source` doesn’t contain the `E_SOURCE_EXTENSION_AUTHENTICATION`.

Note: The dialog is not shown when the stored certificate trust in the WebDAV `source` matches the `certificate_pem` and the stored result is #E_TRUST_PROMPT_RESPONSE_REJECT.

Available since: 3.16

#### Parameters

`parent`

  Type: `GtkWindow`

  A `GtkWindow` to use as a parent for the trust prompt dialog.

  The data is owned by the caller of the function.

`source`

  Type: `ESource`

  An `ESource`, with `E_SOURCE_EXTENSION_AUTHENTICATION`.

  The data is owned by the caller of the function.

`certificate_pem`

  Type: `const gchar*`

  A PEM-encoded certificate for which to show the trust prompt.

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

`certificate_errors`

  Type: `GTlsCertificateFlags`

  Errors of the `certificate_pem`.

`error_text`

  Type: `const gchar*`

  An optional error text to show in the dialog; can be `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`allow_source_save`

  Type: `gboolean`

  Whether can also save any `source` changes.

`cancellable`

  Type: `GCancellable`

  A `GCancellable`, or `NULL`.

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

`callback`

  Type: `GAsyncReadyCallback`

  A callback to call, when the prompt (an `source` save) is done.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  User data passed into `callback`.

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