Added in API level 1

SslErrorHandler


public class SslErrorHandler
extends Handler

java.lang.Object
   ↳ android.os.Handler
     ↳ android.webkit.SslErrorHandler


Represents a request for handling an SSL error.

A WebView creates an instance of this class. The instance is passed to WebViewClient.onReceivedSslError(WebView, SslErrorHandler, SslError).

The host application must call cancel() or, contrary to secure web communication standards, proceed() to provide the web view's response to the request.

Summary

Public methods

void cancel()

Instructs the WebView that encountered the SSL certificate error to terminate communication with the server.

void proceed()

Instructs the WebView that encountered the SSL certificate error to ignore the error and continue communicating with the server.

Inherited methods

Public methods

cancel

Added in API level 1
public void cancel ()

Instructs the WebView that encountered the SSL certificate error to terminate communication with the server. Cancels the current server request and all pending requests for the WebView.

The host application must call this method to prevent a resource from loading when an SSL certificate is invalid.

proceed

Added in API level 1
public void proceed ()

Instructs the WebView that encountered the SSL certificate error to ignore the error and continue communicating with the server.

Warning: When an SSL error occurs, the host application should always call cancel() rather than proceed() because an invalid SSL certificate means the connection is not secure.