com.atlassian.crowd.directory.ssl
Class LdapHostnameVerificationSSLSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by com.atlassian.crowd.directory.ssl.LdapHostnameVerificationSSLSocketFactory

public class LdapHostnameVerificationSSLSocketFactory
extends javax.net.SocketFactory

This SocketFactory needs to call sun.security.ssl.SSLSocketFactoryImpl#trySetHostnameVerification so it goes out of its way to check for the sun.security.ssl implementation of the security classes.

The Mac OS X packaging uses com.sun.net.ssl.internal.ssl, rather than sun.security, so reflection is used to work with both.


Method Summary
 java.net.Socket createSocket()
           
 java.net.Socket createSocket(java.net.InetAddress host, int port)
           
 java.net.Socket createSocket(java.net.InetAddress address, int port, java.net.InetAddress localAddress, int localPort)
           
 java.net.Socket createSocket(java.lang.String host, int port)
           
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localHost, int localPort)
           
static javax.net.SocketFactory getDefault()
           
static boolean isInSunSslImplementationPackage(java.lang.Class<?> c, java.lang.String expectedName)
          The Mac OS X packaging uses com.sun.net.ssl.internal.ssl, rather than sun.security.ssl, so this method checks both.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDefault

public static javax.net.SocketFactory getDefault()

isInSunSslImplementationPackage

public static boolean isInSunSslImplementationPackage(java.lang.Class<?> c,
                                                      java.lang.String expectedName)
The Mac OS X packaging uses com.sun.net.ssl.internal.ssl, rather than sun.security.ssl, so this method checks both.


createSocket

public java.net.Socket createSocket(java.net.InetAddress address,
                                    int port,
                                    java.net.InetAddress localAddress,
                                    int localPort)
                             throws java.io.IOException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.net.InetAddress host,
                                    int port)
                             throws java.io.IOException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localHost,
                                    int localPort)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

createSocket

public java.net.Socket createSocket()
                             throws java.io.IOException
Overrides:
createSocket in class javax.net.SocketFactory
Throws:
java.io.IOException


Copyright © 2012 Atlassian. All Rights Reserved.