Top Description Inners Fields Constructors Methods
org.bouncycastle.jcajce

public Class PKIXCRLStoreSelector<T extends CRL>

extends Object
implements Selector<T extends CRL>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Selector, java.lang.Cloneable
Imports
java.math.BigInteger, java.security.cert.CRL, .CRLSelector, .CertStore, .CertStoreException, .X509CRL, .X509CRLSelector, .X509Certificate, java.util.Collection, org.bouncycastle.asn1.ASN1Integer, .ASN1OctetString, org.bouncycastle.asn1.x509.Extension, org.bouncycastle.util.Arrays, .Selector

This class is a Selector implementation for X.509 certificate revocation lists.
See Also
org.bouncycastle.util.Selector

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
PKIXCRLStoreSelector.Builder

Builder for a PKIXCRLStoreSelector.

private static class

Field Summary

Modifier and TypeField and Description
private final CRLSelector
private final boolean
private final boolean
private final byte[]
private final boolean
private final BigInteger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Object
clone()

Overrides java.lang.Object.clone.

Implements org.bouncycastle.util.Selector.clone.

Creates and returns a copy of this object.
public X509Certificate
public static Collection<? extends CRL>
getCRLs(final PKIXCRLStoreSelector<T extends CRL> selector, CertStore certStore)

public byte[]

Returns:

Returns the issuing distribution point.
getIssuingDistributionPoint
()

Returns the issuing distribution point.

public BigInteger

Returns:

Returns the maximum base CRL number.
getMaxBaseCRLNumber
()

Get the maximum base CRL number.

public boolean

Returns:

true if only complete CRLs are returned.
isCompleteCRLEnabled
()

If true only complete CRLs are returned.

public boolean

Returns:

Returns true if only CRLs with the delta CRL indicator extension are selected.
isDeltaCRLIndicatorEnabled
()

Returns if this selector must match CRLs with the delta CRL indicator extension set.

public boolean

Returns:

Returns if the issuing distribution point check is enabled.
isIssuingDistributionPointEnabled
()

Returns if the issuing distribution point criteria should be applied.

public boolean
match(CRL
the object to be matched.
obj
)

Implements org.bouncycastle.util.Selector.match.

Match the passed in object, returning true if it would be selected by this selector, false otherwise.
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseSelectorback to summary
private final CRLSelector baseSelector
completeCRLEnabledback to summary
private final boolean completeCRLEnabled
deltaCRLIndicatorback to summary
private final boolean deltaCRLIndicator
issuingDistributionPointback to summary
private final byte[] issuingDistributionPoint
issuingDistributionPointEnabledback to summary
private final boolean issuingDistributionPointEnabled
maxBaseCRLNumberback to summary
private final BigInteger maxBaseCRLNumber

Constructor Detail

PKIXCRLStoreSelectorback to summary
private PKIXCRLStoreSelector(PKIXCRLStoreSelector.Builder baseBuilder)

Method Detail

cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements org.bouncycastle.util.Selector.clone.

Doc from java.lang.Object.clone.

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Returns:Object

a clone of this instance.

getCertificateCheckingback to summary
public X509Certificate getCertificateChecking()
getCRLsback to summary
public static Collection<? extends CRL> getCRLs(final PKIXCRLStoreSelector<T extends CRL> selector, CertStore certStore) throws CertStoreException
getIssuingDistributionPointback to summary
public byte[] getIssuingDistributionPoint()

Returns the issuing distribution point. Defaults to null, which is a missing issuing distribution point extension.

The internal byte array is cloned before it is returned.

The criteria must be enable with Builder.setIssuingDistributionPointEnabled(boolean)}.

Returns:byte[]

Returns the issuing distribution point.

getMaxBaseCRLNumberback to summary
public BigInteger getMaxBaseCRLNumber()

Get the maximum base CRL number. Defaults to null.

Returns:BigInteger

Returns the maximum base CRL number.

isCompleteCRLEnabledback to summary
public boolean isCompleteCRLEnabled()

If true only complete CRLs are returned. Defaults to false.

Returns:boolean

true if only complete CRLs are returned.

isDeltaCRLIndicatorEnabledback to summary
public boolean isDeltaCRLIndicatorEnabled()

Returns if this selector must match CRLs with the delta CRL indicator extension set. Defaults to false.

Returns:boolean

Returns true if only CRLs with the delta CRL indicator extension are selected.

isIssuingDistributionPointEnabledback to summary
public boolean isIssuingDistributionPointEnabled()

Returns if the issuing distribution point criteria should be applied. Defaults to false.

You may also set the issuing distribution point criteria if not a missing issuing distribution point should be assumed.

Returns:boolean

Returns if the issuing distribution point check is enabled.

matchback to summary
public boolean match(CRL obj)

Implements org.bouncycastle.util.Selector.match.

Doc from org.bouncycastle.util.Selector.match.

Match the passed in object, returning true if it would be selected by this selector, false otherwise.

Parameters
obj:CRL

the object to be matched.

Returns:boolean

true if the object is a match for this selector, false otherwise.

org.bouncycastle.jcajce back to summary

public Class PKIXCRLStoreSelector.Builder

extends Object
Class Inheritance

Builder for a PKIXCRLStoreSelector.

Field Summary

Modifier and TypeField and Description
private final CRLSelector
private boolean
private boolean
private byte[]
private boolean
private BigInteger

Constructor Summary

AccessConstructor and Description
public
Builder(CRLSelector
the CertSelector to copy the match details from.
crlSelector
)

Constructor initializing a builder with a CertSelector.

Method Summary

Modifier and TypeMethod and Description
public PKIXCRLStoreSelector<? extends CRL>

Returns:

a new PKIXCRLStoreSelector
build
()

Build a selector.

public PKIXCRLStoreSelector.Builder
setCompleteCRLEnabled(boolean
true if only complete CRLs should be returned.
completeCRLEnabled
)

If set to true only complete CRLs are returned.

public PKIXCRLStoreSelector.Builder
setDeltaCRLIndicatorEnabled(boolean
true if the delta CRL indicator extension must be in the CRL.
deltaCRLIndicator
)

If this is set to true the CRL reported contains the delta CRL indicator CRL extension.

public void
setIssuingDistributionPoint(byte[]
The issuing distribution point to set. This is the DER encoded OCTET STRING extension value.
issuingDistributionPoint
)

Sets the issuing distribution point.

public void
setIssuingDistributionPointEnabled(boolean
true to enable the issuing distribution point check.
issuingDistributionPointEnabled
)

Enables or disables the issuing distribution point check.

public void
setMaxBaseCRLNumber(BigInteger
The maximum base CRL number to set.
maxBaseCRLNumber
)

Sets the maximum base CRL number.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseSelectorback to summary
private final CRLSelector baseSelector
completeCRLEnabledback to summary
private boolean completeCRLEnabled
deltaCRLIndicatorback to summary
private boolean deltaCRLIndicator
issuingDistributionPointback to summary
private byte[] issuingDistributionPoint
issuingDistributionPointEnabledback to summary
private boolean issuingDistributionPointEnabled
maxBaseCRLNumberback to summary
private BigInteger maxBaseCRLNumber

Constructor Detail

Builderback to summary
public Builder(CRLSelector crlSelector)

Constructor initializing a builder with a CertSelector.

Parameters
crlSelector:CRLSelector

the CertSelector to copy the match details from.

Method Detail

buildback to summary
public PKIXCRLStoreSelector<? extends CRL> build()

Build a selector.

Returns:PKIXCRLStoreSelector<? extends CRL>

a new PKIXCRLStoreSelector

setCompleteCRLEnabledback to summary
public PKIXCRLStoreSelector.Builder setCompleteCRLEnabled(boolean completeCRLEnabled)

If set to true only complete CRLs are returned.

setCompleteCRLEnabled(boolean) and setDeltaCRLIndicatorEnabled(boolean) excluded each other.

Parameters
completeCRLEnabled:boolean

true if only complete CRLs should be returned.

setDeltaCRLIndicatorEnabledback to summary
public PKIXCRLStoreSelector.Builder setDeltaCRLIndicatorEnabled(boolean deltaCRLIndicator)

If this is set to true the CRL reported contains the delta CRL indicator CRL extension.

setCompleteCRLEnabled(boolean) and setDeltaCRLIndicatorEnabled(boolean) excluded each other.

Parameters
deltaCRLIndicator:boolean

true if the delta CRL indicator extension must be in the CRL.

setIssuingDistributionPointback to summary
public void setIssuingDistributionPoint(byte[] issuingDistributionPoint)

Sets the issuing distribution point.

The issuing distribution point extension is a CRL extension which identifies the scope and the distribution point of a CRL. The scope contains among others information about revocation reasons contained in the CRL. Delta CRLs and complete CRLs must have matching issuing distribution points.

The byte array is cloned to protect against subsequent modifications.

You must also enable or disable this criteria with setIssuingDistributionPointEnabled(boolean).

Parameters
issuingDistributionPoint:byte[]

The issuing distribution point to set. This is the DER encoded OCTET STRING extension value.

See Also
getIssuingDistributionPoint()
setIssuingDistributionPointEnabledback to summary
public void setIssuingDistributionPointEnabled(boolean issuingDistributionPointEnabled)

Enables or disables the issuing distribution point check.

Parameters
issuingDistributionPointEnabled:boolean

true to enable the issuing distribution point check.

setMaxBaseCRLNumberback to summary
public void setMaxBaseCRLNumber(BigInteger maxBaseCRLNumber)

Sets the maximum base CRL number. Setting to null disables this cheack.

This is only meaningful for delta CRLs. Complete CRLs must have a CRL number which is greater or equal than the base number of the corresponding CRL.

Parameters
maxBaseCRLNumber:BigInteger

The maximum base CRL number to set.

org.bouncycastle.jcajce back to summary

private Class PKIXCRLStoreSelector.SelectorClone

extends X509CRLSelector
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final PKIXCRLStoreSelector<T extends CRL>

Constructor Summary

AccessConstructor and Description
pack-priv
SelectorClone(PKIXCRLStoreSelector<T extends CRL> selector)

Method Summary

Modifier and TypeMethod and Description
public boolean
match(CRL
the CRL to be checked
crl
)

Overrides java.security.cert.X509CRLSelector.match.

Implements java.security.cert.CRLSelector.match.

Decides whether a CRL should be selected.
Inherited from java.security.cert.X509CRLSelector:
addIssueraddIssuerNameaddIssuerNameclonegetCertificateCheckinggetDateAndTimegetIssuerNamesgetIssuersgetMaxCRLgetMinCRLsetCertificateCheckingsetDateAndTimesetIssuerNamessetIssuerssetMaxCRLNumbersetMinCRLNumbertoString

Field Detail

selectorback to summary
private final PKIXCRLStoreSelector<T extends CRL> selector

Constructor Detail

SelectorCloneback to summary
pack-priv SelectorClone(PKIXCRLStoreSelector<T extends CRL> selector)

Method Detail

matchback to summary
public boolean match(CRL crl)

Overrides java.security.cert.X509CRLSelector.match.

Implements java.security.cert.CRLSelector.match.

Doc from java.security.cert.X509CRLSelector.match.

Decides whether a CRL should be selected.

Parameters
crl:CRL

the CRL to be checked

Returns:boolean

true if the CRL should be selected, false otherwise