Skip to content

Most visited

Recently visited

navigation
Added in API level 1

X509CRLSelector

public class X509CRLSelector
extends Object implements CRLSelector

java.lang.Object
   ↳ java.security.cert.X509CRLSelector


A CRL selector (CRLSelector for selecting X509CRLs that match the specified criteria.

When constructed, all criteria are set to default values that will match any X509CRL.

Summary

Public constructors

X509CRLSelector()

Creates a new X509CertSelector.

Public methods

void addIssuer(X500Principal issuer)

Adds an issuer to the criterion for the issuer distinguished names.

void addIssuerName(byte[] iss_name)

Adds an issuer to the criterion for the issuer distinguished names.

void addIssuerName(String iss_name)

Do not use:, use addIssuer(X500Principal) or addIssuerName(byte[]) instead.

Object clone()

Clones this X509CRL instance.

X509Certificate getCertificateChecking()

Returns the certificate hint to find CRLs.

Date getDateAndTime()

Returns the criterion for the CRL update period.

Collection<Object> getIssuerNames()

Returns the criterion for the issuer distinguished names.

Collection<X500Principal> getIssuers()

Returns the criterion for the issuer distinguished names.

BigInteger getMaxCRL()

Returns the criterion for the maximum CRL number.

BigInteger getMinCRL()

Returns the criterion for the minimum CRL number.

boolean match(CRL crl)

Returns whether the specified CRL matches all the criteria collected in this instance.

void setCertificateChecking(X509Certificate cert)

Sets a certificate hint to find CRLs.

void setDateAndTime(Date dateAndTime)

Sets the criterion for the CRL update period.

void setIssuerNames(Collection<?> names)

Do not use: use setIssuers(Collection) or one of addIssuerName(byte[]) instead.

void setIssuers(Collection<X500Principal> issuers)

Sets the criterion for the issuer distinguished names.

void setMaxCRLNumber(BigInteger maxCRL)

Sets the criterion for the maximum CRL number.

void setMinCRLNumber(BigInteger minCRL)

Sets the criterion for the minimum CRL number.

String toString()

Returns a string representation of this X509CRLSelector instance.

Inherited methods

From class java.lang.Object
From interface java.security.cert.CRLSelector

Public constructors

X509CRLSelector

Added in API level 1
X509CRLSelector ()

Creates a new X509CertSelector.

Public methods

addIssuer

Added in API level 1
void addIssuer (X500Principal issuer)

Adds an issuer to the criterion for the issuer distinguished names.

The CRL issuer must match at least one of the specified distinguished names.

Parameters
issuer X500Principal: the issuer to add to the criterion

addIssuerName

Added in API level 1
void addIssuerName (byte[] iss_name)

Adds an issuer to the criterion for the issuer distinguished names.

The CRL issuer must match at least one of the specified distinguished names.

Parameters
iss_name byte: the issuer to add to the criterion in ASN.1 DER encoded form.
Throws
IOException if parsing fails.

addIssuerName

Added in API level 1
void addIssuerName (String iss_name)

Do not use:, use addIssuer(X500Principal) or addIssuerName(byte[]) instead. It can fail to match some CRLs because of a loss of encoding information in a RFC 2253 string.

Adds an issuer to the criterion for the issuer distinguished names. The CRK issuer must match at least one of the specified distinguished names.

Parameters
iss_name String: the RFC 2253 encoded name.
Throws
IOException if parsing fails.

clone

Added in API level 1
Object clone ()

Clones this X509CRL instance.

Returns
Object the cloned instance.

getCertificateChecking

Added in API level 1
X509Certificate getCertificateChecking ()

Returns the certificate hint to find CRLs. It's not a criterion but may help finding relevant CRLs.

Returns
X509Certificate the certificate hint or null if none set.

getDateAndTime

Added in API level 1
Date getDateAndTime ()

Returns the criterion for the CRL update period.

The CRL's thisUpdate value must be equal or before the returned date and the nextUpdate value must be after the returned date.

Returns
Date the date to search for valid CRL's or null if the date is not checked.

getIssuerNames

Added in API level 1
Collection<Object> getIssuerNames ()

Returns the criterion for the issuer distinguished names.

The CRL issuer must match at least one of the distinguished names.

Returns
Collection<Object> a copy of the list of issuer distinguished names to match, or null if any issuer distinguished name will do. The elements may be strings or ASN.1 DER encoded byte arrays.

getIssuers

Added in API level 1
Collection<X500Principal> getIssuers ()

Returns the criterion for the issuer distinguished names.

The CRL issuer must match at least one of the distinguished names.

Returns
Collection<X500Principal> the unmodifiable list of issuer distinguished names to match, or null if any issuer distinguished name will do.

getMaxCRL

Added in API level 1
BigInteger getMaxCRL ()

Returns the criterion for the maximum CRL number.

The CRL must have a number extension with a value less than or equal to the returned value.

Returns
BigInteger the maximum CRL number or null if the maximum CRL number is not checked.

getMinCRL

Added in API level 1
BigInteger getMinCRL ()

Returns the criterion for the minimum CRL number.

The CRL must have a number extension with a value greater than or equal to the returned value.

Returns
BigInteger the minimum CRL number or null if the minimum CRL number is not to be checked.

match

Added in API level 1
boolean match (CRL crl)

Returns whether the specified CRL matches all the criteria collected in this instance.

Parameters
crl CRL: the CRL to check.
Returns
boolean true if the CRL matches all the criteria, otherwise false.

setCertificateChecking

Added in API level 1
void setCertificateChecking (X509Certificate cert)

Sets a certificate hint to find CRLs. It's not a criterion but may help finding relevant CRLs.

Parameters
cert X509Certificate: the certificate hint or null.

setDateAndTime

Added in API level 1
void setDateAndTime (Date dateAndTime)

Sets the criterion for the CRL update period.

The CRL's thisUpdate value must be equal or before the specified date and the nextUpdate value must be after the specified date.

Parameters
dateAndTime Date: the date to search for valid CRL's or null to not check the date.

setIssuerNames

Added in API level 1
void setIssuerNames (Collection<?> names)

Do not use: use setIssuers(Collection) or one of addIssuerName(byte[]) instead. Sets the criterion for the issuer distinguished names.

The CRL issuer must match at least one of the specified distinguished names.

The specified parameter names is a collection with an entry for each name to be included in the criterion. The name is specified as a String or a byte array specifying the name (in RFC 2253 or ASN.1 DER encoded form)

Parameters
names Collection: the list of issuer distinguished names to match, or null if any issuer distinguished name will do.
Throws
IOException if parsing fails.

setIssuers

Added in API level 1
void setIssuers (Collection<X500Principal> issuers)

Sets the criterion for the issuer distinguished names.

The CRL issuer must match at least one of the specified distinguished names.

Parameters
issuers Collection: the list of issuer distinguished names to match, or null if any issuer distinguished name will do.

setMaxCRLNumber

Added in API level 1
void setMaxCRLNumber (BigInteger maxCRL)

Sets the criterion for the maximum CRL number.

The CRL must have a number extension with a value less than or equal to the specified parameter.

Parameters
maxCRL BigInteger: the maximum CRL number or null to not check the maximum CRL number.

setMinCRLNumber

Added in API level 1
void setMinCRLNumber (BigInteger minCRL)

Sets the criterion for the minimum CRL number.

The CRL must have a number extension with a value greater than or equal to the specified parameter.

Parameters
minCRL BigInteger: the minimum CRL number or null to not check the minimum CRL number

toString

Added in API level 1
String toString ()

Returns a string representation of this X509CRLSelector instance.

Returns
String a string representation of this X509CRLSelector instance.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.