Class TrustedCertificatesStore
java.lang.Object
com.itextpdf.signatures.validation.TrustedCertificatesStore
Trusted certificates storage class to be used to configure trusted certificates in a particular way.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCATrustedCertificates(Collection<Certificate> certificates) Add collection of certificates to be trusted to be CA certificates.voidaddCrlTrustedCertificates(Collection<Certificate> certificates) Add collection of certificates to be trusted for CRL signing.voidaddGenerallyTrustedCertificates(Collection<Certificate> certificates) Add collection of certificates to be trusted for any possible usage.voidaddOcspTrustedCertificates(Collection<Certificate> certificates) Add collection of certificates to be trusted for OCSP response signing.voidaddTimestampTrustedCertificates(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.Get all the certificates having name as subject, which where provided to this storage as trusted certificate.getCertificatesTrustedForCA(String certificateName) Get certificates, if any, which is trusted to be a CA, which corresponds to the provided certificate name.getCertificatesTrustedForCrl(String certificateName) Get certificates, if any, which is trusted for CRL generation, which corresponds to the provided certificate name.getCertificatesTrustedForOcsp(String certificateName) Get certificates, if any, which is trusted for OCSP response generation, which corresponds to the provided certificate name.getCertificatesTrustedForTimestamp(String certificateName) Get certificate, if any, which is trusted for timestamp generation, which corresponds to the provided certificate name.getGenerallyTrustedCertificates(String certificateName) Get certificates, if any, which is trusted for any usage, which corresponds to the provided certificate name.getKnownCertificates(String certificateName) Get certificates, if any, which corresponds to the provided certificate name.booleanisCertificateGenerallyTrusted(Certificate certificate) Check if provided certificate is configured to be trusted for any purpose.booleanisCertificateTrustedForCA(Certificate certificate) Check if provided certificate is configured to be trusted to be CA.booleanisCertificateTrustedForCrl(Certificate certificate) Check if provided certificate is configured to be trusted for CRL generation.booleanisCertificateTrustedForOcsp(Certificate certificate) Check if provided certificate is configured to be trusted for OCSP response generation.booleanisCertificateTrustedForTimestamp(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-CollectionofCertificateinstances
-
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-CollectionofCertificateinstances
-
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-CollectionofCertificateinstances
-
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-CollectionofCertificateinstances
-
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-CollectionofCertificateinstances
-
isCertificateGenerallyTrusted
Check if provided certificate is configured to be trusted for any purpose.- Parameters:
-
certificate-Certificateto be checked - Returns:
-
trueis provided certificate is generally trusted,falseotherwise
-
isCertificateTrustedForOcsp
Check if provided certificate is configured to be trusted for OCSP response generation.- Parameters:
-
certificate-Certificateto be checked - Returns:
-
trueis provided certificate is trusted for OCSP generation,falseotherwise
-
isCertificateTrustedForCrl
Check if provided certificate is configured to be trusted for CRL generation.- Parameters:
-
certificate-Certificateto be checked - Returns:
-
trueis provided certificate is trusted for CRL generation,falseotherwise
-
isCertificateTrustedForTimestamp
Check if provided certificate is configured to be trusted for timestamp generation.- Parameters:
-
certificate-Certificateto be checked - Returns:
-
trueis provided certificate is trusted for timestamp generation,falseotherwise
-
isCertificateTrustedForCA
Check if provided certificate is configured to be trusted to be CA.- Parameters:
-
certificate-Certificateto be checked - Returns:
-
trueis provided certificate is trusted for certificates generation,falseotherwise
-
getGenerallyTrustedCertificates
Get certificates, if any, which is trusted for any usage, which corresponds to the provided certificate name.- Parameters:
-
certificateName-Stringcertificate name - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-
getCertificatesTrustedForOcsp
Get certificates, if any, which is trusted for OCSP response generation, which corresponds to the provided certificate name.- Parameters:
-
certificateName-Stringcertificate name - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-
getCertificatesTrustedForCrl
Get certificates, if any, which is trusted for CRL generation, which corresponds to the provided certificate name.- Parameters:
-
certificateName-Stringcertificate name - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-
getCertificatesTrustedForTimestamp
Get certificate, if any, which is trusted for timestamp generation, which corresponds to the provided certificate name.- Parameters:
-
certificateName-Stringcertificate name - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-
getCertificatesTrustedForCA
Get certificates, if any, which is trusted to be a CA, which corresponds to the provided certificate name.- Parameters:
-
certificateName-Stringcertificate name - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-
getKnownCertificates
Get certificates, if any, which corresponds to the provided certificate name.- Parameters:
-
certificateName-Stringcertificate name - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-
getAllTrustedCertificates
Get all the certificates, which where provided to this storage as trusted certificate.- Returns:
-
CollectionofCertificateinstances
-
getAllTrustedCertificates
Get all the certificates having name as subject, which where provided to this storage as trusted certificate.- Parameters:
-
name- the subject name value for which to retrieve all trusted certificate - Returns:
-
set of
Certificatewhich correspond to the provided certificate name
-