xml-crypto
xml-crypto copied to clipboard
[ENHANCEMENT]: AddObject to SignedXml instance
Is your feature request related to a problem? Please describe...
I don't think there is a way to addObject to SignedXml instance. Would be nice to add this functionality. Currently missing it myself.
Describe teh solution you'd like...
(new SignedXml()).AddObject(xmlString) would be easy to use this functionality.
Describe the alternatives you've considered...
I don't think there is any other alternative to addobject in signature xml currently.
Can you please link to the spec?
Have similar functionality in C# and wiling to do same in js. This is C# documentation of generating XML signature and adding the object I am signing inside it:
https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.xml.signedxml.addobject?view=dotnet-plat-ext-8.0
I will try to find official specs on this.
I will try to find official specs on this.
@imedacf are you looking for the spec at the end of this search path (step 3):
- Link from your comment: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.xml.signedxml.addobject?view=dotnet-plat-ext-8.0
- Remarks at that page https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.xml.signedxml.addobject?view=dotnet-plat-ext-8.0#remarks say
The AddObject method adds an
<Object>
element that represents an object to be signed to the<Signature>
element of an XML digital signature. ... For more information about XML digital signatures, see the XMLDSIG specification. - And from table of contents of XMLDSIG spec: https://www.w3.org/TR/xmldsig-core/#sec-Object
@srd90 , you're always on top of this stuff :) Thanks!
@imedacf , please feel free to put up a PR that aligns with this spec and we'll review it.