Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [c14n]

Canonical XML [XML-C14N] specifies a standard serialization of XML.

0 votes
0 answers
59 views

How to generate canonicalized element using c14n11

I am signing my XML document using Python's signxml library. Here's my code: signer = XMLSigner( method=methods.enveloped, signature_algorithm="rsa-sha256", ...
Package.JSON's user avatar
1 vote
0 answers
19 views

Trying to solve SAML interop issue between .NET and org.apache.santuario.xmlsec (specifically, Ping Federate)

The issue is fairly well documented, however a solution from either Microsoft, or the community does not seem forthcoming. When an identity provider platform utilising org.apache.santuario.xmlsec ...
npen's user avatar
  • 21
1 vote
2 answers
528 views

What does "c14n" mean?

The Canonical XML spec does not explain "c14n". Is it an abbreviation or something? Cee-One-Four-En Leetspeak for clan What does it stand for?
aggsol's user avatar
  • 2,420
0 votes
1 answer
403 views

Don't find how to calculate the correct DigestValue of my XML - C#

I need to perform the calculation of the digestValue of a SignedInfo balise from my XMLDocument. Instructions provided are : Perform XML canonicalisation on the DataPDU (including start and end tags ...
Nominak's user avatar
1 vote
1 answer
292 views

XML Canonicalization for elements with namespaces

Canonical XML standard https://www.ietf.org/rfc/rfc3076.txt contains various examples but none with the input document having a namespace on the element name. So what is the canonical form of <...
Juergen's user avatar
  • 55
1 vote
0 answers
99 views

PHP C14N() change characters inside CDATA

I have an xml that I must sign, however when I send it it has a structure something like this: <cbc:EncodingCode>UTF-8</cbc:EncodingCode> <cbc:Description> <![CDATA[<...
Camilo Castilla's user avatar
2 votes
0 answers
212 views

Java c14N Canonicaliser - Attribute name order is in the wrong order

Java c14n Canonicalizer is switching up the attribute order of the canonicalized XML assertion. The canonicalizer is outputting the following string post canonicaliztion: <saml:Assertion ID="...
Srikar's user avatar
  • 21
0 votes
0 answers
87 views

Problems with XML digest value (for The Danish Health Data Authority)

I want to create some XML which has to contain a digest value, i.e., a BASE64 encoded hash value of some of the XML in canonical (C14N) form, but the receiver does not accept the value my code ...
Andrew Rump's user avatar
0 votes
1 answer
45 views

XmlStar usage in C#

I am trying to canonicalize a few xml documents. As I see it can be achieved by using XmlStar by executing a CMD command xml c14n --exc-without-comments test_xml.xml > test_xml_canonicalize.xml My ...
dmxyler's user avatar
  • 79
2 votes
0 answers
488 views

Wrong DigestValue: "Hash values do not match" XML with PHP

I am trying to sign an XML file and in all the requests I make I get the error "Hash values ​​do not match." This is my XML <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap....
Viviana Andrea Zuluaga Bolaños's user avatar
1 vote
0 answers
426 views

Why not working canonicalizer XML in nojejs xml-c14n

I have problem in XML, when I need that a element child contain Parent's attributes in Nodejs. Now only atribute show in child canonicalized is xmlns, but, for instance, there are attributes xmlns:ns1,...
Rodrigo Matheus's user avatar
0 votes
1 answer
518 views

Extract portion of an xml without using tostring in python

Say I have an XML code like this one: <a> <na:Data xmlns:na="http://some_site.com#" Ref="http://another_site.com" Key="value"> <b> <c>some_c_attrib</c> <d&...
Roy's user avatar
  • 45
11 votes
0 answers
2k views

Wrong canonicalization (c14n) made by SignedXml - it removes line breaks (&#13;) - is it a .NET bug?

We are receiving signed xmls from third parties which are using java. Our .NET implementation validates correctly the signatures, except when the xml contain the &#13; character reference. It ...
csg's user avatar
  • 2,107
2 votes
0 answers
339 views

Canonicalise XML file using PowerShell

Is there an inbuilt mechanism within PowerShell (or within .NET that can be used by PowerShell) that will allow me to canonicalise an XML file (see step 2 below)? The canonicalisation must be based ...
gerard's user avatar
  • 928
3 votes
1 answer
2k views

lxml - TypeError: write() got an unexpected keyword argument 'default_namespace'

Below is a minimal working example. I have tested this with Python 3.4, Python 3.6 32 bit and Python 3.6 64 bit. import io from lxml import etree test_node = etree.fromstring(''' <soap:Envelope ...
nagylzs's user avatar
  • 4,058

15 30 50 per page