Class PAdESWithExternalCMSService

java.lang.Object
eu.europa.esig.dss.pades.signature.PAdESWithExternalCMSService
All Implemented Interfaces:
Serializable

public class PAdESWithExternalCMSService extends Object implements Serializable
This service contains methods for a PAdES signature creation using an external CMS provider.

To create a signature with the current class, please follow the algorithm: 1) Create a message-digest computed on PDF ByteRange: Digest messageDigest = getMessageDigest(DSSDocument toSignDocument, PAdESSignatureParameters parameters); 2) Create CMS signature signing the message-digest (e.g. using a remote-signing solution): DSSDocument cmsDocument = *create CMS using message-digest*; 3) OPTIONAL : verify validity of the obtained CMS signature using the methods: - isValidCMSSignedData(Digest messageDigest, DSSDocument cms) - to check cryptographical validity of the signature; - isValidPAdESBaselineCMSSignedData(Digest messageDigest, DSSDocument cms) - to check CMS applicability rules for a PAdES signature creation; 4) Create PAdES signature by incorporating obtained CMS signature to a PDF document: DSSDocument signedDocument = signDocument(DSSDocument toSignDocument, PAdESSignatureParameters parameters, DSSDocument cmsDocument).

NOTES: - Unlike configuration in PAdESService an instance of PAdESSignatureParameters in this class does not need to have signingCertificate and certificateChain defined when using external signing. - Signature extension to -T level with the current class will never lead to a signature-timestamp incorporated within CMS Signed Data. It always creates a new revision with a document timestamp. - Content timestamp is not supported by this service.

See Also: