makdimka077 / xades4j

Automatically exported from code.google.com/p/xades4j
GNU Lesser General Public License v3.0
0 stars 0 forks source link

ds:reference tag is added 3 times in signed documents #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
HI,

I found an other problem that is ds:reference tag is added 3 times when siging 
xml using xades4j. like below--

<ds:Reference Id="xmldsig-8e3349b5-c756-474a-8ec4-67d7ccc6a496-ref0" URI="">
<ds:Transforms>
<ds:Transform 
Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>AvUkeMdgGhZhm2zYWyP4iwnvs34HvKssbysrrYiwf80=</ds:DigestValue>

</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" 
URI="#xmldsig-8e3349b5-c756-474a-8ec4-67d7ccc6a496-signedprops">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>ZKR6OKdhyElbvLeQScFPDkzM6QoIZsFIpCf5bsiaQTc=</ds:DigestValue>
</ds:Reference>

<ds:Reference URI="#xmldsig-8e3349b5-c756-474a-8ec4-67d7ccc6a496-keyinfo">
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>zCu/plHYdZSAJJIPH9eXpvoMqzIhHZaVuBIKVk9NLQ8=</ds:DigestValue>
</ds:Reference>

Even  in most of file which is verify successfully this tag exist only 2 time, 
last one ds:reference tag is extra and it might be an reason of verification 
failure.So tell me, How i can avoid it to add 3 time. Give your suggestion 

Thanks
jay

Original issue reported on code.google.com by jay...@gmail.com on 27 Mar 2014 at 1:31

GoogleCodeExporter commented 9 years ago
As you may notice, the 3 refs are different. The first is your signed content. 
The second is the reference over the signed properties, as defined by XAdES. 
The last reference is signing KeyInfo because probably you requested that the 
signing certificate should be signed using a BasicSignatureOptionsProvider. Is 
this correct?

Again, if this is not an issue, please use stack overflow for Q&A.

Original comment by luis.fgoncalv on 27 Mar 2014 at 2:50

GoogleCodeExporter commented 9 years ago

Original comment by luis.fgoncalv on 8 Apr 2014 at 8:24