Method
WebKit2WebViewget_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 returned data is owned by the instance. errors
-
Type:
GTlsCertificateFlags
Return location for a
GTlsCertificateFlags
the verification status ofcertificate
.The argument will be set by the function. The caller of the method takes ownership of the returned data, and is responsible for freeing it.