|
Bouncy Castle Cryptography 1.21 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--java.security.cert.X509CRLSelector
A CRLSelector that selects X509CRLs that
match all specified criteria. This class is particularly useful when
selecting CRLs from a CertStore to check revocation status
of a particular certificate.
When first constructed, an X509CRLSelector has no criteria
enabled and each of the get methods return a default
value (null). Therefore, the match method
would return true for any X509CRL. Typically,
several criteria are enabled (by calling setIssuerNames
or setDateAndTime, for instance) and then the
X509CRLSelector is passed to
CertStore.getCRLs or some similar
method.
Please refer to RFC 2459 for definitions of the X.509 CRL fields and
extensions mentioned below.
Concurrent Access
Unless otherwise specified, the methods defined in this class are not
thread-safe. Multiple threads that need to access a single
object concurrently should synchronize amongst themselves and
provide the necessary locking. Multiple threads each manipulating
separate objects need not synchronize.
Uses DERInputStream,
ASN1Sequence,
DERObjectIdentifier,
DEROutputStream,
DERObject,
X509Name and
_dumpAsString
CRLSelector,
X509CRL| Constructor Summary | |
X509CRLSelector()
Creates an X509CRLSelector. |
|
| Method Summary | |
void |
addIssuerName(byte[] name)
Adds a name to the issuerNames criterion. |
void |
addIssuerName(java.lang.String name)
Adds a name to the issuerNames criterion. |
java.lang.Object |
clone()
Returns a copy of this object. |
boolean |
equals(java.lang.Object obj)
Decides whether a CRL should be selected. |
X509Certificate |
getCertificateChecking()
Returns the certificate being checked. |
java.util.Date |
getDateAndTime()
Returns the dateAndTime criterion. |
Collection |
getIssuerNames()
Returns a copy of the issuerNames criterion. |
java.math.BigInteger |
getMaxCRL()
Returns the maxCRLNumber criterion. |
java.math.BigInteger |
getMinCRL()
Returns the minCRLNumber criterion. |
boolean |
match(CRL crl)
Decides whether a CRL should be selected.Uses X509Name.toString
to parse and to compare the crl parameter issuer and
CRLNumber to access
the CRL number extension. |
void |
setCertificateChecking(X509Certificate cert)
Sets the certificate being checked. |
void |
setDateAndTime(java.util.Date dateAndTime)
Sets the dateAndTime criterion. |
void |
setIssuerNames(Collection names)
Sets the issuerNames criterion. |
void |
setMaxCRLNumber(java.math.BigInteger maxCRL)
Sets the maxCRLNumber criterion. |
void |
setMinCRLNumber(java.math.BigInteger minCRL)
Sets the minCRLNumber criterion. |
java.lang.String |
toString()
Returns a printable representation of the X509CRLSelector.Uses X509Name.toString to format the output |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public X509CRLSelector()
X509CRLSelector. Initially, no criteria are set
so any X509CRL will match.
| Method Detail |
public void setIssuerNames(Collection names)
throws java.io.IOException
X509CRL must match at least one of the specified
distinguished names. If null, any issuer distinguished name
will do.X509CRLs may contain.
The specified value replaces the previous value for the issuerNames
criterion.names parameter (if not null) is a
Collection of names. Each name is a String
or a byte array representing a distinguished name (in RFC 2253 or
ASN.1 DER encoded form, respectively). If null is supplied
as the value for this argument, no issuerNames check will be performed.names parameter can contain duplicate
distinguished names, but they may be removed from the
Collection of names returned by the
getIssuerNames method.
Name ::= CHOICE {
RDNSequence }
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::=
SET SIZE (1 .. MAX) OF AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE {
type AttributeType,
value AttributeValue }
AttributeType ::= OBJECT IDENTIFIER
AttributeValue ::= ANY DEFINED BY AttributeType
....
DirectoryString ::= CHOICE {
teletexString TeletexString (SIZE (1..MAX)),
printableString PrintableString (SIZE (1..MAX)),
universalString UniversalString (SIZE (1..MAX)),
utf8String UTF8String (SIZE (1.. MAX)),
bmpString BMPString (SIZE (1..MAX)) }
Collection to
protect against subsequent modifications.
names - a Collection of names (or null)
java.io.IOException - if a parsing error occursgetIssuerNames()
public void addIssuerName(java.lang.String name)
throws java.io.IOException
X509CRL must match at least one of the specified
distinguished names.X509CRLs may contain. The specified name is added to
any previous value for the issuerNames criterion.
If the specified name is a duplicate, it may be ignored.X509Name for parsing the name
name - the name in RFC 2253 form
java.io.IOException - if a parsing error occurs
public void addIssuerName(byte[] name)
throws java.io.IOException
X509CRL must match at least one of the specified
distinguished names.X509CRLs may contain. The specified name is added to
any previous value for the issuerNames criterion. If the specified name
is a duplicate, it may be ignored.
If a name is specified as a byte array, it should contain a single DER
encoded distinguished name, as defined in X.501. The ASN.1 notation for
this structure is as follows.setIssuerNames(Collection names).X509Name for parsing the name,
DERInputStream,
DERObject and
ASN1Sequence
name - a byte array containing the name in ASN.1 DER encoded form
java.io.IOException - if a parsing error occurspublic void setMinCRLNumber(java.math.BigInteger minCRL)
X509CRL must have a
CRL number extension whose value is greater than or equal to the
specified value. If null, no minCRLNumber check will be
done.
minCRL - the minimum CRL number accepted (or null)public void setMaxCRLNumber(java.math.BigInteger maxCRL)
X509CRL must have a
CRL number extension whose value is less than or equal to the
specified value. If null, no maxCRLNumber check will be
done.
maxCRL - the maximum CRL number accepted (or null)public void setDateAndTime(java.util.Date dateAndTime)
X509CRL and earlier than the value of the
nextUpdate component. There is no match if the X509CRL
does not contain a nextUpdate component.
If null, no dateAndTime check will be done.Date supplied here is cloned to protect
against subsequent modifications.
dateAndTime - the Date to match against
(or null)getDateAndTime()public void setCertificateChecking(X509Certificate cert)
CertStore
find CRLs that would be relevant when checking revocation for the
specified certificate. If null is specified, then no
such optional information is provided.
cert - the X509Certificate being checked
(or null)getCertificateChecking()public Collection getIssuerNames()
X509CRL must match at least one of the specified
distinguished names. If the value returned is null, any
issuer distinguished name will do.null, it is a
Collection of names. Each name is a String
or a byte array representing a distinguished name (in RFC 2253 or
ASN.1 DER encoded form, respectively). Note that the
Collection returned may contain duplicate names.setIssuerNames(Collection names).Collection to
protect against subsequent modifications.
Collection of names (or null)setIssuerNames(java.util.Collection)public java.math.BigInteger getMinCRL()
X509CRL must have a
CRL number extension whose value is greater than or equal to the
specified value. If null, no minCRLNumber check will be done.
null)public java.math.BigInteger getMaxCRL()
X509CRL must have a
CRL number extension whose value is less than or equal to the
specified value. If null, no maxCRLNumber check will be
done.
null)public java.util.Date getDateAndTime()
X509CRL and earlier than the value of the
nextUpdate component. There is no match if the
X509CRL does not contain a nextUpdate component.
If null, no dateAndTime check will be done.Date returned is cloned to protect against
subsequent modifications.
Date to match against (or null)setDateAndTime(java.util.Date)public X509Certificate getCertificateChecking()
CertStore
find CRLs that would be relevant when checking revocation for the
specified certificate. If the value returned is null, then
no such optional information is provided.
null)setCertificateChecking(java.security.cert.X509Certificate)public java.lang.String toString()
X509CRLSelector.X509Name.toString to format the output
toString in class java.lang.ObjectString describing the contents of the
X509CRLSelector.public boolean match(CRL crl)
CRL should be selected.X509Name.toString
to parse and to compare the crl parameter issuer and
CRLNumber to access
the CRL number extension.
match in interface CRLSelectorcrl - the CRL to be checked
true if the CRL should be selected,
false otherwisepublic java.lang.Object clone()
clone in interface CRLSelectorclone in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
CRL should be selected.
equals in class java.lang.Objecttrue if the CRL should be selected,
false otherwise
|
Bouncy Castle Cryptography 1.21 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||