harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r478857 - /harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
Date Fri, 24 Nov 2006 12:26:31 GMT
Author: tellison
Date: Fri Nov 24 04:26:29 2006
New Revision: 478857

URL: http://svn.apache.org/viewvc?view=rev&rev=478857
Log:
Fix HARMONY-2163 ([classlib][security] Changing system property java.home may cause incorrect
initialization of java.security.Security class)
Define default providers where the java.security file cannot be found.

Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java?view=diff&rev=478857&r1=478856&r2=478857
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/main/java/common/java/security/Security.java
Fri Nov 24 04:26:29 2006
@@ -53,8 +53,7 @@
     // static inicialization
     // - load security properties files
     // - load staticaly registered providers
-    // - if no provider description file found then load
-    // DRL default providers
+    // - if no provider description file found then load default providers
     static {
         AccessController.doPrivileged(new java.security.PrivilegedAction() {
             public Object run() {
@@ -109,7 +108,7 @@
                     }
                 }
                 if (!loaded) {
-                    registerDRLProviders();
+                    registerDefaultProviders();
                 }
                 Engine.door = new SecurityDoor();
                 return null;
@@ -123,11 +122,12 @@
     private Security() {
     }
 
-    // Register default DRL providers
-    private static void registerDRLProviders() {
-        //     TODO register DRL default providers
-//        System.err.println("Security properties file not loaded \n"
-//                + "No providers registered.");
+    // Register default providers
+    private static void registerDefaultProviders() {
+        secprops.put("security.provider.1", "org.apache.harmony.security.provider.cert.DRLCertFactory");
 //$NON-NLS-1$ //$NON-NLS-2$
+        secprops.put("security.provider.2", "org.apache.harmony.security.provider.crypto.CryptoProvider");
 //$NON-NLS-1$ //$NON-NLS-2$
+        secprops.put("security.provider.3", "org.apache.harmony.xnet.provider.jsse.JSSEProvider");
 //$NON-NLS-1$ //$NON-NLS-2$
+        secprops.put("security.provider.4", "org.bouncycastle.jce.provider.BouncyCastleProvider");
 //$NON-NLS-1$ //$NON-NLS-2$
     }
 
 	/**



Mime
View raw message