Added in API level 1

SslErrorHandler


open class SslErrorHandler : Handler
kotlin.Any
   ↳ 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 android.webkit.WebViewClient#onReceivedSslError(android.webkit.WebView,android.webkit.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
open Unit

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

open Unit

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

Inherited functions

Public methods

cancel

Added in API level 1
open fun cancel(): Unit

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.

See Also

    proceed

    Added in API level 1
    open fun proceed(): Unit

    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.

    See Also