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.
| 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) |
X509Certificate[] |
getAcceptedIssuers() |
List<X509ExtendedTrustManager> |
getTrustManagers() |
int |
size() |
public CompositeX509ExtendedTrustManager(List<? extends X509ExtendedTrustManager> trustManagers)
public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
CertificateExceptionpublic 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
CertificateExceptionpublic 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()
public int size()
public List<X509ExtendedTrustManager> getTrustManagers()
Copyright © 2021. All rights reserved.