ExploitingStuctures
ExploitingStuctures

Reputation: 11

Processing the SignedProperties node in XaDeS XML Signature(C++)

So I'm trying to compute the digest value of the SignedProperties element according to XaDeS-EPES signature standard but I always get an incorrect digest value.

I know the steps to follow, which are canonicalization of the node(according to XML Canonicalization V1.0 https://www.w3.org/TR/xml-exc-c14n/), then the computation of the sha-256 binary digest and finally the base64 encoding and insertion in the Reference node pointing to the SignedProperties.

Since I'm currently computing other correct values with the same functions, I think the error is on the canonicalization step, currently I'm working with the c14n function belonging to the libxml2 but if I pass the node as it is, it throws an error because the namespaces are not defined in the node, I've tried adding the declarations inside the SignedProperties node but I can't get the proper digest.

Does anyone have any clue?

Thank you for your time and knowledge, best regards ;D

Upvotes: 1

Views: 392

Answers (1)

user17477799
user17477799

Reputation: 1

I had a similar problem. The solution was to replace <tag/> by <tag></tag>.

Not sure that it is the answer to your question.

Upvotes: 0

Related Questions