Skip navigation links

Oracle Application Server HTTPClient Java API Reference
10g Release 3 (10.1.3.1.0)

B32117-01


HTTPClient
Class StandardHostnameVerifier

java.lang.Object
  extended byHTTPClient.StandardHostnameVerifier

All Implemented Interfaces:
javax.net.ssl.HostnameVerifier

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

The StandardHostnameVerifier is a HostnameVerifier which implements standard URL hostname matching rules for site identity checking. This is usually invoked immediately after establishing an SSL session.

The StandardHostameVerifier verifies the SSL session host name by checking that the given hostname (presumably from the request URL) case-insensitively equals the Common Name (CN) of the Distinguished Name (DN) from the first certificate in the SSL certificate chain.

Additionally, if enabled, StandardHostameVerifier will recognize and match the given hostname with a wildcard common name in the SSL certificate (e.g., *.oracle.com), if present.

See Also:
HostnameVerifier

Constructor Summary
StandardHostnameVerifier()
          Required public no-argument constructor NOTE: This constructor enables recognition of wildcard common names in SSL certificates, such as "*.oracle.com".
StandardHostnameVerifier(boolean recognizeWildcardCNs)
          Constructor specifying whether to recognize wildcard common names in SSL certificates, such as "*.oracle.com".

 

Method Summary
 boolean isRecognizeWildcardCNs()
          Determines whether to recognize wildcard common names in SSL certificates, such as "*.oracle.com".
 boolean setRecognizeWildcardCNs(boolean recognizeWildcardCNs)
          Specifies whether to recognize wildcard common names in certificates, such as "*.oracle.com".
 boolean verify(java.lang.String hostname, javax.net.ssl.SSLSession sslSession)
           

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

StandardHostnameVerifier

public StandardHostnameVerifier()
Required public no-argument constructor NOTE: This constructor enables recognition of wildcard common names in SSL certificates, such as "*.oracle.com".

StandardHostnameVerifier

public StandardHostnameVerifier(boolean recognizeWildcardCNs)
Constructor specifying whether to recognize wildcard common names in SSL certificates, such as "*.oracle.com".
Parameters:
recognizeWildcardCNs - true to recognize wildcard common names in SSL certificates.

Method Detail

isRecognizeWildcardCNs

public boolean isRecognizeWildcardCNs()
Determines whether to recognize wildcard common names in SSL certificates, such as "*.oracle.com".
Returns:
true to recognize wildcard common names in SSL certificates.

setRecognizeWildcardCNs

public boolean setRecognizeWildcardCNs(boolean recognizeWildcardCNs)
Specifies whether to recognize wildcard common names in certificates, such as "*.oracle.com".
Parameters:
recognizeWildcardCNs - true to recognize wildcard common names in SSL certificates.
Returns:
The previous value

verify

public boolean verify(java.lang.String hostname,
                      javax.net.ssl.SSLSession sslSession)
Specified by:
verify in interface javax.net.ssl.HostnameVerifier
See Also:
HostnameVerifier

Skip navigation links

Oracle Application Server HTTPClient Java API Reference
10g Release 3 (10.1.3.1.0)

B32117-01


Copyright © 2004, 2006, Oracle. All rights reserved.