public class JSSEX509TrustManager
extends javax.net.ssl.X509ExtendedTrustManager
implements javax.net.ssl.X509TrustManager
JSSEX509TrustManager class implements the
javax.net.ssl.X509TrustManager interface.
The javax.net.ssl.X509TrustManager interface is used
to initialize an SSLContext object to support X.509 authentication
to remote socket peers through JSSE. You can create an instance
of this class directly either by using the constructor or by using a
TrustManagerFactory engine.
For more information, see the SUN Microsystems API user's guide for the Java Secure Socket Extension (JSSE) version 1.0.2
JSSEX509TrustManagerFactory,
SSLContext| Constructor and Description |
|---|
JSSEX509TrustManager(CertVerifier certVerifier)
Creates a
JSSEX509TrustManager instance that uses the
indicated Entrust certificate validation mechanism for trust decisions. |
JSSEX509TrustManager(KeyAndCertContainer keyAndCertContainer)
Creates a
JSSEX509TrustManager instance that uses an
Entrust key/certificate container's certificate validation mechanism for
trust decisions. |
JSSEX509TrustManager(User user)
Creates a
JSSEX509TrustManager instance that uses an
Entrust user's certificate validation mechanism for trust decisions. |
JSSEX509TrustManager(java.security.cert.X509Certificate[] trustedRoots,
java.lang.String keyStoreType)
Creates an instance of the
JSSEX509TrustManager
class. |
JSSEX509TrustManager(java.security.cert.X509Certificate[] trustedRoots,
java.lang.String keyStoreType,
LdapDirectory directory,
ClientSettings settings)
Creates an instance of the
JSSEX509TrustManager
class. |
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Given the partial or complete certificate chain provided by the peer, build a
certificate path to a trusted root and return if it can be validated and is
trusted for client SSL authentication based on the authentication type.
|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.net.Socket socket)
Given the partial or complete certificate chain provided by the peer, build a
certificate path to a trusted root and return if it can be validated and is
trusted for client SSL authentication based on the authentication type.
|
void |
checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
javax.net.ssl.SSLEngine engine)
Given the partial or complete certificate chain provided by the peer, build a
certificate path to a trusted root and return if it can be validated and is
trusted for client SSL authentication based on the authentication type.
|
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
Given the partial or complete certificate chain provided by the peer,
build a certificate path to a trusted root and return if it can be
validated and is trusted for server SSL authentication based on the
authentication type.
|
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.net.Socket socket)
Given the partial or complete certificate chain provided by the peer,
build a certificate path to a trusted root and return if it can be
validated and is trusted for server SSL authentication based on the
authentication type.
|
void |
checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
javax.net.ssl.SSLEngine engine)
Given the partial or complete certificate chain provided by the peer,
build a certificate path to a trusted root and return if it can be
validated and is trusted for server SSL authentication based on the
authentication type.
|
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Retrieves the trusted root CA certificates.
|
public JSSEX509TrustManager(KeyAndCertContainer keyAndCertContainer) throws UserNotLoggedInException
JSSEX509TrustManager instance that uses an
Entrust key/certificate container's certificate validation mechanism for
trust decisions.keyAndCertContainer - an Entrust key/certificate containerUserNotLoggedInException - if the Entrust key/certificate container represents a user
that is not logged injava.lang.IllegalArgumentException - if the key/certificate container is not provided (null)
or does not contain a certificate validation mechanismpublic JSSEX509TrustManager(User user) throws UserNotLoggedInException
JSSEX509TrustManager instance that uses an
Entrust user's certificate validation mechanism for trust decisions.user - a logged in Entrust userUserNotLoggedInException - if the user is not logged injava.lang.IllegalArgumentException - if the user is not provided (null)public JSSEX509TrustManager(CertVerifier certVerifier)
JSSEX509TrustManager instance that uses the
indicated Entrust certificate validation mechanism for trust decisions.certVerifier - an Entrust certificate validation mechanismjava.lang.IllegalArgumentException - if the certificate validation mechanism is not provided (null)public JSSEX509TrustManager(java.security.cert.X509Certificate[] trustedRoots,
java.lang.String keyStoreType)
JSSEX509TrustManager
class.
trustedRoots - the trusted root CA certificateskeyStoreType - not usedpublic JSSEX509TrustManager(java.security.cert.X509Certificate[] trustedRoots,
java.lang.String keyStoreType,
LdapDirectory directory,
ClientSettings settings)
JSSEX509TrustManager
class.
trustedRoots - the trusted root CA certificateskeyStoreType - not usedLdapDirectory - the Ldap directory used for revocation checkingClientSettings - the ClientSettings to usepublic java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface javax.net.ssl.X509TrustManagerpublic void checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType)
throws java.security.cert.CertificateException
checkClientTrusted in interface javax.net.ssl.X509TrustManagerchain - - the peer certificate chainauthType - - the authentication type based on the client certificatejava.lang.IllegalArgumentException - - if null or zero-length chain is passed in for the chain parameter or if null or zero-length string is passed in for the authType parameterjava.security.cert.CertificateException - - if the certificate chain is not trusted by this TrustManager.X509TrustManager.checkClientTrusted(X509Certificate[], String)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 peer certificate chainauthType - - the key exchange algorithm usedjava.lang.IllegalArgumentException - - if null or zero-length chain is passed in for the chain parameter or if null or zero-length string is passed in for the authType parameterjava.security.cert.CertificateException - - if the certificate chain is not trusted by this TrustManager.X509TrustManager.checkServerTrusted(X509Certificate[], String)public void checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.net.Socket socket)
throws java.security.cert.CertificateException
checkClientTrusted in class javax.net.ssl.X509ExtendedTrustManagerchain - the certificate chain being checked for validityauthType - the key exchange algorithm usedsocket - the socket used by the connectionjava.security.cert.CertificateExceptionpublic void checkClientTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
javax.net.ssl.SSLEngine engine)
throws java.security.cert.CertificateException
checkClientTrusted in class javax.net.ssl.X509ExtendedTrustManagerchain - the certificate chain being checked for validityauthType - the key exchange algorithm usedengine - the SSLEngine used by the connectionjava.security.cert.CertificateExceptionpublic void checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
java.net.Socket socket)
throws java.security.cert.CertificateException
checkServerTrusted in class javax.net.ssl.X509ExtendedTrustManagerchain - the certificate chain being checked for validityauthType - the key exchange algorithm usedsocket - the socket used by the connectionjava.security.cert.CertificateExceptionpublic void checkServerTrusted(java.security.cert.X509Certificate[] chain,
java.lang.String authType,
javax.net.ssl.SSLEngine engine)
throws java.security.cert.CertificateException
checkServerTrusted in class javax.net.ssl.X509ExtendedTrustManagerchain - the certificate chain being checked for validityauthType - the key exchange algorithm usedengine - the SSLEngine used by the connectionjava.security.cert.CertificateException