-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with namespaces in canonicalization #210
Comments
I don't see any of your document so no idea why the errors.
…On 6/11/20 9:31 PM, Wilfredo Pachón López wrote:
I'm trying to sign an XML withe de first lines like this
When try to sign this I have the following warnings and the result is
wrong:
DOMNode::C14N(): Relative namespace UR is invalid here : dian
DOMNode::C14N(): Internal error : checking for relative namespaces
DOMNode::C14N(): Internal error : processing docs children list
How can I fix them?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#210>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABTNRISQ65WR5ATKCUDBQLRWGAP3ANCNFSM4N3426QQ>.
|
Thanks for the response.
And the warning and failure is reported in line 296 of the script robrichards/xmlseclibs/src/XMLSecurityDSig.php:
All seems to be good but always throw the error: |
I would need to see the full document and code being used to know what you are trying to sign and what's being passed in. |
Thanks, the XML document to be signed looks like: And the code used to sign: `
|
Alguna solución a este problema? Tengo el mismo problema |
se pudo solucionar este problema? |
I am no expert in this topic but did a little research as I recently run into this issue myself. Here are my foundings:
|
@moltam Thanks for posting your analysis which solved the issue for me. I'm using canonicalization in PHP and, as a third party test, using the canonicalization class built into the Microsoft .NET Framework cryptography package. PHP (libxml) does report errors with relative namespaces but the .NET Framework implementation does not which caught me out. |
Or |
I am sorry. |
I have found a solution to this issue, this is in https://es.stackoverflow.com/a/532015/283864 Regards! |
I'm trying to sign an XML withe de first lines like this
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:sts="dian:gov:co:facturaelectronica:Structures-2-1" xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xades141="http://uri.etsi.org/01903/v1.4.1#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd">
When try to sign this I have the following warnings when the sytem try to use
DOMNode::C14N
to canonicalize and the result is wrong:DOMNode::C14N(): Relative namespace UR is invalid here : dian DOMNode::C14N(): Internal error : checking for relative namespaces DOMNode::C14N(): Internal error : processing docs children list
How can I fix them?
The text was updated successfully, but these errors were encountered: