Class CertInformationCollector
- java.lang.Object
-
- org.apache.pdfbox.examples.signature.validation.CertInformationCollector
-
public class CertInformationCollector extends java.lang.ObjectThis 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 Classes Modifier and Type Class Description static classCertInformationCollector.CertSignatureInformationData class to hold Signature, Certificate (and its chain(s)) and revocation Information
-
Constructor Summary
Constructors Constructor Description CertInformationCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAllCertsFromHolders(org.bouncycastle.cert.X509CertificateHolder[] certHolders)Gets a list of X509Certificate out of an array of X509CertificateHolder.java.util.Set<java.security.cert.X509Certificate>getCertificateSet()Get the set of all processed certificates until now.CertInformationCollector.CertSignatureInformationgetLastCertInfo(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature signature, java.lang.String fileName)Gets the certificate information of a signature.
-
-
-
Method Detail
-
getLastCertInfo
public CertInformationCollector.CertSignatureInformation getLastCertInfo(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature signature, java.lang.String fileName) throws CertificateProccessingException, java.io.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 certificatesjava.io.IOException- on a data processing error
-
addAllCertsFromHolders
public void addAllCertsFromHolders(org.bouncycastle.cert.X509CertificateHolder[] certHolders) throws CertificateProccessingExceptionGets 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
public java.util.Set<java.security.cert.X509Certificate> getCertificateSet()
Get the set of all processed certificates until now.- Returns:
- a set of serial numbers to certificates.
-
-