Skip to content

[ENHANCEMENT]: AddObject to SignedXml instance #446

Description

@imedacf

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.

Activity

  1. added
    enhancementAdds a feature, option or export without breaking existing callers
    on Jan 26, 2024
  2. cjbarth commented on Jan 28, 2024

    @cjbarth
    Contributor

    Can you please link to the spec?

  3. imedacf commented on Jan 28, 2024

    @imedacf
    Author

    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.

  4. srd90 commented on Feb 17, 2024

    @srd90

    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):

    1. Link from your comment: https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.xml.signedxml.addobject?view=dotnet-plat-ext-8.0
    2. 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.

    3. And from table of contents of XMLDSIG spec: https://www.w3.org/TR/xmldsig-core/#sec-Object
  5. cjbarth commented on Feb 17, 2024

    @cjbarth
    Contributor

    @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.

  6. srd90 commented on Jun 21, 2025

    @srd90

    Seems that @shunkica has posted PR related to this issue.

    Link to PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAdds a feature, option or export without breaking existing callerspr-welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions