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 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
 Socket createSocket()
           
 Socket createSocket(InetAddress host, int port)
           
 Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
           
 Socket createSocket(String host, int port)
           
 Socket createSocket(String host, int port, InetAddress localHost, int localPort)
           
static SocketFactory getDefault()
           
static boolean isInSunSslImplementationPackage(Class<?> c, 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 SocketFactory getDefault()

isInSunSslImplementationPackage

public static boolean isInSunSslImplementationPackage(Class<?> c,
                                                      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 Socket createSocket(InetAddress address,
                           int port,
                           InetAddress localAddress,
                           int localPort)
                    throws IOException
Specified by:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(InetAddress host,
                           int port)
                    throws IOException
Specified by:
createSocket in class SocketFactory
Throws:
IOException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in class SocketFactory
Throws:
IOException
UnknownHostException

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress localHost,
                           int localPort)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in class SocketFactory
Throws:
IOException
UnknownHostException

createSocket

public Socket createSocket()
                    throws IOException
Overrides:
createSocket in class SocketFactory
Throws:
IOException


Copyright © 2013 Atlassian. All Rights Reserved.