directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: r516601 - /directory/apacheds/branches/apacheds-sasl-branch/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
Date Fri, 09 Mar 2007 23:37:02 GMT
Author: erodriguez
Date: Fri Mar  9 15:37:01 2007
New Revision: 516601

URL: http://svn.apache.org/viewvc?view=rev&rev=516601
Log:
Update to remove a dependency on server-jndi.

Modified:
    directory/apacheds/branches/apacheds-sasl-branch/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java

Modified: directory/apacheds/branches/apacheds-sasl-branch/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-sasl-branch/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java?view=diff&rev=516601&r1=516600&r2=516601
==============================================================================
--- directory/apacheds/branches/apacheds-sasl-branch/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
(original)
+++ directory/apacheds/branches/apacheds-sasl-branch/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
Fri Mar  9 15:37:01 2007
@@ -34,7 +34,6 @@
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 
-import org.apache.directory.server.configuration.ServerStartupConfiguration;
 import org.apache.directory.server.ssl.support.ServerX509TrustManager;
 import org.apache.mina.common.DefaultIoFilterChainBuilder;
 import org.apache.mina.common.IoFilterChainBuilder;
@@ -51,12 +50,8 @@
  */
 public class LdapsInitializer
 {
-    public static IoFilterChainBuilder init( ServerStartupConfiguration cfg ) throws NamingException
+    public static IoFilterChainBuilder init( char[] certPasswordChars, String storePath )
throws NamingException
     {
-        // Load the certificate
-        char[] certPasswdChars = cfg.getLdapsCertificatePassword().toCharArray();
-        String storePath = cfg.getLdapsCertificateFile().getPath();
-
         KeyStore ks = null;
         try
         {
@@ -80,12 +75,12 @@
         {
             // Set up key manager factory to use our key store
             String algorithm = Security.getProperty( "ssl.KeyManagerFactory.algorithm" );
-            if( algorithm == null )
+            if ( algorithm == null )
             {
                 algorithm = "SunX509";
             }
             KeyManagerFactory kmf = KeyManagerFactory.getInstance( algorithm );
-            kmf.init( ks, certPasswdChars );
+            kmf.init( ks, certPasswordChars );
 
             // Initialize the SSLContext to work with our key managers.
             sslCtx = SSLContext.getInstance( "TLS" );



Mime
View raw message