org.wikibooks.en.wiki.WebObjects.Web_Services.How_to_Trust_Any_SSL_Certificate
Class _FakeX509TrustManager

java.lang.Object
  extended by org.wikibooks.en.wiki.WebObjects.Web_Services.How_to_Trust_Any_SSL_Certificate._FakeX509TrustManager
All Implemented Interfaces:
com.sun.net.ssl.TrustManager, com.sun.net.ssl.X509TrustManager

Deprecated. see FakeX509TrustManager.

public class _FakeX509TrustManager
extends java.lang.Object
implements com.sun.net.ssl.X509TrustManager

This class allow any X509 certificates to be used to authenticate the remote side of a secure socket, including self-signed certificates. This class uses the old deprecated API from the com.sun.ssl package.

Author:
Francis Labrie

Constructor Summary
_FakeX509TrustManager()
          Deprecated.  
 
Method Summary
 java.security.cert.X509Certificate[] getAcceptedIssuers()
          Deprecated. Return an empty array of certificate authority certificates which are trusted for authenticating peers.
 boolean isClientTrusted(java.security.cert.X509Certificate[] chain)
          Deprecated. Always return true, trusting for client SSL chain peer certificate chain.
 boolean isServerTrusted(java.security.cert.X509Certificate[] chain)
          Deprecated. Always return true, trusting for server SSL chain peer certificate chain.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

_FakeX509TrustManager

public _FakeX509TrustManager()
Deprecated. 
Method Detail

isClientTrusted

public boolean isClientTrusted(java.security.cert.X509Certificate[] chain)
Deprecated. 
Always return true, trusting for client SSL chain peer certificate chain.

Specified by:
isClientTrusted in interface com.sun.net.ssl.X509TrustManager
Parameters:
chain - the peer certificate chain.
Returns:
the true boolean value indicating the chain is trusted.

isServerTrusted

public boolean isServerTrusted(java.security.cert.X509Certificate[] chain)
Deprecated. 
Always return true, trusting for server SSL chain peer certificate chain.

Specified by:
isServerTrusted in interface com.sun.net.ssl.X509TrustManager
Parameters:
chain - the peer certificate chain.
Returns:
the true boolean value indicating the chain is trusted.

getAcceptedIssuers

public java.security.cert.X509Certificate[] getAcceptedIssuers()
Deprecated. 
Return an empty array of certificate authority certificates which are trusted for authenticating peers.

Specified by:
getAcceptedIssuers in interface com.sun.net.ssl.X509TrustManager
Returns:
a empty array of issuer certificates.