public class CertIdentityCertFilter extends java.lang.Object implements CapiCertFilter
CapiCertFilter that is used
to find a specific identity in CAPI based on certificate criteria.
The following Criteria types are supported:
| Constructor and Description |
|---|
CertIdentityCertFilter(AlgorithmID digestAlgID,
byte[] digestValue)
This constructor searches for an identity based on a certificate
hash value of the given type.
|
CertIdentityCertFilter(CapiContainerName capiContainerName)
This can be used to find all certificates in that particular identity.
|
CertIdentityCertFilter(CertContext context)
Constructor used to filter out certificates that are not part of the same
identity.
|
CertIdentityCertFilter(java.security.Principal subjectDN)
This constructor takes a Principal which represents the
Subject Name of a Certificate as the criteria for filtering
acceptable certificates.
|
CertIdentityCertFilter(X509Certificate cert)
This constructor takes an X509Certificate and uses the SubjectName
as the criteria for filtering acceptable certificates.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptCertificate(CertContext certificate,
CertStore certStore)
This method checks whether the certificate should be accepted depending
on whether it has the same subject name or CapiContainerName
|
public CertIdentityCertFilter(X509Certificate cert) throws CapiException
cert - The X509Certificate whose subject DN is used to find
acceptable certificatesCapiExceptionpublic CertIdentityCertFilter(java.security.Principal subjectDN)
throws CapiException
subjectDN - The SubjectDN which will be used to find
acceptable certificatesCapiExceptionpublic CertIdentityCertFilter(CertContext context) throws CapiException
context - The CertContext that represents one of the certificates
contained in the identity.CapiExceptionpublic CertIdentityCertFilter(CapiContainerName capiContainerName) throws CapiException
capiContainerName - The capiContainerNameCapiExceptionpublic CertIdentityCertFilter(AlgorithmID digestAlgID, byte[] digestValue) throws CapiException
digestAlgID - The AlgorithmID, for example AlgorithmID.MessageDigestAlgs.id_sha1digestValue - The digestValue in bytesCapiExceptionpublic boolean acceptCertificate(CertContext certificate, CertStore certStore)
acceptCertificate in interface CapiCertFiltercertificate - The CertContext that will be checked for acceptability.certStore - The CertStore that was used to retrieve the certificate