Skip to content

Don't declare the xml prefix on aggregate roots - #353

Merged
theseal merged 1 commit into
masterfrom
jocar-adfs-verification-issue
Nov 12, 2026
Merged

theseal merged 1 commit into
masterfrom
jocar-adfs-verification-issue

Conversation

@theseal

@theseal theseal commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

entitiesdescriptor() copied the whole NS map onto the EntitiesDescriptor root, which emitted an explicit xmlns:xml declaration. The xml prefix is implicitly bound and must never be declared. libxml2 ignores the declaration when canonicalizing, but .NET's SignedXml keeps it, so a signed aggregate failed to verify in ADFSToolkit although xmlsec1 and other libxml2-based verifiers accepted it.

Drop the prefix from the nsmap before building the root, and add a regression test.

entitiesdescriptor() copied the whole NS map onto the EntitiesDescriptor
root, which emitted an explicit xmlns:xml declaration. The xml prefix is
implicitly bound and must never be declared. libxml2 ignores the
declaration when canonicalizing, but .NET's SignedXml keeps it, so a
signed aggregate failed to verify in ADFSToolkit although xmlsec1 and
other libxml2-based verifiers accepted it.

Drop the prefix from the nsmap before building the root, and add a
regression test.
@theseal
theseal requested a review from btmattsson November 11, 2026 08:15

@btmattsson btmattsson left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theseal
theseal merged commit 37cb214 into master Nov 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants