{"action":"created","issue":{"url":"https://api.github.com/repos/yaronn/xml-crypto/issues/81","labels_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/81/comments","events_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/81/events","html_url":"https://github.com/yaronn/xml-crypto/issues/81","id":118942194,"number":81,"title":"Error validation","user":{"login":"Gustavinho","id":4228757,"avatar_url":"https://avatars.githubusercontent.com/u/4228757?v=3","gravatar_id":"","url":"https://api.github.com/users/Gustavinho","html_url":"https://github.com/Gustavinho","followers_url":"https://api.github.com/users/Gustavinho/followers","following_url":"https://api.github.com/users/Gustavinho/following{/other_user}","gists_url":"https://api.github.com/users/Gustavinho/gists{/gist_id}","starred_url":"https://api.github.com/users/Gustavinho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gustavinho/subscriptions","organizations_url":"https://api.github.com/users/Gustavinho/orgs","repos_url":"https://api.github.com/users/Gustavinho/repos","events_url":"https://api.github.com/users/Gustavinho/events{/privacy}","received_events_url":"https://api.github.com/users/Gustavinho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-25T23:40:05Z","updated_at":"2015-11-26T00:14:15Z","closed_at":null,"body":"Hi, I'm validating an XML signed by xml-crypto, but always returns me a invalid message, I've attached the signed xml, the public key, and my coffeescript code to sign and verify\r\n\r\ncould you help me whit that please?\r\n\r\nto sign\r\n\r\n    sign = new SignedXml()\r\n    sign.addReference \"//*[local-name(.)='ConsultaSectorPrimario']\" , \"\" , \"\" , \"\" , \"\" , \"\" , true\r\n    sign.keyInfoProvider = new MyKeyInfo( rfc )\r\n    sign.signingKey = fs.readFileSync( \"./certificados/\" + rfc + \".key.pem\" )\r\n    sign.computeSignature xml\r\n    xml = \r\n    [JAEP820923NM9_publicKey.key.pem.txt](https://github.com/yaronn/xml-    crypto/files/44482/JAEP820923NM9_publicKey.key.pem.txt)\r\n    [JAEP820923NM9_publicKey.key.pem.txt](https://github.com/yaronn/xml-    crypto/files/44483/JAEP820923NM9_publicKey.key.pem.txt)\r\n\r\n    [JAEP820923NM9-AOPF580423BIA.txt](https://github.com/yaronn/xml-crypto/files/44484/JAEP820923NM9-AOPF580423BIA.txt)\r\n\r\n    sign.getSignedXml()\r\n\r\nto verify\r\n\r\n    select = require('xml-crypto').xpath\r\n    dom = require('xmldom').DOMParser\r\n    SignedXml = require('xml-crypto').SignedXml\r\n    FileKeyInfo = require('xml-crypto').FileKeyInfo\r\n\r\n    doc = new dom().parseFromString(xml)\r\n    signature = select(doc, \"/*/*[local-name(.)='Signature' and namespace-    uri(.)='http://www.w3.org/2000/09/xmldsig#']\")[0]\r\n    sig = new SignedXml()\r\n    sig.keyInfoProvider = new FileKeyInfo( \"./certificados/\" + receptor + \"_publicKey.key.pem\" )\r\n    sig.loadSignature(signature.toString())\r\n    res = sig.checkSignature(xml)    console.log(sig.validationErrors) if !res"},"comment":{"url":"https://api.github.com/repos/yaronn/xml-crypto/issues/comments/159763698","html_url":"https://github.com/yaronn/xml-crypto/issues/81#issuecomment-159763698","issue_url":"https://api.github.com/repos/yaronn/xml-crypto/issues/81","id":159763698,"user":{"login":"yaronn","id":1359037,"avatar_url":"https://avatars.githubusercontent.com/u/1359037?v=3","gravatar_id":"","url":"https://api.github.com/users/yaronn","html_url":"https://github.com/yaronn","followers_url":"https://api.github.com/users/yaronn/followers","following_url":"https://api.github.com/users/yaronn/following{/other_user}","gists_url":"https://api.github.com/users/yaronn/gists{/gist_id}","starred_url":"https://api.github.com/users/yaronn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaronn/subscriptions","organizations_url":"https://api.github.com/users/yaronn/orgs","repos_url":"https://api.github.com/users/yaronn/repos","events_url":"https://api.github.com/users/yaronn/events{/privacy}","received_events_url":"https://api.github.com/users/yaronn/received_events","type":"User","site_admin":false},"created_at":"2015-11-26T00:14:15Z","updated_at":"2015-11-26T00:14:15Z","body":"if it fails try the example file or readme sample of the project. if it works try to hard code here to use the empty uri value:\r\n\r\nhttps://github.com/yaronn/xml-crypto/blob/master/lib/signed-xml.js#L560"}}