Class CAdESLevelBaselineT

  • All Implemented Interfaces:
    SignatureExtension<CAdESSignatureParameters>

    public class CAdESLevelBaselineT
    extends Object
    This class holds the CAdES-T signature profile; it supports the inclusion of the mandatory unsigned id-aa-signatureTimeStampToken attribute as specified in ETSI TS 101 733 V1.8.1, clause 6.1.1.
    • Field Detail

      • tspSource

        protected final TSPSource tspSource
    • Constructor Detail

      • CAdESLevelBaselineT

        public CAdESLevelBaselineT​(TSPSource tspSource,
                                   boolean onlyLastCMSSignature)
    • Method Detail

      • extendCMSSignature

        protected org.bouncycastle.cms.SignerInformation extendCMSSignature​(org.bouncycastle.cms.CMSSignedData signedData,
                                                                            org.bouncycastle.cms.SignerInformation signerInformation,
                                                                            CAdESSignatureParameters parameters)
                                                                     throws DSSException
        Extends the SignerInformation
        Parameters:
        signedData - 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)
      • 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
      • 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)