Closed wellbranding closed 2 years ago
Take a look at the description here: https://github.com/open-eid/digidoc4j/wiki/Examples-of-using-it#saving-container-and-datatosign-objects-during-signature-creation
This explains how to do signing in multiple steps.
You need new DataToSign object for each signer and it must be stored for finalization as described in above example.
Hello, how can I solve the following issue: I need multiple signers to sign a document. Each signer has a different certificate. I use that certificate to pass it to the instance of the class DataToSign with method withSigningCertificate(). However, how can I add multiple signing certificates?
Or should I use a new container for the same document and sign the same document with only a single certificate?
I am thinking about the following flow:
Get a signature from every signer, like this:
//Finalize the signature Signature signature = dataToSign.finalize(signatureValue);
3.Then deserialize container and attach that signature.
The only question remains: is it alright to serialize a container, with attached signature? I did not see it in the sample, perhaps it is not possible?