WebKit2.WebView.prototype.get_tls_info
function get_tls_info(): [ok: Boolean, certificate: Gio.TlsCertificate, errors: Gio.TlsCertificateFlags] { // Gjs wrapper for webkit_web_view_get_tls_info() }
Retrieves the Gio.TlsCertificate associated with the main resource of web_view, and the Gio.TlsCertificateFlags 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 WebKit2.WebView::load-changed and call this function when it's emitted with WebKit2.LoadEvent.committed event.
Note that this function provides no information about the security of the web page if the current WebKit2.TLSErrorsPolicy 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 WebKit2.TLSErrorsPolicy is @WEBKIT_TLS_ERRORS_POLICY_FAIL, in which case subresources that fail certificate verification will be blocked.
- ok
true if the web_view connection uses HTTPS and a response has been received from the server, or false otherwise.
- certificate
return location for a Gio.TlsCertificate
- errors
return location for a Gio.TlsCertificateFlags the verification status of certificate