Class CMSVerifyUtils

java.lang.Object
se.swedenconnect.sigval.pdf.utils.CMSVerifyUtils

public class CMSVerifyUtils extends Object
Utility methods for CMS verification
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • CMSVerifyUtils

      public CMSVerifyUtils()
  • Method Details

    • getCMSSignedDataParser

      public static org.bouncycastle.cms.CMSSignedDataParser getCMSSignedDataParser(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature sig, byte[] signedPdfDoc) throws org.bouncycastle.cms.CMSException, IOException
      Obtains a CMSSignedDataParser*
      Parameters:
      sig - The PDSignature of the signature
      signedPdfDoc - the bytes of the complete PDF document holding this signature
      Returns:
      CMSSignedDataParser
      Throws:
      org.bouncycastle.cms.CMSException - on error
      IOException - on error
    • getCMSAlgoritmProtectionData

      public static void getCMSAlgoritmProtectionData(org.bouncycastle.asn1.cms.Attribute cmsAlgoProtAttr, ExtendedPdfSigValResult sigResult)
    • checkAlgoritmConsistency

      public static boolean checkAlgoritmConsistency(ExtendedPdfSigValResult sigResult)