### Method

# WebKit WebView get_tls_info

#### Declaration [src]

    gboolean
    webkit_web_view_get_tls_info (
      WebKitWebView* web_view,
      GTlsCertificate** certificate,
      GTlsCertificateFlags* errors
    )

#### Description [src]

Retrieves the `GTlsCertificate` associated with the main resource of `web_view`.

Retrieves the `GTlsCertificate` associated with the main resource of `web_view`, and the `GTlsCertificateFlags` showing what problems, if any, have been found with that certificate. If the connection is not HTTPS, this function returns `FALSE`. This function should be called after a response has been received from the server, so you can connect to `WebKitWebView::load-changed` and call this function when it’s emitted with `WEBKIT_LOAD_COMMITTED` event.

Note that this function provides no information about the security of the web page if the current `WebKitTLSErrorsPolicy` is `WEBKIT_TLS_ERRORS_POLICY_IGNORE`, as subresources of the page may be controlled by an attacker. This function may safely be used to determine the security status of the current page only if the current `WebKitTLSErrorsPolicy` is `WEBKIT_TLS_ERRORS_POLICY_FAIL`, in which case subresources that fail certificate verification will be blocked.

#### Parameters

`certificate`

  Type: `GTlsCertificate`

  Return location for a `GTlsCertificate`.

  The argument will be set by the function.
  The data is owned by the instance.

`errors`

  Type: `GTlsCertificateFlags`

  Return location for a `GTlsCertificateFlags` the verification status of `certificate`.

  The argument will be set by the function.
  The caller of the method takes ownership of the data, and is responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if the `web_view` connection uses HTTPS and a response has been received from the server, or `FALSE` otherwise.