|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.util.ssl.TrustStoreTrustManager
public final class TrustStoreTrustManager
This class provides an SSL trust manager that will consult a specified trust store file to determine whether to trust a certificate that is presented to it. By default, it will use the default trust store format for the JVM (e.g., "JKS" for Sun-provided Java implementations), but alternate formats like PKCS12 may be used.
Constructor Summary | |
---|---|
TrustStoreTrustManager(java.io.File trustStoreFile)
Creates a new instance of this trust store trust manager that will trust all certificates in the specified file within the validity window. |
|
TrustStoreTrustManager(java.io.File trustStoreFile,
char[] trustStorePIN,
java.lang.String trustStoreFormat,
boolean examineValidityDates)
Creates a new instance of this trust store trust manager that will trust all certificates in the specified file with the specified constraints. |
|
TrustStoreTrustManager(java.lang.String trustStoreFile)
Creates a new instance of this trust store trust manager that will trust all certificates in the specified file within the validity window. |
|
TrustStoreTrustManager(java.lang.String trustStoreFile,
char[] trustStorePIN,
java.lang.String trustStoreFormat,
boolean examineValidityDates)
Creates a new instance of this trust store trust manager that will trust all certificates in the specified file with the specified constraints. |
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 reject certificates 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. |
java.lang.String |
getTrustStoreFile()
Retrieves the path to the trust store file to use. |
java.lang.String |
getTrustStoreFormat()
Retrieves the name of the trust store file format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrustStoreTrustManager(java.io.File trustStoreFile)
trustStoreFile
- The path to the trust store file to use. It must
not be null
.public TrustStoreTrustManager(java.lang.String trustStoreFile)
trustStoreFile
- The path to the trust store file to use. It must
not be null
.public TrustStoreTrustManager(java.io.File trustStoreFile, char[] trustStorePIN, java.lang.String trustStoreFormat, boolean examineValidityDates)
trustStoreFile
- The path to the trust store file to use. It
must not be null
.trustStorePIN
- The PIN to use to access the contents of the
trust store. It may be null
if no
PIN is required.trustStoreFormat
- The format to use for the trust store. It
may be null
if the default format
should be used.examineValidityDates
- Indicates whether to reject certificates if
the current time is outside the validity
window for the certificate.public TrustStoreTrustManager(java.lang.String trustStoreFile, char[] trustStorePIN, java.lang.String trustStoreFormat, boolean examineValidityDates)
trustStoreFile
- The path to the trust store file to use. It
must not be null
.trustStorePIN
- The PIN to use to access the contents of the
trust store. It may be null
if no
PIN is required.trustStoreFormat
- The format to use for the trust store. It
may be null
if the default format
should be used.examineValidityDates
- Indicates whether to reject certificates if
the current time is outside the validity
window for the certificate.Method Detail |
---|
public java.lang.String getTrustStoreFile()
public java.lang.String getTrustStoreFormat()
public boolean examineValidityDates()
true
if the certificate validity time should be examined
and certificates should be rejected if they are expired or not
yet valid, or false
if 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.X509TrustManager
chain
- 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.X509TrustManager
chain
- 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 |