SecurityRandom (digest): Removed field.

2002-12-13  Casey Marshall  <rsdio@metastatic.org>
	    Mark Wielaard  <mark@klomp.org>

	* java/security/SecurityRandom (digest): Removed field.
	(SecureRandom): Check all providers for case-insensitive SecureRandom
	implementation. Don't ignore classname == null. Fallback to SHA1PRNG
	if necessary.
	(getInstance(String,Provider,boolean): New method.
	(getInstance(String)): Use new method.
	(getInstance(String,String)): Likewise.
	(getInstance(String,Provider)): Likewise.

2002-12-13  Casey Marshall  <rsdio@metastatic.org>

	* java/security/Security.java (loadProviders): Increment i only once.

Co-Authored-By: Mark Wielaard <mark@klomp.org>

From-SVN: r60099
This commit is contained in:
Casey Marshall 2002-12-13 14:21:07 +00:00 committed by Mark Wielaard
parent 697d8028c2
commit b4f145f326
3 changed files with 128 additions and 90 deletions

View file

@ -89,7 +89,7 @@ public final class Security extends Object
int i = 1;
String name;
while ((name = secprops.getProperty("security.provider." + i++)) !=
while ((name = secprops.getProperty("security.provider." + i)) !=
null)
{
Exception exception = null;
@ -97,7 +97,6 @@ public final class Security extends Object
try
{
providers.addElement(Class.forName(name).newInstance());
i++;
}
catch (ClassNotFoundException x)
{
@ -114,6 +113,7 @@ public final class Security extends Object
if (exception != null)
System.err.println ("Error loading security provider " + name
+ ": " + exception);
i++;
}
}
catch (FileNotFoundException ignored)