public class TrustAllServersWrappingTrustManager extends Object implements X509TrustManager
Modifier and Type | Class and Description |
---|---|
static class |
TrustAllServersWrappingTrustManager.Wrapper
Wrapper factory class that wraps existing X509TrustManagers into
X509TrustManagers that trust any clients.
|
Constructor and Description |
---|
TrustAllServersWrappingTrustManager(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 delegates this check
to the trust manager it wraps
|
void |
checkServerTrusted(X509Certificate[] chain,
String authType)
Checks that the server is trusted; in this case, it accepts anything.
|
X509Certificate[] |
getAcceptedIssuers()
Returns the accepted issuers; in this case, it's an empty array.
|
public TrustAllServersWrappingTrustManager(X509TrustManager trustManager)
trustManager
- X509TrustManager to wrap.public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkClientTrusted
in interface X509TrustManager
CertificateException
public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException
checkServerTrusted
in interface X509TrustManager
CertificateException
public X509Certificate[] getAcceptedIssuers()
getAcceptedIssuers
in interface X509TrustManager
Copyright © 2013. All rights reserved.