Skip to content

Most visited

Recently visited

navigation

ClientCertRequest

public abstract class ClientCertRequest
extends Object

java.lang.Object
   ↳ android.webkit.ClientCertRequest


ClientCertRequest: The user receives an instance of this class as a parameter of onReceivedClientCertRequest(WebView, ClientCertRequest). The request includes the parameters to choose the client certificate, such as the host name and the port number requesting the cert, the acceptable key types and the principals. The user should call one of the class methods to indicate how to deal with the client certificate request. All methods should be called on UI thread. WebView caches the proceed(PrivateKey, X509Certificate[]) and cancel() responses in memory and uses them to handle future client certificate requests for the same host/port pair. The user can clear the cached data using clearClientCertPreferences(Runnable).

Summary

Public constructors

ClientCertRequest()

Public methods

abstract void cancel()

Cancel this request.

abstract String getHost()

Returns the host name of the server requesting the certificate.

abstract String[] getKeyTypes()

Returns the acceptable types of asymmetric keys (can be null).

abstract int getPort()

Returns the port number of the server requesting the certificate.

abstract Principal[] getPrincipals()

Returns the acceptable certificate issuers for the certificate matching the private key (can be null).

abstract void ignore()

Ignore the request for now.

abstract void proceed(PrivateKey privateKey, X509Certificate[] chain)

Proceed with the specified private key and client certificate chain.

Inherited methods

From class java.lang.Object

Public constructors

ClientCertRequest

added in API level 21
ClientCertRequest ()

Public methods

cancel

added in API level 21
void cancel ()

Cancel this request. Remember the user's choice and use it for future requests.

getHost

added in API level 21
String getHost ()

Returns the host name of the server requesting the certificate.

Returns
String

getKeyTypes

added in API level 21
String[] getKeyTypes ()

Returns the acceptable types of asymmetric keys (can be null).

Returns
String[]

getPort

added in API level 21
int getPort ()

Returns the port number of the server requesting the certificate.

Returns
int

getPrincipals

added in API level 21
Principal[] getPrincipals ()

Returns the acceptable certificate issuers for the certificate matching the private key (can be null).

Returns
Principal[]

ignore

added in API level 21
void ignore ()

Ignore the request for now. Do not remember user's choice.

proceed

added in API level 21
void proceed (PrivateKey privateKey, 
                X509Certificate[] chain)

Proceed with the specified private key and client certificate chain. Remember the user's positive choice and use it for future requests.

Parameters
privateKey PrivateKey

chain X509Certificate

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)