Top Fields Constructors Methods
org.bouncycastle.x509

pack-priv Class CertPathValidatorUtilities

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.x509.PKIXCertPathReviewer
Imports
java.io.ByteArrayInputStream, .ByteArrayOutputStream, .IOException, java.math.BigInteger, java.security.GeneralSecurityException, .KeyFactory, .PublicKey, java.security.cert.CRLException, .CertPathValidatorException, .CertStore, .CertStoreException, .Certificate, .CertificateException, .PKIXParameters, .PolicyQualifierInfo, .X509CRL, .X509CRLEntry, .X509Certificate, java.security.interfaces.DSAParams, .DSAPublicKey, java.security.spec.DSAPublicKeySpec, java.util.ArrayList, .Collection, .Date, .Enumeration, .HashSet, .Iterator, .List, .Map, .Set, javax.security.auth.x500.X500Principal, org.bouncycastle.asn1.ASN1Encodable, .ASN1Enumerated, .ASN1InputStream, .ASN1ObjectIdentifier, .ASN1OctetString, .ASN1OutputStream, .ASN1Primitive, .ASN1Sequence, .DERSequence, org.bouncycastle.asn1.x509.AlgorithmIdentifier, .CRLReason, .Extension, .IssuingDistributionPoint, .PolicyInformation, .SubjectPublicKeyInfo, .X509Extension, org.bouncycastle.jcajce.PKIXCertStoreSelector, org.bouncycastle.jce.exception.ExtCertPathValidatorException, org.bouncycastle.jce.provider.AnnotatedException, .BouncyCastleProvider, .PKIXPolicyNode, org.bouncycastle.util.Encodable, .Selector, .Store, .StoreException

Field Summary

Modifier and TypeField and Description
protected static final String
protected static final String
protected static final String
protected static final String
protected static final int
protected static final String[]
protected static final String
protected static final String
protected static final String
protected static final int
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected static Collection<E>

Returns:

a Collection of all found X509Certificate or org.bouncycastle.x509.X509AttributeCertificate objects. May be empty but never null.
findCertificates
(X509CertStoreSelector
a Selector object that will be used to select the certificates
certSelect
,
List<E>
a List containing only X509Store objects. These are used to search for certificates.
certStores
)

Deprecated as a consequence of X509CertStoreSelector being deprecated.
Return a Collection of all certificates or attribute certificates found in the X509Store's that are matching the certSelect criteriums.
protected static Collection<E>
findCertificates(PKIXCertStoreSelector<T extends Certificate> certSelect, List<E> certStores)

protected static Collection<E>
findCertificates(X509AttributeCertStoreSelector certSelect, List<E> certStores)

Deprecated as a consequence of X509AttributeCertStoreSelector being deprecated.
protected static AlgorithmIdentifier
protected static void
getCertStatus(Date validDate, X509CRL crl, Object cert, CertStatus certStatus)

protected static X500Principal

Returns:

The issuer as X500Principal.
getEncodedIssuerPrincipal
(Object
The attribute certificate or certificate.
cert
)

Returns the issuer of an attribute certificate or certificate.

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

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

protected static X500Principal
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
)

Return the next working key inheriting DSA parameters if necessary.

private static ASN1Primitive
getObject(String oid, byte[] ext)

protected static final Set<E>
private static BigInteger
protected static X500Principal
protected static Date
getValidityDate(PKIXParameters paramsPKIX, Date currentDate)

protected static boolean
isAnyPolicy(Set<E> policySet)

pack-priv static boolean
protected static boolean
protected static void
prepareNextCertB1(int i, List<E>[] policyNodes, String id_p, Map<K, V> m_idp, X509Certificate cert)

protected static PKIXPolicyNode
prepareNextCertB2(int i, List<E>[] policyNodes, String id_p, PKIXPolicyNode validPolicyTree)

protected static boolean
processCertD1i(int index, List<E>[] policyNodes, ASN1ObjectIdentifier pOid, Set<E> pq)

protected static void
processCertD1ii(int index, List<E>[] policyNodes, ASN1ObjectIdentifier _poid, Set<E> _pq)

protected static PKIXPolicyNode
removePolicyNode(PKIXPolicyNode validPolicyTree, List<E>[] policyNodes, PKIXPolicyNode _node)

private static void
removePolicyNodeRecurse(List<E>[] policyNodes, PKIXPolicyNode _node)

protected static void
verifyX509Certificate(X509Certificate cert, PublicKey publicKey, String sigProvider)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ANY_POLICYback to summary
protected static final String ANY_POLICY
BASIC_CONSTRAINTSback to summary
protected static final String BASIC_CONSTRAINTS
CERTIFICATE_POLICIESback to summary
protected static final String CERTIFICATE_POLICIES
CRL_NUMBERback to summary
protected static final String CRL_NUMBER
CRL_SIGNback to summary
protected static final int CRL_SIGN
crlReasonsback to summary
protected static final String[] crlReasons
DELTA_CRL_INDICATORback to summary
protected static final String DELTA_CRL_INDICATOR
INHIBIT_ANY_POLICYback to summary
protected static final String INHIBIT_ANY_POLICY
ISSUING_DISTRIBUTION_POINTback to summary
protected static final String ISSUING_DISTRIBUTION_POINT
KEY_CERT_SIGNback to summary
protected static final int KEY_CERT_SIGN
KEY_USAGEback to summary
protected static final String KEY_USAGE
NAME_CONSTRAINTSback to summary
protected static final String NAME_CONSTRAINTS
POLICY_CONSTRAINTSback to summary
protected static final String POLICY_CONSTRAINTS
POLICY_MAPPINGSback to summary
protected static final String POLICY_MAPPINGS
SUBJECT_ALTERNATIVE_NAMEback to summary
protected static final String SUBJECT_ALTERNATIVE_NAME

Constructor Detail

CertPathValidatorUtilitiesback to summary
pack-priv CertPathValidatorUtilities()

Method Detail

findCertificatesback to summary
protected static Collection<E> findCertificates(X509CertStoreSelector certSelect, List<E> certStores) throws AnnotatedException

Deprecated

as a consequence of X509CertStoreSelector being deprecated. See corresponding docs for further information.

Return a Collection of all certificates or attribute certificates found in the X509Store's that are matching the certSelect criteriums.

Parameters
certSelect:X509CertStoreSelector

a Selector object that will be used to select the certificates

certStores:List<E>

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

Returns:Collection<E>

a Collection of all found X509Certificate or org.bouncycastle.x509.X509AttributeCertificate objects. May be empty but never null.

findCertificatesback to summary
protected static Collection<E> findCertificates(PKIXCertStoreSelector<T extends Certificate> certSelect, List<E> certStores) throws AnnotatedException
findCertificatesback to summary
protected static Collection<E> findCertificates(X509AttributeCertStoreSelector certSelect, List<E> certStores) throws AnnotatedException

Deprecated

as a consequence of X509AttributeCertStoreSelector being deprecated. See corresponding docs for further information.

getAlgorithmIdentifierback to summary
protected static AlgorithmIdentifier getAlgorithmIdentifier(PublicKey key) throws CertPathValidatorException
getCertStatusback to summary
protected static void getCertStatus(Date validDate, X509CRL crl, Object cert, CertStatus certStatus) throws AnnotatedException
getEncodedIssuerPrincipalback to summary
protected static X500Principal getEncodedIssuerPrincipal(Object cert)

Returns the issuer of an attribute certificate or certificate.

Parameters
cert:Object

The attribute certificate or certificate.

Returns:X500Principal

The issuer as X500Principal.

getExtensionValueback to summary
protected static ASN1Primitive getExtensionValue(X509Extension ext, String oid) throws AnnotatedException

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

Parameters
ext:X509Extension

The extension object.

oid:String

The object identifier to obtain.

Exceptions
AnnotatedException:
if the extension cannot be read.
getIssuerPrincipalback to summary
protected static X500Principal getIssuerPrincipal(X509CRL crl)
getNextWorkingKeyback to summary
protected static PublicKey getNextWorkingKey(List<E> certs, int index) 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
CertPathValidatorException:
if DSA parameters cannot be inherited.
getObjectback to summary
private static ASN1Primitive getObject(String oid, byte[] ext) throws AnnotatedException
getQualifierSetback to summary
protected static final Set<E> getQualifierSet(ASN1Sequence qualifiers) throws CertPathValidatorException
getSerialNumberback to summary
private static BigInteger getSerialNumber(Object cert)
getSubjectPrincipalback to summary
protected static X500Principal getSubjectPrincipal(X509Certificate cert)
getValidityDateback to summary
protected static Date getValidityDate(PKIXParameters paramsPKIX, Date currentDate)
isAnyPolicyback to summary
protected static boolean isAnyPolicy(Set<E> policySet)
isIndirectCRLback to summary
pack-priv static boolean isIndirectCRL(X509CRL crl) throws CRLException
isSelfIssuedback to summary
protected static boolean isSelfIssued(X509Certificate cert)
prepareNextCertB1back to summary
protected static void prepareNextCertB1(int i, List<E>[] policyNodes, String id_p, Map<K, V> m_idp, X509Certificate cert) throws AnnotatedException, CertPathValidatorException
prepareNextCertB2back to summary
protected static PKIXPolicyNode prepareNextCertB2(int i, List<E>[] policyNodes, String id_p, PKIXPolicyNode validPolicyTree)
processCertD1iback to summary
protected static boolean processCertD1i(int index, List<E>[] policyNodes, ASN1ObjectIdentifier pOid, Set<E> pq)
processCertD1iiback to summary
protected static void processCertD1ii(int index, List<E>[] policyNodes, ASN1ObjectIdentifier _poid, Set<E> _pq)
removePolicyNodeback to summary
protected static PKIXPolicyNode removePolicyNode(PKIXPolicyNode validPolicyTree, List<E>[] policyNodes, PKIXPolicyNode _node)
removePolicyNodeRecurseback to summary
private static void removePolicyNodeRecurse(List<E>[] policyNodes, PKIXPolicyNode _node)
verifyX509Certificateback to summary
protected static void verifyX509Certificate(X509Certificate cert, PublicKey publicKey, String sigProvider) throws GeneralSecurityException