Class CertInformationCollector


  • public class CertInformationCollector
    extends java.lang.Object
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAllCertsFromHolders​(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.CertSignatureInformation getLastCertInfo​(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature signature, java.lang.String fileName)
      Gets the certificate information of a signature.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CertInformationCollector

        public CertInformationCollector()
    • 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 certificates
        java.io.IOException - 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

        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.