Class CertInformationCollector
java.lang.Object
org.apache.pdfbox.examples.signature.validation.CertInformationCollector
This class helps to extract data/information from a signature. The information is held in
CertSignatureInformation. Some information is needed for validation processing of the
participating certificates.
- Author:
- Alexis Suter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classData class to hold Signature, Certificate (and its chain(s)) and revocation Information -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllCertsFromHolders(org.bouncycastle.cert.X509CertificateHolder[] certHolders) Gets a list of X509Certificate out of an array of X509CertificateHolder.Get the set of all processed certificates until now.getLastCertInfo(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature signature, String fileName) Gets the certificate information of a signature.
-
Constructor Details
-
CertInformationCollector
public CertInformationCollector()
-
-
Method Details
-
getLastCertInfo
public CertInformationCollector.CertSignatureInformation getLastCertInfo(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature signature, String fileName) throws CertificateProccessingException, IOException Gets the certificate information of a signature.- Parameters:
signature- the signature of the document.fileName- of the document.- Returns:
- the CertSignatureInformation containing all certificate information
- Throws:
CertificateProccessingException- when there is an error processing the certificatesIOException- on a data processing error
-
addAllCertsFromHolders
public void addAllCertsFromHolders(org.bouncycastle.cert.X509CertificateHolder[] certHolders) throws CertificateProccessingException Gets a list of X509Certificate out of an array of X509CertificateHolder. The certificates will be added to certificateSet.- Parameters:
certHolders- Array of X509CertificateHolder- Throws:
CertificateProccessingException- when one of the Certificates could not be parsed.
-
getCertificateSet
Get the set of all processed certificates until now.- Returns:
- a set of serial numbers to certificates.
-