/[classpath]/classpath/java/security/Security.java
ViewVC logotype

Diff of /classpath/java/security/Security.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.21 by iproetel, Mon Aug 11 09:01:06 2003 UTC revision 1.22 by mark, Thu Aug 14 16:32:53 2003 UTC
# Line 63  public final class Security extends Obje Line 63  public final class Security extends Obje
63  {  {
64    private static final String ALG_ALIAS = "Alg.Alias.";    private static final String ALG_ALIAS = "Alg.Alias.";
65    
66    private static final Vector providers_lazy = new Vector();    private static final Vector providersList = new Vector();
67    private static boolean providers_lazy_set = false;    private static boolean providersInited = false;
68    private static Properties secprops = new Properties();    private static Properties secprops = new Properties();
69        
70    /**    /**
# Line 75  public final class Security extends Obje Line 75  public final class Security extends Obje
75     */     */
76    private static Vector providers()    private static Vector providers()
77    {    {
78      synchronized (providers_lazy)      synchronized (providersList)
79        {        {
80        if (!providers_lazy_set)          if (!providersInited)
81          {            {
82          String base = System.getProperty("gnu.classpath.home.url");              providersInited = true;
83          String vendor = System.getProperty("gnu.classpath.vm.shortname");              String base = System.getProperty("gnu.classpath.home.url");
84                String vendor = System.getProperty("gnu.classpath.vm.shortname");
85          // Try VM specific security file              
86          boolean loaded = loadProviders(base, vendor);              // Try VM specific security file
87                    boolean loaded = loadProviders(base, vendor);
88          // Append classpath standard provider if possible              
89          if (!loadProviders(base, "classpath") && !loaded && providers_lazy.size() == 0)              // Append classpath standard provider if possible
90            {              if (!loadProviders(base, "classpath")
91                // No providers found and both security files failed to load properly.                  && !loaded && providersList.size() == 0)
92                System.err.println                {
93                ("WARNING: could not properly read security provider files:");                  // No providers found
94            System.err.println                  // and both security files failed to load properly.
95            ("         " + base + "/security/" + vendor + ".security");                  System.err.println
96            System.err.println                    ("WARNING: "
97            ("         " + base + "/security/" + "classpath" + ".security");                     + "could not properly read security provider files:");
98            System.err.println                  System.err.println
99            ("         Falling back to standard GNU security provider");                    ("         "
100            providers_lazy.addElement(new gnu.java.security.provider.Gnu());                     + base + "/security/" + vendor + ".security");
101            }                  System.err.println
102          }                    ("         "
103                       + base + "/security/" + "classpath" + ".security");
104                    System.err.println
105                      ("         Falling back to standard GNU security provider");
106                    providersList.addElement(new gnu.java.security.provider.Gnu());
107                  }
108              }
109        }        }
110        return providers_lazy;      return providersList;
111    }    }
112        
113    

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26