org.openmdx.base.net.ssl
Class LenientHostnameVerifier

java.lang.Object
  extended by org.openmdx.base.net.ssl.AbstractHostnameVerifier
      extended by org.openmdx.base.net.ssl.LenientHostnameVerifier
All Implemented Interfaces:
HostnameVerifier

public class LenientHostnameVerifier
extends AbstractHostnameVerifier

Lenient Hostname Verifier

Accepts for example a certificate with the common name "*.openmdx.org" to access "any.level.of.sub-domains.openmdx.org".


Constructor Summary
protected LenientHostnameVerifier()
          Constructor
 
Method Summary
static HostnameVerifier getInstance()
          Return an instance of WildcardCertificateAwareHostnameVerifier
protected  boolean matches(String hostName, String commonName)
          Tests whether the host name matches a given wildcard common name
 
Methods inherited from class org.openmdx.base.net.ssl.AbstractHostnameVerifier
getCommonName, verify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LenientHostnameVerifier

protected LenientHostnameVerifier()
Constructor

Method Detail

getInstance

public static HostnameVerifier getInstance()
Return an instance of WildcardCertificateAwareHostnameVerifier

Returns:
the pre-allocated instance

matches

protected boolean matches(String hostName,
                          String commonName)
Description copied from class: AbstractHostnameVerifier
Tests whether the host name matches a given wildcard common name

This method is usually overridden by a subclass as JSSE does not call the HostnameVerifier interceptor if the given expression evaluates to true.

Overrides:
matches in class AbstractHostnameVerifier
Returns:
true if the host name matches the given common name


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.