@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AggregateTrustManager extends java.lang.Object implements javax.net.ssl.X509TrustManager
Constructor and Description |
---|
AggregateTrustManager(boolean requireAllAccepted,
java.util.Collection<javax.net.ssl.X509TrustManager> trustManagers)
Creates a new aggregate trust manager with the provided information.
|
AggregateTrustManager(boolean requireAllAccepted,
javax.net.ssl.X509TrustManager... trustManagers)
Creates a new aggregate trust manager with the provided information.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.security.cert.X509Certificate[] |
getAcceptedIssuers()
Retrieves the accepted issuer certificates for this trust manager.
|
java.util.List<javax.net.ssl.X509TrustManager> |
getAssociatedTrustManagers()
Retrieves the set of trust managers that will be used to perform the
validation.
|
boolean |
requireAllAccepted()
Indicates whether all of the associated trust managers will be required to
accept a given certificate for it to be considered acceptable.
|
public AggregateTrustManager(boolean requireAllAccepted, @NotNull javax.net.ssl.X509TrustManager... trustManagers)
requireAllAccepted
- Indicates whether all of the associated trust
managers must accept a presented certificate
for it to be allowed, or just at least one of
them.trustManagers
- The set of trust managers to use to make the
determination. It must not be null
or
empty.public AggregateTrustManager(boolean requireAllAccepted, @NotNull java.util.Collection<javax.net.ssl.X509TrustManager> trustManagers)
requireAllAccepted
- Indicates whether all of the associated trust
managers must accept a presented certificate
for it to be allowed, or just at least one of
them.trustManagers
- The set of trust managers to use to make the
determination. It must not be null
or
empty.public boolean requireAllAccepted()
true
if all of the associated trust managers will be
required to accept the provided certificate chain, or
false
if it will be acceptable for at least one trust
manager to accept the chain even if one or more others do not.@NotNull public java.util.List<javax.net.ssl.X509TrustManager> getAssociatedTrustManagers()
public void checkClientTrusted(@NotNull java.security.cert.X509Certificate[] chain, @NotNull 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(@NotNull java.security.cert.X509Certificate[] chain, @NotNull 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.@NotNull public java.security.cert.X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface javax.net.ssl.X509TrustManager