public final class CompositeX509ExtendedTrustManager extends X509ExtendedTrustManager
CompositeX509ExtendedTrustManager is a wrapper for a collection of TrustManagers.
It has the ability to validate a certificate chain against multiple TrustManagers.
If any one of the composed managers trusts a certificate chain, then it is trusted by the composite manager.
The TrustManager can be build from one or more of any combination provided within the TrustManagerUtils.TrustManagerBuilder.
- Any amount of custom TrustManagers
- Any amount of custom TrustStores
NOTE:
Please don't use this class directly as it is part of the internal API. Class name and methods can be changed any time.
Instead use the TrustManagerUtils which provides the same functionality
while it has a stable API because it is part of the public API.
| Modifier and Type | Field and Description |
|---|---|
static String |
CERTIFICATE_EXCEPTION_MESSAGE |
| Constructor and Description |
|---|
CompositeX509ExtendedTrustManager(List<? extends X509ExtendedTrustManager> trustManagers) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType) |
void |
checkClientTrusted(X509Certificate[] chain,
String authType,
Socket socket) |
void |
checkClientTrusted(X509Certificate[] chain,
String authType,
SSLEngine sslEngine) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType,
Socket socket) |
void |
checkServerTrusted(X509Certificate[] chain,
String authType,
SSLEngine sslEngine) |
default void |
checkTrusted(nl.altindag.ssl.trustmanager.TrustManagerConsumer callBackConsumer) |
X509Certificate[] |
getAcceptedIssuers() |
List<X509ExtendedTrustManager> |
getTrustManagers() |
public static final String CERTIFICATE_EXCEPTION_MESSAGE
public CompositeX509ExtendedTrustManager(List<? extends X509ExtendedTrustManager> trustManagers)
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted in interface X509TrustManagerCertificateExceptionpublic void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException
checkClientTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine sslEngine) throws CertificateException
checkClientTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted in interface X509TrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException
checkServerTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine sslEngine) throws CertificateException
checkServerTrusted in class X509ExtendedTrustManagerCertificateExceptionpublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerpublic List<X509ExtendedTrustManager> getTrustManagers()
public void checkTrusted(nl.altindag.ssl.trustmanager.TrustManagerConsumer callBackConsumer)
throws CertificateException
CertificateExceptionCopyright © 2022. All rights reserved.