public class IssuingCertificateRetriever extends Object implements IIssuingCertificateRetriever
IIssuingCertificateRetriever default implementation.| Constructor and Description |
|---|
IssuingCertificateRetriever()
Creates
IssuingCertificateRetriever instance. |
IssuingCertificateRetriever(IResourceRetriever resourceRetriever)
Creates
IssuingCertificateRetriever instance. |
| Modifier and Type | Method and Description |
|---|---|
void |
addKnownCertificates(Collection<Certificate> certificates)
Add certificates collection to known certificates storage, which is used for issuer certificates retrieval.
|
void |
addTrustedCertificates(Collection<Certificate> certificates)
Add trusted certificates collection to trusted certificates storage.
|
List<X509Certificate[]> |
buildCertificateChains(X509Certificate certificate)
This method tries to rebuild certificate issuer chain.
|
List<X509Certificate[]> |
buildCertificateChains(X509Certificate[] certificate)
This method tries to rebuild certificate issuer chain.
|
Certificate[] |
getCrlIssuerCertificates(CRL crl)
Retrieves the certificate chain for the certificate that should be used to verify the signature on the
CRL response using CRL Authority Information Access (AIA) Extension and known certificates.
|
Certificate[][] |
getCrlIssuerCertificatesByName(CRL crl)
Retrieves the certificate chaind for the certificates that could be used to verify the signature on the
CRL response using CRL Authority Information Access (AIA) Extension and known certificates.
|
protected InputStream |
getIssuerCertByURI(String uri)
Get CA issuers certificates represented as
InputStream. |
TrustedCertificatesStore |
getTrustedCertificatesStore()
Gets
TrustedCertificatesStore to be used to provide more complex trusted certificates configuration. |
boolean |
isCertificateTrusted(Certificate certificate)
Check if provided certificate is present in trusted certificates storage.
|
protected Collection<Certificate> |
parseCertificates(InputStream certsData)
Parses certificates represented as byte array.
|
List<X509Certificate> |
retrieveIssuerCertificate(Certificate certificate)
Retrieve issuer certificate for the provided certificate.
|
Certificate[] |
retrieveMissingCertificates(Certificate[] chain)
Retrieves missing certificates in chain using certificate Authority Information Access (AIA) Extension.
|
Set<Certificate> |
retrieveOCSPResponderByNameCertificate(com.itextpdf.commons.bouncycastle.cert.ocsp.IBasicOCSPResp ocspResp)
Retrieves OCSP responder certificate candidates either from the response certs or
trusted store in case responder certificate isn't found in /Certs.
|
void |
setTrustedCertificates(Collection<Certificate> certificates)
Sets trusted certificate list to be used as certificates trusted for any possible usage.
|
public IssuingCertificateRetriever()
IssuingCertificateRetriever instance.public IssuingCertificateRetriever(IResourceRetriever resourceRetriever)
IssuingCertificateRetriever instance.resourceRetriever - an @{link IResourceRetriever} instance to use for performing http
requests.public Certificate[] retrieveMissingCertificates(Certificate[] chain)
retrieveMissingCertificates in interface IIssuingCertificateRetrieverchain - certificate chain to restore with at least signing certificate.public List<X509Certificate[]> buildCertificateChains(X509Certificate certificate)
certificate - X509Certificate for which issuer chains shall be builtpublic List<X509Certificate[]> buildCertificateChains(X509Certificate[] certificate)
certificate - X509Certificate array for which issuer chains shall be builtpublic List<X509Certificate> retrieveIssuerCertificate(Certificate certificate)
certificate - Certificate for which issuer certificate shall be retrievednull if there is no issuer certificate, or it cannot be retrieved.public Set<Certificate> retrieveOCSPResponderByNameCertificate(com.itextpdf.commons.bouncycastle.cert.ocsp.IBasicOCSPResp ocspResp)
ocspResp - basic OCSP response to get responder certificate forpublic Certificate[] getCrlIssuerCertificates(CRL crl)
getCrlIssuerCertificates in interface IIssuingCertificateRetrievercrl - CRL response to retrieve issuer for.public Certificate[][] getCrlIssuerCertificatesByName(CRL crl)
getCrlIssuerCertificatesByName in interface IIssuingCertificateRetrievercrl - CRL response to retrieve issuer for.public void setTrustedCertificates(Collection<Certificate> certificates)
getTrustedCertificatesStore() method is expected to be used.setTrustedCertificates in interface IIssuingCertificateRetrievercertificates - certificate list to be used as certificates trusted for any possible usage.public void addTrustedCertificates(Collection<Certificate> certificates)
certificates - certificates Collection to be addedpublic void addKnownCertificates(Collection<Certificate> certificates)
certificates - certificates Collection to be addedpublic TrustedCertificatesStore getTrustedCertificatesStore()
TrustedCertificatesStore to be used to provide more complex trusted certificates configuration.TrustedCertificatesStore storagepublic boolean isCertificateTrusted(Certificate certificate)
certificate - Certificate to be checkedtrue if certificate is present in trusted certificates storage, false otherwiseprotected InputStream getIssuerCertByURI(String uri) throws IOException
InputStream.uri - URL URI, which is expected to be used to get issuer certificates from. Usually
CA Issuers value from Authority Information Access (AIA) certificate extension.InputStream.IOException - if an I/O error occurs.protected Collection<Certificate> parseCertificates(InputStream certsData) throws CertificateException
certsData - stream which contains one or more X509 certificates.CertificateException - if parsing error occurs.Copyright © 1998–2025 Apryse Group NV. All rights reserved.