Top Fields Constructors Methods
org.bouncycastle.pkix.jcajce

pack-priv Class RevocationUtilities

extends Object
Class Inheritance
Imports
java.io.IOException, java.math.BigInteger, java.security.KeyFactory, .PublicKey, java.security.cert.CRLException, .CertPathValidatorException, .CertStore, .CertStoreException, .Certificate, .X509CRL, .X509CRLEntry, .X509CRLSelector, .X509Certificate, java.security.interfaces.DSAParams, .DSAPublicKey, java.security.spec.DSAPublicKeySpec, java.util.ArrayList, .Collection, .Collections, .Date, .HashSet, .Iterator, .LinkedHashSet, .List, .Map, .Set, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1Enumerated, .ASN1Integer, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1Primitive, org.bouncycastle.asn1.x500.X500Name, org.bouncycastle.asn1.x500.style.RFC4519Style, org.bouncycastle.asn1.x509.CRLDistPoint, .CRLReason, .DistributionPoint, .DistributionPointName, .Extension, .GeneralName, .GeneralNames, .IssuingDistributionPoint, org.bouncycastle.jcajce.PKIXCRLStore, .PKIXCRLStoreSelector, .PKIXCertStoreSelector, .PKIXExtendedParameters, org.bouncycastle.jcajce.util.JcaJceHelper, org.bouncycastle.util.Selector, .Store, .StoreException

Field Summary

Modifier and TypeField and Description
protected static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static void
checkCRLsNotEmpty(Set<E> crls, Object cert)

protected static void

Returns:

a Collection of all found X509Certificate May be empty but never null.
findCertificates
(LinkedHashSet<E>
a LinkedHashSet to which the certificates will be added.
certs
,
PKIXCertStoreSelector<T extends Certificate>
a Selector object that will be used to select the certificates
certSelect
,
List<E>
a List containing only Store objects. These are used to search for certificates.
certStores
)

Add to a LinkedHashSet all certificates or attribute certificates found in the X509Store's that are matching the certSelect criteria.

pack-priv static List<PKIXCRLStore<T extends CRL>>
protected static void
getCertStatus(Date validDate, X509CRL crl, Object cert, CertStatus certStatus)

protected static Set<E>

Returns:

A Set of X509CRLs with complete CRLs.
getCompleteCRLs
(DistributionPoint
The distribution point for which the complete CRL
dp
,
Object
The X509Certificate for which the CRL should be searched.
cert
,
Date validityDate, List<E> certStores, List<E> crlStores)

Fetches complete CRLs according to RFC 3280.

protected static void
getCRLIssuersFromDistributionPoint(DistributionPoint
The distribution point.
dp
,
Collection<E>
The issuers of the certificate or attribute certificate which contains the distribution point.
issuerPrincipals
,
X509CRLSelector
The CRL selector.
selector
)

Add the CRL issuers from the cRLIssuer field of the distribution point or from the certificate if not given to the issuer criterion of the selector.

protected static Set<E>

Returns:

A Set of X509CRLs with delta CRLs.
getDeltaCRLs
(Date
The date for which the delta CRLs must be valid.
validityDate
,
X509CRL
The complete CRL the delta CRL is for.
completeCRL
,
List<CertStore> certStores, List<PKIXCRLStore<T extends CRL>> pkixCrlStores)

Fetches delta CRLs according to RFC 3280 section 5.2.4.

protected static ASN1Primitive
getExtensionValue(X509Extension
The extension object.
ext
,
ASN1ObjectIdentifier
The object identifier to obtain.
oid
)

Extract the value of the given extension, if it exists.

private static X500Name
private static X500Name
protected static PublicKey

Returns:

The public key of the certificate in list position index extended with DSA parameters if applicable.
getNextWorkingKey
(List<E>
The certification path.
certs
,
int
The index of the certificate which contains the public key which should be extended with DSA parameters.
index
,
JcaJceHelper helper)

Return the next working key inheriting DSA parameters if necessary.

private static ASN1Primitive
protected static Date
getValidityDate(PKIXExtendedParameters paramsPKIX, Date currentDate)

private static X500Name
private static boolean
public static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ISSUING_DISTRIBUTION_POINTback to summary
protected static final String ISSUING_DISTRIBUTION_POINT

Constructor Detail

RevocationUtilitiesback to summary
pack-priv RevocationUtilities()

Method Detail

checkCRLsNotEmptyback to summary
pack-priv static void checkCRLsNotEmpty(Set<E> crls, Object cert) throws CRLNotFoundException
findCertificatesback to summary
protected static void findCertificates(LinkedHashSet<E> certs, PKIXCertStoreSelector<T extends Certificate> certSelect, List<E> certStores) throws AnnotatedException

Add to a LinkedHashSet all certificates or attribute certificates found in the X509Store's that are matching the certSelect criteria.

Parameters
certs:LinkedHashSet<E>

a LinkedHashSet to which the certificates will be added.

certSelect:PKIXCertStoreSelector<T extends Certificate>

a Selector object that will be used to select the certificates

certStores:List<E>

a List containing only Store objects. These are used to search for certificates.

Returns:void

a Collection of all found X509Certificate May be empty but never null.

getAdditionalStoresFromCRLDistributionPointback to summary
pack-priv static List<PKIXCRLStore<T extends CRL>> getAdditionalStoresFromCRLDistributionPoint(CRLDistPoint crldp, Map<GeneralName, PKIXCRLStore<T extends CRL>> namedCRLStoreMap) throws AnnotatedException
getCertStatusback to summary
protected static void getCertStatus(Date validDate, X509CRL crl, Object cert, CertStatus certStatus) throws AnnotatedException
getCompleteCRLsback to summary
protected static Set<E> getCompleteCRLs(DistributionPoint dp, Object cert, Date validityDate, List<E> certStores, List<E> crlStores) throws AnnotatedException, CRLNotFoundException

Fetches complete CRLs according to RFC 3280.

Parameters
dp:DistributionPoint

The distribution point for which the complete CRL

cert:Object

The X509Certificate for which the CRL should be searched.

Returns:Set<E>

A Set of X509CRLs with complete CRLs.

Exceptions
AnnotatedException:
if an exception occurs while picking the CRLs or no CRLs are found.
getCRLIssuersFromDistributionPointback to summary
protected static void getCRLIssuersFromDistributionPoint(DistributionPoint dp, Collection<E> issuerPrincipals, X509CRLSelector selector) throws AnnotatedException

Add the CRL issuers from the cRLIssuer field of the distribution point or from the certificate if not given to the issuer criterion of the selector.

The issuerPrincipals are a collection with a single X500Name for X509Certificates.

Parameters
dp:DistributionPoint

The distribution point.

issuerPrincipals:Collection<E>

The issuers of the certificate or attribute certificate which contains the distribution point.

selector:X509CRLSelector

The CRL selector.

Exceptions
AnnotatedException:
if an exception occurs while processing.
ClassCastException:
if issuerPrincipals does not contain only X500Names.
getDeltaCRLsback to summary
protected static Set<E> getDeltaCRLs(Date validityDate, X509CRL completeCRL, List<CertStore> certStores, List<PKIXCRLStore<T extends CRL>> pkixCrlStores) throws AnnotatedException

Fetches delta CRLs according to RFC 3280 section 5.2.4.

Parameters
validityDate:Date

The date for which the delta CRLs must be valid.

completeCRL:X509CRL

The complete CRL the delta CRL is for.

Returns:Set<E>

A Set of X509CRLs with delta CRLs.

Exceptions
AnnotatedException:
if an exception occurs while picking the delta CRLs.
getExtensionValueback to summary
protected static ASN1Primitive getExtensionValue(X509Extension ext, ASN1ObjectIdentifier oid) throws AnnotatedException

Extract the value of the given extension, if it exists.

Parameters
ext:X509Extension

The extension object.

oid:ASN1ObjectIdentifier

The object identifier to obtain.

Exceptions
AnnotatedException:
if the extension cannot be read.
getIssuerback to summary
private static X500Name getIssuer(X509Certificate cert)
getIssuerback to summary
private static X500Name getIssuer(X509CRL crl)
getNextWorkingKeyback to summary
protected static PublicKey getNextWorkingKey(List<E> certs, int index, JcaJceHelper helper) throws CertPathValidatorException

Return the next working key inheriting DSA parameters if necessary.

This methods inherits DSA parameters from the indexed certificate or previous certificates in the certificate chain to the returned PublicKey. The list is searched upwards, meaning the end certificate is at position 0 and previous certificates are following.

If the indexed certificate does not contain a DSA key this method simply returns the public key. If the DSA key already contains DSA parameters the key is also only returned.

Parameters
certs:List<E>

The certification path.

index:int

The index of the certificate which contains the public key which should be extended with DSA parameters.

Returns:PublicKey

The public key of the certificate in list position index extended with DSA parameters if applicable.

Exceptions
AnnotatedException:
if DSA parameters cannot be inherited.
getObjectback to summary
private static ASN1Primitive getObject(ASN1ObjectIdentifier oid, byte[] ext) throws AnnotatedException
getValidityDateback to summary
protected static Date getValidityDate(PKIXExtendedParameters paramsPKIX, Date currentDate)
getX500Nameback to summary
private static X500Name getX500Name(X500Principal principal)
isDeltaCRLback to summary
private static boolean isDeltaCRL(X509CRL crl)
isIndirectCRLback to summary
public static boolean isIndirectCRL(X509CRL crl) throws CRLException