EldoS | Feel safer!

Software components for data protection, secure storage and transfer

XML detached signatures: add transformation to the standard reference?

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#37515
Posted: 08/22/2016 10:44:02
by Hans de Koning (Basic support level)
Joined: 08/22/2016
Posts: 1

Hello,
We just started evaluating SBB .Net for creating detached XML signatures, specifically because the support for transformations and filter in the SBB library is excellent. I think we are getting close to the conclusion of the pilot. We are stuck with a particular issue in the references node. I add 2 reference documents, so I get 2 Reference nodes in the output. In addition, the SBB library adds one more Reference node, over which I do not have much control. Now I get the following:


Code
    <ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#SignedProperties-1646591646">
      <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"></ds:DigestMethod>
      <ds:DigestValue>6W7FXphE1wkuzE6Co9KMkMk1g9XCKkXvvMjtzxItaqw=</ds:DigestValue>
    </ds:Reference>



Whereas the receiver expects like this:


Code
   <ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#SignedProperties-1646591646">
      <ds:Transforms>
         <ds:Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
      </ds:Transforms>
      <ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
      <ds:DigestValue>DEuGO7qJ/Euwy06DaYqbiv0xjmXo2nsUVklwk02GizA=</ds:DigestValue>
   </ds:Reference>


Could you please indicate how can I add the transform for the standard Reference node? BTW, i've found out how to add the transformation to the reference nodes that I add explicitly of my own. That works flawlessly.
#37522
Posted: 08/22/2016 17:20:35
by Dmytro Bogatskyy (EldoS Corp.)

Thank you for contacting us.

Quote
Could you please indicate how can I add the transform for the standard Reference node?

You can access the auto-generated SignedProperties reference using ElXMLSigner.Signature.SignedInfo.SigPropRef property. Please refer to this how-to https://www.eldos.com/documentation/sb...igest.html for details. Or use this sample:
Code
XMLSigner.GenerateSignature();
...
XMLSigner.Signature.SignedInfo.SigPropRef.TransformChain.AddCanonicalizationTransform(SBXMLDefs.Unit.xcmCanonComment);

Reply

Statistics

Topic viewed 333 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!