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

java.lang.Object
  extended by org.wikibooks.en.wiki.WebObjects.Web_Services.How_to_Trust_Any_SSL_Certificate.FakeHostnameVerifier
All Implemented Interfaces:
javax.net.ssl.HostnameVerifier

public class FakeHostnameVerifier
extends java.lang.Object
implements javax.net.ssl.HostnameVerifier

This class implements a fake hostname verificator, trusting any host name.

Author:
Francis Labrie

Constructor Summary
FakeHostnameVerifier()
           
 
Method Summary
 boolean verify(java.lang.String hostname, javax.net.ssl.SSLSession session)
          Always return true, indicating that the host name is an acceptable match with the server's authentication scheme.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeHostnameVerifier

public FakeHostnameVerifier()
Method Detail

verify

public boolean verify(java.lang.String hostname,
                      javax.net.ssl.SSLSession session)
Always return true, indicating that the host name is an acceptable match with the server's authentication scheme.

Specified by:
verify in interface javax.net.ssl.HostnameVerifier
Parameters:
hostname - the host name.
session - the SSL session used on the connection to host.
Returns:
the true boolean value indicating the host name is trusted.