diff options
| author | Matt Wringe <mwringe@redhat.com> | 2006-07-30 20:34:50 +0000 |
|---|---|---|
| committer | Matt Wringe <mwringe@redhat.com> | 2006-07-30 20:34:50 +0000 |
| commit | 5816d12becfafbb60024f0107a0321d4e5e8b64a (patch) | |
| tree | b45b8aa5d3bd8a09132c49e377a6f6eca854fa05 /gnu/java/security/Engine.java | |
| parent | f4df190ddc38b931eea27551323af4b9d38a76a3 (diff) | |
| download | classpath-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/java/security/Engine.java')
| -rw-r--r-- | gnu/java/security/Engine.java | 17 |
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(); + } } } |
