directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r494315 - /directory/branches/apacheds/1.0/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
Date Tue, 09 Jan 2007 04:55:16 GMT
Author: akarasulu
Date: Mon Jan  8 20:55:15 2007
New Revision: 494315

URL: http://svn.apache.org/viewvc?view=rev&rev=494315
Log:
merging fix from trustin to 1.0 branch

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

Modified: directory/branches/apacheds/1.0/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java?view=diff&rev=494315&r1=494314&r2=494315
==============================================================================
--- directory/branches/apacheds/1.0/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
(original)
+++ directory/branches/apacheds/1.0/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
Mon Jan  8 20:55:15 2007
@@ -26,6 +26,7 @@
 import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
 import java.security.SecureRandom;
+import java.security.Security;
 import java.security.cert.CertificateException;
 
 import javax.naming.NamingException;
@@ -78,7 +79,12 @@
         try
         {
             // Set up key manager factory to use our key store
-            KeyManagerFactory kmf = KeyManagerFactory.getInstance( "SunX509" );
+            String algorithm = Security.getProperty( "ssl.KeyManagerFactory.algorithm" );
+            if( algorithm == null )
+            {
+                algorithm = "SunX509";
+            }
+            KeyManagerFactory kmf = KeyManagerFactory.getInstance( algorithm );
             kmf.init( ks, certPasswdChars );
 
             // Initialize the SSLContext to work with our key managers.



Mime
View raw message