summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMatt Wringe <mwringe@redhat.com>2006-07-30 20:34:50 +0000
committerMatt Wringe <mwringe@redhat.com>2006-07-30 20:34:50 +0000
commit5816d12becfafbb60024f0107a0321d4e5e8b64a (patch)
treeb45b8aa5d3bd8a09132c49e377a6f6eca854fa05 /gnu
parentf4df190ddc38b931eea27551323af4b9d38a76a3 (diff)
downloadclasspath-5816d12becfafbb60024f0107a0321d4e5e8b64a.tar.gz
2006-07-30 Matt Wringe <mwringe@redhat.com>
* gnu/java/security/Engine.java (getInstance): Ignore self referencing aliases.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/java/security/Engine.java17
1 files changed, 10 insertions, 7 deletions
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();
+ }
}
}