{"action":"closed","issue":{"url":"https://api.github.com/repos/kislyuk/signxml/issues/13","labels_url":"https://api.github.com/repos/kislyuk/signxml/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/kislyuk/signxml/issues/13/comments","events_url":"https://api.github.com/repos/kislyuk/signxml/issues/13/events","html_url":"https://github.com/kislyuk/signxml/issues/13","id":80931712,"number":13,"title":"xmldsig vs http://www.w3.org/TR/xmldsig-core","user":{"login":"sireistwa","id":12609982,"avatar_url":"https://avatars.githubusercontent.com/u/12609982?v=3","gravatar_id":"","url":"https://api.github.com/users/sireistwa","html_url":"https://github.com/sireistwa","followers_url":"https://api.github.com/users/sireistwa/followers","following_url":"https://api.github.com/users/sireistwa/following{/other_user}","gists_url":"https://api.github.com/users/sireistwa/gists{/gist_id}","starred_url":"https://api.github.com/users/sireistwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sireistwa/subscriptions","organizations_url":"https://api.github.com/users/sireistwa/orgs","repos_url":"https://api.github.com/users/sireistwa/repos","events_url":"https://api.github.com/users/sireistwa/events{/privacy}","received_events_url":"https://api.github.com/users/sireistwa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-26T12:03:35Z","updated_at":"2015-05-26T12:08:08Z","closed_at":"2015-05-26T12:08:08Z","body":"Hello Andrey,\r\nCan you help me with your kislyuk@gmail.com?\r\nIts lib allows signing the <Signature tag standard as http://www.w3.org/TR/xmldsig-core?\r\nI'm trying to sign as the code below and displays error:\r\n\r\n\r\nfrom signxml import xmldsig\r\nfrom lxml import etree\r\n\r\ncert = open(\"certi.pem\").read()\r\nkey = open(\"key.pem\").read()\r\n\r\nmyxml = open( 'myxml.xml' , 'r').read()\r\nroot = etree.fromstring( myxml )\r\nxmldsig(root).sign( key=key , cert=cert , reference_uri=\"#ID35150537837900019955014000000009000000009\")\r\nverified_data = xmldsig(root).verify()\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"C:\\Python27\\lib\\site-packages\\signxml\\__init__.py\", line 591, in verify\r\n    raise InvalidDigest(\"Digest mismatch\")\r\nsignxml.InvalidDigest: Digest mismatch\r\n\r\nmyxml =\r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"utf-8\" ?> \r\n<!DOCTYPE inutNFe (View Source for full doctype...)> \r\n- <inutNFe xmlns=\"http://www.portalfiscal.inf.br/nfe\" versao=\"3.10\">\r\n- <infInut Id=\"ID35150537837900019955014000000009000000009\">\r\n<tpAmb>2</tpAmb> \r\n<xServ>INUTILIZAR</xServ> \r\n<cUF>35</cUF> \r\n<ano>15</ano> \r\n<CNPJ>05378379000199</CNPJ> \r\n<mod>55</mod> \r\n<serie>14</serie> \r\n<nNFIni>9</nNFIni> \r\n<nNFFin>9</nNFFin> \r\n<xJust>Testando a inutilizacao de NF-e</xJust> \r\n</infInut>\r\n- <Signature xmlns=\"http://www.w3.org/2000/09/xmldsig#\">\r\n- <SignedInfo>\r\n<CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" /> \r\n<SignatureMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#rsa-sha1\" /> \r\n- <Reference URI=\"#ID35150537837900019955014000000009000000009\">\r\n- <Transforms>\r\n<Transform Algorithm=\"http://www.w3.org/2000/09/xmldsig#enveloped-signature\" /> \r\n<Transform Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" /> \r\n</Transforms>\r\n<DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\" /> \r\n<DigestValue /> \r\n</Reference>\r\n</SignedInfo>\r\n<SignatureValue /> \r\n- <KeyInfo>\r\n- <X509Data>\r\n<X509Certificate /> \r\n</X509Data>\r\n</KeyInfo>\r\n</Signature>\r\n</inutNFe>\r\n```\r\n"}}