Bouncy Castle Cryptography Library 1.77.0

org.bouncycastle.x509
Class X509CertStoreSelector

java.lang.Object
  |
  +--org.bouncycastle.jce.cert.X509CertSelector
        |
        +--org.bouncycastle.x509.X509CertStoreSelector
All Implemented Interfaces:
CertSelector, java.lang.Cloneable, Selector

public class X509CertStoreSelector
extends X509CertSelector
implements Selector

This class is a Selector implementation for X.509 certificates.

See Also:
Selector, X509Store, X509StoreCertCollection

Constructor Summary
X509CertStoreSelector()
           
 
Method Summary
 java.lang.Object clone()
          Returns a copy of this object.
static X509CertStoreSelector getInstance(X509CertSelector selector)
          Returns an instance of this from a X509CertSelector.
 boolean match(java.security.cert.Certificate cert)
          Decides whether a Certificate should be selected.

TODO: implement missing tests (name constraints and path to names)

Uses ASN1InputStream, ASN1Sequence, ASN1ObjectIdentifier, ASN1Object, DERGeneralizedTime, X509Name, X509Extensions, ExtendedKeyUsage, KeyPurposeId, SubjectPublicKeyInfo, AlgorithmIdentifier to access X509 extensions
 boolean match(java.lang.Object obj)
           
 
Methods inherited from class org.bouncycastle.jce.cert.X509CertSelector
addPathToName, addPathToName, addSubjectAlternativeName, addSubjectAlternativeName, getAuthorityKeyIdentifier, getBasicConstraints, getCertificate, getCertificateValid, getExtendedKeyUsage, getIssuerAsBytes, getIssuerAsString, getKeyUsage, getMatchAllSubjectAltNames, getNameConstraints, getPathToNames, getPolicy, getPrivateKeyValid, getSerialNumber, getSubjectAlternativeNames, getSubjectAsBytes, getSubjectAsString, getSubjectKeyIdentifier, getSubjectPublicKey, getSubjectPublicKeyAlgID, setAuthorityKeyIdentifier, setBasicConstraints, setCertificate, setCertificateValid, setExtendedKeyUsage, setIssuer, setIssuer, setKeyUsage, setMatchAllSubjectAltNames, setNameConstraints, setPathToNames, setPolicy, setPrivateKeyValid, setSerialNumber, setSubject, setSubject, setSubjectAlternativeNames, setSubjectKeyIdentifier, setSubjectPublicKey, setSubjectPublicKey, setSubjectPublicKeyAlgID, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

X509CertStoreSelector

public X509CertStoreSelector()
Method Detail

match

public boolean match(java.lang.Object obj)
Specified by:
match in interface Selector

match

public boolean match(java.security.cert.Certificate cert)
Description copied from class: X509CertSelector
Decides whether a Certificate should be selected.

TODO: implement missing tests (name constraints and path to names)

Uses ASN1InputStream, ASN1Sequence, ASN1ObjectIdentifier, ASN1Object, DERGeneralizedTime, X509Name, X509Extensions, ExtendedKeyUsage, KeyPurposeId, SubjectPublicKeyInfo, AlgorithmIdentifier to access X509 extensions
Overrides:
match in class X509CertSelector
Following copied from class: org.bouncycastle.jce.cert.X509CertSelector
Parameters:
cert - the Certificate to be checked
Returns:
true if the Certificate should be selected, false otherwise

clone

public java.lang.Object clone()
Description copied from class: X509CertSelector
Returns a copy of this object.
Specified by:
clone in interface Selector
Overrides:
clone in class X509CertSelector
Following copied from class: org.bouncycastle.jce.cert.X509CertSelector
Returns:
the copy

getInstance

public static X509CertStoreSelector getInstance(X509CertSelector selector)
Returns an instance of this from a X509CertSelector.
Parameters:
selector - A X509CertSelector instance.
Returns:
An instance of an X509CertStoreSelector.
Throws:
java.lang.IllegalArgumentException - if selector is null or creation fails.

Bouncy Castle Cryptography Library 1.77.0