Skip to content

Conversation

@parallels999
Copy link
Contributor

After #325 this functionality was lost

Trying same as #335

This allow us to do

const C14nCanonicalization = require('xml-crypto').C14nCanonicalization 
const ExclusiveCanonicalization= require('xml-crypto').ExclusiveCanonicalization

// Use Example 
const DOMParser = require("@xmldom/xmldom").DOMParser
let xml_string = '<root><child>123</child></root>'
let documentElement= (new DOMParser()).parseFromString(xml_string).documentElement

// C14nCanonicalization
console.log( (new C14nCanonicalization()).process(documentElement, {}).toString() )
// ExclusiveCanonicalization
console.log( (new ExclusiveCanonicalization()).process(documentElement, {}).toString() )

@cjbarth cjbarth self-assigned this Aug 24, 2024
@cjbarth cjbarth changed the title Exports C14nCanonicalization, ExclusiveCanonicalizatio Exports C14nCanonicalization, ExclusiveCanonicalization Aug 24, 2024
@cjbarth cjbarth merged commit f9b3682 into node-saml:master Aug 24, 2024
cjbarth pushed a commit that referenced this pull request Mar 14, 2025
* Exports C14nCanonicalization, ExclusiveCanonicalization (#471)

* Ensure that they agree on loading References from canon XML

* Fix specific exploits

* Clarify Comments

* Add tests and multiple SignedInfo check.

* Only allow exclusive canon.

* Updates based on feedback.

* Update signedInfo naming.

* Remove unnecessary comment.

* Apply suggested changes

* Iterate on error behavior

* Edit

* Adding back the edit

---------

Co-authored-by: parallels999 <109294935+parallels999@users.noreply.github.com>
Co-authored-by: mattgd <matt.dzwonczyk@workos.com>
Co-authored-by: Blair Weber <blair@workos.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants