public final class

SelfSignedCertificateHandler

extends Object
java.lang.Object
   ↳ com.esri.core.io.SelfSignedCertificateHandler

Class Overview

Registers a listener here to handle self-signed certificates.

Summary

Public Constructors
SelfSignedCertificateHandler()
Public Methods
static final void clearTrustedCertificates()
Removes all cached trusted certificates.
static final OnSelfSignedCertificateListener getOnSelfSignedCertificateListener()
Returns the user defined onSelfSignedCertificateListener.
static final boolean isTrustAllSigners()
Returns true if all signers are trusted.
static final void setOnSelfSignedCertificateListener(OnSelfSignedCertificateListener listener)
Sets the onSelfSignedCertificateListener to handle self-signed certificates.
static final void setTrustAllSigners(boolean trustAllSigner)
Set to true to trust all signers.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SelfSignedCertificateHandler ()

Public Methods

public static final void clearTrustedCertificates ()

Removes all cached trusted certificates.

public static final OnSelfSignedCertificateListener getOnSelfSignedCertificateListener ()

Returns the user defined onSelfSignedCertificateListener.

Returns
OnSelfSignedCertificateListener Returns the onSelfSignedCertificateListener.

public static final boolean isTrustAllSigners ()

Returns true if all signers are trusted. However, invalided certificates (e.g. expired certificates) will still cause exceptions. To accept all certificates, you need to use setOnSelfSignedCertificateListener(OnSelfSignedCertificateListener) and always returns true.

Returns
boolean Returns returns true if trust all signers.

public static final void setOnSelfSignedCertificateListener (OnSelfSignedCertificateListener listener)

Sets the onSelfSignedCertificateListener to handle self-signed certificates. With the listener, users have full control over all certificates. You should not mix this with isTrustAllSigners() method. The trusted certificates will be cached in the VM. You can clear the cache by calling clearTrustedCertificates().

Parameters
listener OnSelfSignedCertificateListener: The onSelfSignedCertificateListener to set.

public static final void setTrustAllSigners (boolean trustAllSigner)

Set to true to trust all signers.

Parameters
trustAllSigner boolean: Set to true to trust all signers.