Class TrustedCertificatesStore
java.lang.Object
com.itextpdf.signatures.validation.v1.TrustedCertificatesStore
Trusted certificates storage class to be used to configure trusted certificates in a particular way.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCATrustedCertificates
(Collection<Certificate> certificates) Add collection of certificates to be trusted to be CA certificates.void
addCrlTrustedCertificates
(Collection<Certificate> certificates) Add collection of certificates to be trusted for CRL signing.void
addGenerallyTrustedCertificates
(Collection<Certificate> certificates) Add collection of certificates to be trusted for any possible usage.void
addOcspTrustedCertificates
(Collection<Certificate> certificates) Add collection of certificates to be trusted for OCSP response signing.void
addTimestampTrustedCertificates
(Collection<Certificate> certificates) Add collection of certificates to be trusted for timestamping.Get all the certificates, which where provided to this storage as trusted certificate.getCertificateTrustedForCA
(String certificateName) Get certificate, if any, which is trusted to be a CA, which corresponds to the provided certificate name.getCertificateTrustedForCrl
(String certificateName) Get certificate, if any, which is trusted for CRL generation, which corresponds to the provided certificate name.getCertificateTrustedForOcsp
(String certificateName) Get certificate, if any, which is trusted for OCSP response generation, which corresponds to the provided certificate name.getCertificateTrustedForTimestamp
(String certificateName) Get certificate, if any, which is trusted for timestamp generation, which corresponds to the provided certificate name.getGenerallyTrustedCertificate
(String certificateName) Get certificate, if any, which is trusted for any usage, which corresponds to the provided certificate name.getKnownCertificate
(String certificateName) Get certificate, if any, which corresponds to the provided certificate name.boolean
isCertificateGenerallyTrusted
(Certificate certificate) Check if provided certificate is configured to be trusted for any purpose.boolean
isCertificateTrustedForCA
(Certificate certificate) Check if provided certificate is configured to be trusted to be CA.boolean
isCertificateTrustedForCrl
(Certificate certificate) Check if provided certificate is configured to be trusted for CRL generation.boolean
isCertificateTrustedForOcsp
(Certificate certificate) Check if provided certificate is configured to be trusted for OCSP response generation.boolean
isCertificateTrustedForTimestamp
(Certificate certificate) Check if provided certificate is configured to be trusted for timestamp generation.
-
Constructor Details
-
TrustedCertificatesStore
public TrustedCertificatesStore()
-
-
Method Details
-
addGenerallyTrustedCertificates
Add collection of certificates to be trusted for any possible usage.- Parameters:
-
certificates
-Collection
ofCertificate
instances
-
addOcspTrustedCertificates
Add collection of certificates to be trusted for OCSP response signing. These certificates are considered to be valid trust anchors for arbitrarily long certificate chain responsible for OCSP response generation.- Parameters:
-
certificates
-Collection
ofCertificate
instances
-
addCrlTrustedCertificates
Add collection of certificates to be trusted for CRL signing. These certificates are considered to be valid trust anchors for arbitrarily long certificate chain responsible for CRL generation.- Parameters:
-
certificates
-Collection
ofCertificate
instances
-
addTimestampTrustedCertificates
Add collection of certificates to be trusted for timestamping. These certificates are considered to be valid trust anchors for arbitrarily long certificate chain responsible for timestamp generation.- Parameters:
-
certificates
-Collection
ofCertificate
instances
-
addCATrustedCertificates
Add collection of certificates to be trusted to be CA certificates. These certificates are considered to be valid trust anchors for certificate generation.- Parameters:
-
certificates
-Collection
ofCertificate
instances
-
isCertificateGenerallyTrusted
Check if provided certificate is configured to be trusted for any purpose.- Parameters:
-
certificate
-Certificate
to be checked - Returns:
-
true
is provided certificate is generally trusted,false
otherwise
-
isCertificateTrustedForOcsp
Check if provided certificate is configured to be trusted for OCSP response generation.- Parameters:
-
certificate
-Certificate
to be checked - Returns:
-
true
is provided certificate is trusted for OCSP generation,false
otherwise
-
isCertificateTrustedForCrl
Check if provided certificate is configured to be trusted for CRL generation.- Parameters:
-
certificate
-Certificate
to be checked - Returns:
-
true
is provided certificate is trusted for CRL generation,false
otherwise
-
isCertificateTrustedForTimestamp
Check if provided certificate is configured to be trusted for timestamp generation.- Parameters:
-
certificate
-Certificate
to be checked - Returns:
-
true
is provided certificate is trusted for timestamp generation,false
otherwise
-
isCertificateTrustedForCA
Check if provided certificate is configured to be trusted to be CA.- Parameters:
-
certificate
-Certificate
to be checked - Returns:
-
true
is provided certificate is trusted for certificates generation,false
otherwise
-
getGenerallyTrustedCertificate
Get certificate, if any, which is trusted for any usage, which corresponds to the provided certificate name.- Parameters:
-
certificateName
-String
certificate name - Returns:
-
Certificate
which corresponds to the provided certificate name
-
getCertificateTrustedForOcsp
Get certificate, if any, which is trusted for OCSP response generation, which corresponds to the provided certificate name.- Parameters:
-
certificateName
-String
certificate name - Returns:
-
Certificate
which corresponds to the provided certificate name
-
getCertificateTrustedForCrl
Get certificate, if any, which is trusted for CRL generation, which corresponds to the provided certificate name.- Parameters:
-
certificateName
-String
certificate name - Returns:
-
Certificate
which corresponds to the provided certificate name
-
getCertificateTrustedForTimestamp
Get certificate, if any, which is trusted for timestamp generation, which corresponds to the provided certificate name.- Parameters:
-
certificateName
-String
certificate name - Returns:
-
Certificate
which corresponds to the provided certificate name
-
getCertificateTrustedForCA
Get certificate, if any, which is trusted to be a CA, which corresponds to the provided certificate name.- Parameters:
-
certificateName
-String
certificate name - Returns:
-
Certificate
which corresponds to the provided certificate name
-
getKnownCertificate
Get certificate, if any, which corresponds to the provided certificate name.- Parameters:
-
certificateName
-String
certificate name - Returns:
-
Certificate
which corresponds to the provided certificate name
-
getAllTrustedCertificates
Get all the certificates, which where provided to this storage as trusted certificate.- Returns:
-
Collection
ofCertificate
instances
-