openejb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r453293 - /incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/config/ssl/SSLConfig.java
Date Thu, 05 Oct 2006 17:33:16 GMT
Author: djencks
Date: Thu Oct  5 10:33:15 2006
New Revision: 453293

URL: http://svn.apache.org/viewvc?view=rev&rev=453293
Log:
OPENEJB-278 fix SSLConfig default algorithm handling

Modified:
    incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/config/ssl/SSLConfig.java

Modified: incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/config/ssl/SSLConfig.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/config/ssl/SSLConfig.java?view=diff&rev=453293&r1=453292&r2=453293
==============================================================================
--- incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/config/ssl/SSLConfig.java
(original)
+++ incubator/openejb/trunk/openejb2/modules/openejb-core/src/main/java/org/apache/openejb/corba/security/config/ssl/SSLConfig.java
Thu Oct  5 10:33:15 2006
@@ -96,6 +96,10 @@
      */
     public SSLSocketFactory createSSLFactory(ClassLoader loader) throws KeystoreIsLocked,
KeyIsLocked, NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, KeyManagementException,
NoSuchProviderException {
         if (manager != null) {
+            // fix up the default algorithm now. 
+            if ("default".equalsIgnoreCase(algorithm)) {
+                this.algorithm = KeyManagerFactory.getDefaultAlgorithm();
+            }
             // the keystore manager does all of the heavy lifting
             return manager.createSSLFactory(provider, protocol, algorithm, keyStore, keyAlias,
trustStore, loader);
         }
@@ -128,6 +132,10 @@
      */
     public SSLServerSocketFactory createSSLServerFactory(ClassLoader loader) throws KeystoreIsLocked,
KeyIsLocked, NoSuchAlgorithmException, UnrecoverableKeyException, KeyStoreException, KeyManagementException,
NoSuchProviderException {
         if (manager != null) {
+            // fix up the default algorithm now. 
+            if ("default".equalsIgnoreCase(algorithm)) {
+                this.algorithm = KeyManagerFactory.getDefaultAlgorithm();
+            }
             // the keystore manager does all of the heavy lifting
             return manager.createSSLServerFactory(provider, protocol, algorithm, keyStore,
keyAlias, trustStore, loader);
         }
@@ -192,10 +200,7 @@
      */
     public void setAlgorithm(String algorithm) {
         // cache the value so the null
-        algorithm = algorithm;
-        if ("default".equalsIgnoreCase(algorithm)) {
-            algorithm = KeyManagerFactory.getDefaultAlgorithm();
-        }
+        this.algorithm = algorithm;
     }
 
     /**



Mime
View raw message