summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2006-07-30 22:13:42 +0000
committerMark Wielaard <mark@klomp.org>2006-07-30 22:13:42 +0000
commit46e6d76ed076dddf5528f9cdca7588dca1a50597 (patch)
tree67682144432c792300e24ba05473b44c174a5ddf
parent87b96cef3271a298c5d20b95fd10d881343d680a (diff)
downloadclasspath-46e6d76ed076dddf5528f9cdca7588dca1a50597.tar.gz
2006-07-30 Matt Wringe <mwringe@redhat.com>
* gnu/java/security/Engine.java (getInstance): Ignore self referencing aliases.
-rw-r--r--ChangeLog5
-rw-r--r--gnu/java/security/Engine.java17
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 2f58a1740..2f27fd043 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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();
+ }
}
}