Class ExternalCMSService

java.lang.Object
eu.europa.esig.dss.pades.signature.ExternalCMSService

public class ExternalCMSService extends Object
This service is used to generate a CMSSignedData used for incorporation within a PDF document for a PAdES signature creation.

To create a CMS with the current class, please follow the algorithm: 1) Compute DTBS using message-digest of the PDF signature's ByteRange: ToBeSigned toBeSigned = getDataToSign(Digest messageDigest, PAdESSignatureParameters parameters); 2) Create signature value using private-key signing: SignatureValue signatureValue = *sign toBeSigned data*; 3) Create CMS signature signing the message-digest: CMSSignedDocument cmsSignature = signMessageDigest( Digest messageDigest, PAdESSignatureParameters parameters, SignatureValue signatureValue);

NOTE : This class does not create CAdES-BASELINE signatures, but CAdES-Extended signatures as per ETSI EN 319 122-2, suitable for a PAdES-BASELINE creation.