Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Parallel Signature support #87

@brunovianarezende

Description

@brunovianarezende

I'm trying to use xadesjs to support multiple paralles signatures in a document. My use case is:

  1. a document might be signed by multiple users
  2. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions