public class TrustAllClientsWrappingTrustManager extends Object implements X509TrustManager
| Modifier and Type | Class and Description |
|---|---|
static class |
TrustAllClientsWrappingTrustManager.Wrapper
Wrapper factory class that wraps existing X509TrustManagers into
X509TrustManagers that trust any clients.
|
| Constructor and Description |
|---|
TrustAllClientsWrappingTrustManager(X509TrustManager trustManager)
Creates a new instance from an existing X509TrustManager.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkClientTrusted(X509Certificate[] chain,
String authType)
Checks that the client is trusted; in this case, it accepts anything.
|
void |
checkServerTrusted(X509Certificate[] chain,
String authType)
Checks that the server is trusted; in this case, it delegates this check
to the trust manager it wraps.
|
X509Certificate[] |
getAcceptedIssuers()
Returns the accepted issuers; in this case, it's an empty array.
|
public TrustAllClientsWrappingTrustManager(X509TrustManager trustManager)
trustManager - X509TrustManager to wrap.public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted in interface X509TrustManagerCertificateExceptionpublic void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted in interface X509TrustManagerCertificateExceptionpublic X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers in interface X509TrustManagerCopyright © 2017. All rights reserved.