Skip to content

Add SetReferenceType method to SignedXml and SignedXmlImpl (#10139) - #10212

Open
Marco Antonio Mauro (marcus905) wants to merge 1 commit into
microsoft:mainfrom
marcus905:bug/10139-signedxml-reference-type
Open

Add SetReferenceType method to SignedXml and SignedXmlImpl (#10139)#10212
Marco Antonio Mauro (marcus905) wants to merge 1 commit into
microsoft:mainfrom
marcus905:bug/10139-signedxml-reference-type

Conversation

@marcus905

@marcus905 Marco Antonio Mauro (marcus905) commented Aug 12, 2026

Copy link
Copy Markdown

What & why

Adds support for setting the Type property on an XMLDSIG Reference through the public SignedXml codeunit.

SignedXml already exposes the reference URI, digest method, and transforms, but not the underlying Reference.Type property. This prevents callers from creating XML signatures that require a typed reference, such as a reference to XAdES SignedProperties.

The change adds SetReferenceType(Type: Text) to SignedXml and its implementation, together with a unit test verifying that the configured value is emitted as the Type attribute of the generated <Reference> element.

Linked work

Fixes #10139

How I validated this

  • I read the full diff and it contains only changes I intended.
  • I built the affected app(s) locally with no new analyzer warnings.
  • I ran the change in Business Central and confirmed it behaves as expected.
  • I added or updated tests for the new behavior, or explained below why none are needed.

What I tested and the outcome (required — be specific: scenarios, commands, screenshots for UI changes)

  • Added a unit test in SignedXmlModuleTest.Codeunit.al that initializes an XMLDSIG reference, sets its Type, computes the signature, and verifies that the generated <Reference> element contains the expected Type attribute.
  • The affected Cryptography Management test module passes locally.
  • No UI changes are involved.

Risk & compatibility

Low risk. The change only adds a new public procedure and delegates it to the existing underlying .NET Reference.Type property.

There are no breaking changes, data or upgrade impacts, permission changes, telemetry changes, or feature flags.

@github-actions github-actions Bot added AL: System Application From Fork Pull request is coming from a fork Integration GitHub request for Integration area needs-approval Workflow runs require maintainer approval to start labels Aug 12, 2026
@marcus905

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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

Labels

AL: System Application From Fork Pull request is coming from a fork Integration GitHub request for Integration area needs-approval Workflow runs require maintainer approval to start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: SignedXml does not expose Reference.Type

1 participant