Class CAdESLevelBaselineLTA

All Implemented Interfaces:
SignatureExtension<CAdESSignatureParameters>

public class CAdESLevelBaselineLTA
extends CAdESLevelBaselineLT
This class holds the CAdES-A signature profiles; it supports the later, over time _extension_ of a signature with id-aa-ets-archiveTimestampV2 attributes as defined in ETSI TS 101 733 V1.8.1, clause 6.4.1. "If the certificate-values and revocation-values attributes are not present in the CAdES-BES or CAdES-EPES, then they shall be added to the electronic signature prior to computing the archive time-stamp token." is the reason we extend from the XL profile.
  • Field Details

    • tspSource

      protected final TSPSource tspSource
      The TSPSource to request a timestamp (T- and LTA-levels)
  • Constructor Details

  • Method Details

    • preExtendCMSSignedData

      protected org.bouncycastle.cms.CMSSignedData preExtendCMSSignedData​(org.bouncycastle.cms.CMSSignedData cmsSignedData, CAdESSignatureParameters parameters)
      Pre-extends the root Signed Data. Executed at the beginning for all SignerInformations
      Parameters:
      cmsSignedData - CMSSignedData
      parameters - CAdESSignatureParameters
      Returns:
      extended CMSSignedData
    • extendSignerInformation

      protected org.bouncycastle.cms.SignerInformation extendSignerInformation​(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation, CAdESSignatureParameters parameters) throws DSSException
      Extends the SignerInformation
      Overrides:
      extendSignerInformation in class CAdESLevelBaselineLT
      Parameters:
      cmsSignedData - CMSSignedData
      signerInformation - SignerInformation
      parameters - CAdESSignatureParameters
      Returns:
      SignerInformation
      Throws:
      DSSException
    • extendCMSSignedData

      protected org.bouncycastle.cms.CMSSignedData extendCMSSignedData​(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation, CAdESSignatureParameters parameters)
      Extends the root Signed Data. Nothing to do by default.
      Overrides:
      extendCMSSignedData in class CAdESLevelBaselineLT
      Parameters:
      cmsSignedData - CMSSignedData
      signerInformation - SignerInformation
      parameters - CAdESSignatureParameters
      Returns:
      extended CMSSignedData
    • extendSignatures

      public CMSSignedDocument extendSignatures​(DSSDocument signatureToExtend, CAdESSignatureParameters parameters)
      Description copied from interface: SignatureExtension
      Extends the level of the signatures contained in a document.
      Specified by:
      extendSignatures in interface SignatureExtension<CAdESSignatureParameters>
      Parameters:
      signatureToExtend - DSSDocument to be extended
      parameters - CAdESSignatureParameters of the extension
      Returns:
      CMSSignedDocument a new extended document
    • extendCMSSignatures

      public org.bouncycastle.cms.CMSSignedData extendCMSSignatures​(org.bouncycastle.cms.CMSSignedData cmsSignedData, CAdESSignatureParameters parameters)
      Extends a CMSSignedData
      Parameters:
      cmsSignedData - CMSSignedData to extend
      parameters - CAdESSignatureParameters
      Returns:
      CMSSignedData
    • extendCMSSignatures

      public org.bouncycastle.cms.CMSSignedData extendCMSSignatures​(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation, CAdESSignatureParameters parameters)
      Extends a CMSSignedData with a specified SignerInformation NOTE: does not modify other SignerInformations
      Parameters:
      cmsSignedData - CMSSignedData to extend
      signerInformation - SignerInformation to extend
      parameters - CAdESSignatureParameters
      Returns:
      CMSSignedData
    • newCAdESSignature

      protected CAdESSignature newCAdESSignature​(org.bouncycastle.cms.CMSSignedData cmsSignedData, org.bouncycastle.cms.SignerInformation signerInformation, List<DSSDocument> detachedContents)
      Creates a CAdESSignature. Note: recommended method to use.
      Parameters:
      cmsSignedData - CMSSignedData of a signature to create
      signerInformation - SignerInformation
      detachedContents - a list of detached DSSDocuments
      Returns:
      created CAdESSignature
    • getTimeStampAttributeValue

      protected org.bouncycastle.asn1.ASN1Object getTimeStampAttributeValue​(byte[] messageToTimestamp, DigestAlgorithm timestampDigestAlgorithm, org.bouncycastle.asn1.cms.Attribute... attributesForTimestampToken)
      Generates and returns a TimeStamp attribute value
      Parameters:
      messageToTimestamp - binaries to be timestamped
      timestampDigestAlgorithm - DigestAlgorithm to use
      attributesForTimestampToken - Attributes to add
      Returns:
      ASN1Object representing a TimeStamp token attribute value