1

I want to ask if exsist a way in xades4j to made multiple signature.

For multiple signature i mean not countersignature, but a double independent sign to the same document, the resulting signature will have 2 or more signature object. In pratice a signer can take a xml signed document as input and resign it.

In other way i need a method to take as input a xml signed file and get as output the original xml document.

Thanks,

Michele

Michele Bortolato
  • 707
  • 2
  • 11
  • 27

1 Answers1

2

The "multiple signature" you've described seems to be specific of your use-case. As a library XAdES4j doesn't have that out of the box, but won't stop you from doing it. You just need to compose the references on each signature in the appropriate way and use a signer twice (probably you don't want to apply the second signature over the first one).

Likewise, there's no method to obtain the "original xml document", because the signed resources maybe even be other than xml. That's something that likely belongs to your application logic.

lgoncalves
  • 2,040
  • 1
  • 14
  • 12
  • Thanks, for multiple signature i mean the parallel signature described in w3c xades standard on paragraph 5.2.4, i know that this kind of signature seems quite tricky for xades, i am trying to see if xades4j have some utility code for do this, honestly i don't know if other libraries (for example iaik) do this. – Michele Bortolato Sep 03 '12 at 18:57
  • Those independent/parallel signatures are just different signatures, probably over the same resources. I previously said that you'd use the signer twice, but it's also possible that you use a different signer (to use different keys, for example). You just need to build the references and append the signature in a way that adding the 2nd signature doesn't break the 1st. – lgoncalves Sep 04 '12 at 20:28