diff options
author | Mark Wielaard <mark@klomp.org> | 2006-07-30 22:13:42 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2006-07-30 22:13:42 +0000 |
commit | 46e6d76ed076dddf5528f9cdca7588dca1a50597 (patch) | |
tree | 67682144432c792300e24ba05473b44c174a5ddf | |
parent | 87b96cef3271a298c5d20b95fd10d881343d680a (diff) | |
download | classpath-46e6d76ed076dddf5528f9cdca7588dca1a50597.tar.gz |
2006-07-30 Matt Wringe <mwringe@redhat.com>
* gnu/java/security/Engine.java
(getInstance): Ignore self referencing aliases.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gnu/java/security/Engine.java | 17 |
2 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,8 @@ +2006-07-30 Matt Wringe <mwringe@redhat.com> + + * gnu/java/security/Engine.java + (getInstance): Ignore self referencing aliases. + 2006-07-30 Mark Wielaard <mark@klomp.org> * javax/swing/JComponent.java (getListeners): Revert diff --git a/gnu/java/security/Engine.java b/gnu/java/security/Engine.java index 59a5d0e52..c6271e3f2 100644 --- a/gnu/java/security/Engine.java +++ b/gnu/java/security/Engine.java @@ -166,13 +166,16 @@ public final class Engine { alias = (String) provider.getProperty(key); - algorithm = alias; - if (count++ > MAX_ALIASES) - throw new NoSuchAlgorithmException("too many aliases"); - - // need to reset enumeration to now look for the alias - enumer = provider.propertyNames(); - + + if (! algorithm.equalsIgnoreCase(alias)) // does not refer to itself + { + algorithm = alias; + if (count++ > MAX_ALIASES) + throw new NoSuchAlgorithmException("too many aliases"); + + // need to reset enumeration to now look for the alias + enumer = provider.propertyNames(); + } } } |