public class ApplicationTrustManager extends Object implements X509TrustManager
Modifier and Type | Class and Description |
---|---|
static class |
ApplicationTrustManager.Cause
The enumeration for the different causes for which the trust manager can
refuse to accept a certificate.
|
Constructor and Description |
---|
ApplicationTrustManager(KeyStore keystore)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptCertificate(X509Certificate[] chain,
String authType,
String host)
This method is called when the user accepted a certificate.
|
void |
checkClientTrusted(X509Certificate[] chain,
String authType) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType) |
ApplicationTrustManager |
createCopy()
Creates a copy of this ApplicationTrustManager.
|
X509Certificate[] |
getAcceptedIssuers() |
String |
getLastRefusedAuthType()
Returns the authentication type for the last refused certificate.
|
ApplicationTrustManager.Cause |
getLastRefusedCause()
Returns the last cause for refusal of a certificate.
|
X509Certificate[] |
getLastRefusedChain()
Returns the certificate chain for the last refused certificate.
|
void |
resetLastRefusedItems()
This is a method used to set to null the different members that provide
information about the last refused certificate.
|
void |
setHost(String host)
Sets the host name we are trying to contact in a secure mode.
|
public ApplicationTrustManager(KeyStore keystore)
keystore
- The keystore to use for this trustmanager.public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted
in interface X509TrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted
in interface X509TrustManager
CertificateException
public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface X509TrustManager
public void acceptCertificate(X509Certificate[] chain, String authType, String host)
chain
- the certificate chain accepted by the user.authType
- the authentication type.host
- the host we tried to connect and that presented the certificate.public void setHost(String host)
host
- the host name we are trying to contact in a secure mode.public void resetLastRefusedItems()
public ApplicationTrustManager createCopy()
public String getLastRefusedAuthType()
public ApplicationTrustManager.Cause getLastRefusedCause()
public X509Certificate[] getLastRefusedChain()
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.