Class CAdESLevelBaselineLTA

  • All Implemented Interfaces:
    SignatureExtension<CAdESSignatureParameters>

    public class CAdESLevelBaselineLTA
    extends Object
    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 Detail

      • tspSource

        protected final TSPSource tspSource
    • Constructor Detail

      • CAdESLevelBaselineLTA

        public CAdESLevelBaselineLTA​(TSPSource tspSource,
                                     CertificateVerifier certificateVerifier,
                                     boolean onlyLastSigner)
    • Method Detail

      • preExtendCMSSignedData

        protected org.bouncycastle.cms.CMSSignedData preExtendCMSSignedData​(org.bouncycastle.cms.CMSSignedData cmsSignedData,
                                                                            CAdESSignatureParameters parameters)
        Extends the root Signed Data. Nothing to do by default.
        Parameters:
        cmsSignedData - CMSSignedData
        parameters - CAdESSignatureParameters
        Returns:
        extended CMSSignedData
      • extendCMSSignature

        protected org.bouncycastle.cms.SignerInformation extendCMSSignature​(org.bouncycastle.cms.CMSSignedData cmsSignedData,
                                                                            org.bouncycastle.cms.SignerInformation signerInformation,
                                                                            CAdESSignatureParameters parameters)
                                                                     throws DSSException
        Extends the SignerInformation
        Parameters:
        cmsSignedData - CMSSignedData
        signerInformation - SignerInformation
        parameters - CAdESSignatureParameters
        Returns:
        SignerInformation
        Throws:
        DSSException
      • extendCMSSignatures

        public org.bouncycastle.cms.CMSSignedData extendCMSSignatures​(org.bouncycastle.cms.CMSSignedData cmsSignedData,
                                                                      CAdESSignatureParameters parameters)
      • getFirstSigner

        protected org.bouncycastle.cms.SignerInformation getFirstSigner​(org.bouncycastle.cms.CMSSignedData cmsSignedData)
      • postExtendCMSSignedData

        public org.bouncycastle.cms.CMSSignedData postExtendCMSSignedData​(org.bouncycastle.cms.CMSSignedData cmsSignedData,
                                                                          org.bouncycastle.cms.SignerInformation signerInformation,
                                                                          List<DSSDocument> detachedContents)
        Extends the root Signed Data. Nothing to do by default.
        Parameters:
        cmsSignedData - CMSSignedData
        signerInformation - SignerInformation
        detachedContents - list of DSSDocuments
        Returns:
        extended CMSSignedData
      • getTimeStampAttributeValue

        protected org.bouncycastle.asn1.ASN1Object getTimeStampAttributeValue​(byte[] message,
                                                                              CAdESSignatureParameters parameters)
      • getTimeStampAttributeValue

        public org.bouncycastle.asn1.ASN1Object getTimeStampAttributeValue​(byte[] messageToTimestamp,
                                                                           DigestAlgorithm timestampDigestAlgorithm,
                                                                           org.bouncycastle.asn1.cms.Attribute... attributesForTimestampToken)