directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r573167 - in /directory/studio/trunk: studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/ studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/
Date Thu, 06 Sep 2007 07:11:44 GMT
Author: seelmann
Date: Thu Sep  6 00:11:44 2007
New Revision: 573167

URL: http://svn.apache.org/viewvc?rev=573167&view=rev
Log:
Fixed problem with SSL connection

Removed:
    directory/studio/trunk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/internal/model/DummySSLSocketFactory.java
Modified:
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java?rev=573167&r1=573166&r2=573167&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/DummySSLSocketFactory.java
Thu Sep  6 00:11:44 2007
@@ -29,6 +29,7 @@
 import java.security.cert.CertificateException;
 import java.security.cert.X509Certificate;
 
+import javax.net.SocketFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSocketFactory;
 import javax.net.ssl.TrustManager;
@@ -44,6 +45,27 @@
 public class DummySSLSocketFactory extends SSLSocketFactory
 {
 
+    /** The default instance. */
+    private static SocketFactory instance;
+
+
+    /**
+     * Gets the default instance.
+     * 
+     * Note: This method is invoked from the JNDI framework when 
+     * creating a ldaps:// connection.
+     * 
+     * @return the default instance
+     */
+    public static SocketFactory getDefault()
+    {
+        if ( instance == null )
+        {
+            instance = new DummySSLSocketFactory();
+        }
+        return instance;
+    }
+
     /** The delegate. */
     private SSLSocketFactory delegate;
 
@@ -77,7 +99,6 @@
             SSLContext sc = SSLContext.getInstance( "TLS" ); //$NON-NLS-1$
             sc.init( null, tma, new SecureRandom() );
             delegate = sc.getSocketFactory();
-
         }
         catch ( Exception e )
         {



Mime
View raw message