codec.util
Class CertificateIterator
java.lang.Object
|
+--codec.util.CertificateIterator
- All Implemented Interfaces:
- Iterator
- public class CertificateIterator
- extends Object
- implements Iterator
This Iterator wraps around the
Iterator of e.g.
a List of certificates and filters certificates that match
particular parameters such as a given subject DN and/or key usage bits.
- Version:
- "$Id: CertificateIterator.java,v 1.4 2000/12/06 17:47:34 vroth Exp $"
- Author:
- Volker Roth
|
Constructor Summary |
CertificateIterator(Principal subject,
int usage,
Iterator i)
Creates an instance which iterates certificates with the given subject DN
and at least one of the given key usage extension bits set (unless
usage is 0 which acts as a wildcard that matches any key
key usage bits as well as no key usage bits at all). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CertificateIterator
public CertificateIterator(Principal subject,
int usage,
Iterator i)
- Creates an instance which iterates certificates with the given subject DN
and at least one of the given key usage extension bits set (unless
usage is 0 which acts as a wildcard that matches any key
key usage bits as well as no key usage bits at all).
- Parameters:
subject - The subject DN that must be matched. If
subject is null then any
subject DN is matched.usage - The key usage bits that must be matched. At least one of
the given bits must be true
for a match.
The bits in usage are alternatives and
represent an OR query. In order to query
for key usage bit n, bit number n must be
set in usage
. If usage is 0
then no key usage bits are checked (hence 0 acts as a
wildcard that matches any key usage bit including no bits
at all).i - The Iterator that is wrapped by this
instance.- Throws:
NullPointerException - if i is null.IllegalArgumentException - if subject
is not
null and cannot be parsed
into a Name.
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator
next
public Object next()
throws NoSuchElementException
- Specified by:
next in interface Iterator
remove
public void remove()
- Specified by:
remove in interface Iterator
- Throws:
UnsupportedOperationException - always.
Copyright © Fraunhofer Gesellschaft. All Rights Reserved.