|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jsslutils.sslcontext.trustmanagers.TrustAllServersWrappingTrustManager
public class TrustAllServersWrappingTrustManager
TrustManager that accepts all server certificates as trusted; BE VERY CAREFUL, THIS WILL MAKE YOUR CONNECTION INSECURE.
Nested Class Summary | |
---|---|
static class |
TrustAllServersWrappingTrustManager.Wrapper
Wrapper factory class that wraps existing X509TrustManagers into X509TrustManagers that trust any clients. |
Constructor Summary | |
---|---|
TrustAllServersWrappingTrustManager(X509TrustManager trustManager)
Creates a new instance from an existing X509TrustManager. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TrustAllServersWrappingTrustManager(X509TrustManager trustManager)
trustManager
- X509TrustManager to wrap.Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |