Class CMSSignedDataObject

java.lang.Object
eu.europa.esig.dss.cms.object.CMSSignedDataObject
All Implemented Interfaces:
CMS

public class CMSSignedDataObject extends Object implements CMS
Implementation of a CMS based on a BouncyCastle org.bouncycastle.cms.CMSSignedData
  • Constructor Summary

    Constructors
    Constructor
    Description
    CMSSignedDataObject(org.bouncycastle.cms.CMSSignedData cmsSignedData)
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder>
    Gets attribute certificates incorporates within CMS
    org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder>
    Gets the certificates store, representing the value of SignedData.certificates field
    org.bouncycastle.cms.CMSSignedData
    Gets a CMSSignedData
    org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder>
    Gets the CRLs store (OCSP excluded), representing the value of SignedData.crls field
    byte[]
    Gets DER-encoded content of the CMS SignedData.
    Set<org.bouncycastle.asn1.x509.AlgorithmIdentifier>
    Returns a set of algorithm identifiers (OIDs) incorporated within SignedData.digestAlgorithms field of CMS
    byte[]
    Gets encoded content of the CMS SignedData, keeping the original encoding.
    org.bouncycastle.util.Store<?>
    Gets the OCSP Basic Store, incorporated within the SignedData.crls field
    org.bouncycastle.util.Store<?>
    Gets the OCSP Responses Store, incorporated within the SignedData.crls field
    Gets the signed content incorporated within the SignedData.encapContentInfo.eContent field
    org.bouncycastle.asn1.ASN1ObjectIdentifier
    Gets signed content type, present within the SignedData.encapContentInfo.eContentType field
    org.bouncycastle.cms.SignerInformationStore
    Gets the signers of the signature, incorporated within the SignedData.signerInfos field
    int
    Returns value of SignedData.version field
    boolean
    Returns whether the signature is detached (i.e.

    Methods inherited from class java.lang.Object

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

    • CMSSignedDataObject

      public CMSSignedDataObject(org.bouncycastle.cms.CMSSignedData cmsSignedData)
      Default constructor
      Parameters:
      cmsSignedData - CMSSignedData
  • Method Details

    • getCMSSignedData

      public org.bouncycastle.cms.CMSSignedData getCMSSignedData()
      Gets a CMSSignedData
      Returns:
      CMSSignedData
    • getVersion

      public int getVersion()
      Description copied from interface: CMS
      Returns value of SignedData.version field
      Specified by:
      getVersion in interface CMS
      Returns:
      integer value
    • getDigestAlgorithmIDs

      public Set<org.bouncycastle.asn1.x509.AlgorithmIdentifier> getDigestAlgorithmIDs()
      Description copied from interface: CMS
      Returns a set of algorithm identifiers (OIDs) incorporated within SignedData.digestAlgorithms field of CMS
      Specified by:
      getDigestAlgorithmIDs in interface CMS
      Returns:
      a set of AlgorithmIdentifiers
    • isDetachedSignature

      public boolean isDetachedSignature()
      Description copied from interface: CMS
      Returns whether the signature is detached (i.e. SignedData.encapContentInfo.eContent is null)
      Specified by:
      isDetachedSignature in interface CMS
      Returns:
      whether the signature is detached
    • getSignedContentType

      public org.bouncycastle.asn1.ASN1ObjectIdentifier getSignedContentType()
      Description copied from interface: CMS
      Gets signed content type, present within the SignedData.encapContentInfo.eContentType field
      Specified by:
      getSignedContentType in interface CMS
      Returns:
      ASN1ObjectIdentifier
    • getSignedContent

      public DSSDocument getSignedContent()
      Description copied from interface: CMS
      Gets the signed content incorporated within the SignedData.encapContentInfo.eContent field
      Specified by:
      getSignedContent in interface CMS
      Returns:
      DSSDocument
    • getCertificates

      public org.bouncycastle.util.Store<org.bouncycastle.cert.X509CertificateHolder> getCertificates()
      Description copied from interface: CMS
      Gets the certificates store, representing the value of SignedData.certificates field
      Specified by:
      getCertificates in interface CMS
      Returns:
      Store
    • getCRLs

      public org.bouncycastle.util.Store<org.bouncycastle.cert.X509CRLHolder> getCRLs()
      Description copied from interface: CMS
      Gets the CRLs store (OCSP excluded), representing the value of SignedData.crls field
      Specified by:
      getCRLs in interface CMS
      Returns:
      Store
    • getAttributeCertificates

      public org.bouncycastle.util.Store<org.bouncycastle.cert.X509AttributeCertificateHolder> getAttributeCertificates()
      Description copied from interface: CMS
      Gets attribute certificates incorporates within CMS
      Specified by:
      getAttributeCertificates in interface CMS
      Returns:
      Store
    • getOcspResponseStore

      public org.bouncycastle.util.Store<?> getOcspResponseStore()
      Description copied from interface: CMS
      Gets the OCSP Responses Store, incorporated within the SignedData.crls field
      Specified by:
      getOcspResponseStore in interface CMS
      Returns:
      Store
    • getOcspBasicStore

      public org.bouncycastle.util.Store<?> getOcspBasicStore()
      Description copied from interface: CMS
      Gets the OCSP Basic Store, incorporated within the SignedData.crls field
      Specified by:
      getOcspBasicStore in interface CMS
      Returns:
      Store
    • getSignerInfos

      public org.bouncycastle.cms.SignerInformationStore getSignerInfos()
      Description copied from interface: CMS
      Gets the signers of the signature, incorporated within the SignedData.signerInfos field
      Specified by:
      getSignerInfos in interface CMS
      Returns:
      SignerInformationStore
    • getDEREncoded

      public byte[] getDEREncoded()
      Description copied from interface: CMS
      Gets DER-encoded content of the CMS SignedData. NOTE: This method returns the encoded value using in-memory byte array. Not applicable for large CMS processing.
      Specified by:
      getDEREncoded in interface CMS
      Returns:
      DER-encoded binaries
    • getEncoded

      public byte[] getEncoded()
      Description copied from interface: CMS
      Gets encoded content of the CMS SignedData, keeping the original encoding.
      Specified by:
      getEncoded in interface CMS
      Returns:
      encoded binaries