I'm trying to use xadesjs to support multiple paralles signatures in a document. My use case is:
- a document might be signed by multiple users
- each signature is indepedent of the other signatures, i.e. when signing the document, the part of the document that will be signed won't contain the existing signatures
this would allow, for example, the users to remove their signatures from the document without the need to re-sign the document.
I've tried to use multiple enveloped signatures, but it hasn't worked: it seems like the enveloped signature transformation only removes a single enveloped signature fom the document before signing or validation process.
Then, I decided as a new approach to have the original document wrapped by other tag and then sign it by using xpath transforms, pointing to the original content. It would be something like:
<wrappingTag>
<originalContent />
<signature xpath="//originalContent">...</signature>
<signature xpath="//originalContent">...</signature>
...
</wrappingTag>
But then it seems xadesjs doesn't support xpath transform. I've seen in PeculiarVentures/xmldsigjs#32 that xpath transform support was, in theory, added to xmldsigjs and as a consequence to xadesjs, but I couldn't make it work. First, I couldn't put anywhere the xpath I want to use. I changed the code and, for exploration purpose, I hard-coded the xpah I wanted to use, but it didn't work, it seems like the node-set returned by the xpath is just ignored.
is it possible to do what I want (parallel signature support using xpath or not) using xadesjs?
I'm trying to use xadesjs to support multiple paralles signatures in a document. My use case is:
this would allow, for example, the users to remove their signatures from the document without the need to re-sign the document.
I've tried to use multiple enveloped signatures, but it hasn't worked: it seems like the enveloped signature transformation only removes a single enveloped signature fom the document before signing or validation process.
Then, I decided as a new approach to have the original document wrapped by other tag and then sign it by using xpath transforms, pointing to the original content. It would be something like:
But then it seems xadesjs doesn't support xpath transform. I've seen in PeculiarVentures/xmldsigjs#32 that xpath transform support was, in theory, added to xmldsigjs and as a consequence to xadesjs, but I couldn't make it work. First, I couldn't put anywhere the xpath I want to use. I changed the code and, for exploration purpose, I hard-coded the xpah I wanted to use, but it didn't work, it seems like the node-set returned by the xpath is just ignored.
is it possible to do what I want (parallel signature support using xpath or not) using xadesjs?