|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.unboundid.util.ssl.PromptTrustManager
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class PromptTrustManager
This class provides an SSL trust manager that will interactively prompt the user to determine whether to trust any certificate that is presented to it. It provides the ability to cache information about certificates that had been previously trusted so that the user is not prompted about the same certificate repeatedly, and it can be configured to store trusted certificates in a file so that the trust information can be persisted.
| Constructor Summary | |
|---|---|
PromptTrustManager()
Creates a new instance of this prompt trust manager. |
|
PromptTrustManager(java.lang.String acceptedCertsFile)
Creates a new instance of this prompt trust manager. |
|
PromptTrustManager(java.lang.String acceptedCertsFile,
boolean examineValidityDates,
java.io.InputStream in,
java.io.PrintStream out)
Creates a new instance of this prompt trust manager. |
|
| Method Summary | |
|---|---|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Checks to determine whether the provided client certificate chain should be trusted. |
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Checks to determine whether the provided server certificate chain should be trusted. |
boolean |
examineValidityDates()
Indicate whether to prompt about certificates contained in the cache if the current time is outside the validity window for the certificate. |
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Retrieves the accepted issuer certificates for this trust manager. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PromptTrustManager()
public PromptTrustManager(java.lang.String acceptedCertsFile)
acceptedCertsFile - The path to a file in which the certificates
that have been previously accepted will be
cached. It may be null if the cache
should only be maintained in memory.
public PromptTrustManager(java.lang.String acceptedCertsFile,
boolean examineValidityDates,
java.io.InputStream in,
java.io.PrintStream out)
acceptedCertsFile - The path to a file in which the certificates
that have been previously accepted will be
cached. It may be null if the cache
should only be maintained in memory.examineValidityDates - Indicates whether to reject certificates if
the current time is outside the validity
window for the certificate.in - The input stream that will be used to read
input from the user. If this is null
then System.in will be used.out - The print stream that will be used to display
the prompt to the user. If this is
null then System.out will be used.| Method Detail |
|---|
public boolean examineValidityDates()
true if the certificate validity time should be examined
for cached certificates and the user should be prompted if they
are expired or not yet valid, or false if cached
certificates should be accepted even outside of the validity
window.
public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
throws java.security.cert.CertificateException
checkClientTrusted in interface javax.net.ssl.X509TrustManagerchain - The client certificate chain for which to make the
determination.authType - The authentication type based on the client certificate.
java.security.cert.CertificateException - If the provided client certificate chain
should not be trusted.
public void checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
throws java.security.cert.CertificateException
checkServerTrusted in interface javax.net.ssl.X509TrustManagerchain - The server certificate chain for which to make the
determination.authType - The key exchange algorithm used.
java.security.cert.CertificateException - If the provided server certificate chain
should not be trusted.public java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface javax.net.ssl.X509TrustManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||