directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r494314 - /directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
Date Tue, 09 Jan 2007 04:51:18 GMT
Author: trustin
Date: Mon Jan  8 20:51:17 2007
New Revision: 494314

URL: http://svn.apache.org/viewvc?view=rev&rev=494314
Log:
Fixed NoSuchAlgorithmException in LdapsInitializer


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

Modified: directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java?view=diff&rev=494314&r1=494313&r2=494314
==============================================================================
--- directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
(original)
+++ directory/trunks/apacheds/server-ssl/src/main/java/org/apache/directory/server/ssl/LdapsInitializer.java
Mon Jan  8 20:51:17 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