I'm trying to integrate my system into Python with PBH on the NFSe issue. The file layout is correct, however, I can not sign the XML.
The layout is here:
<Signature Id="Ass_rps:ABCDZ">
<SignedInfo>
<CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments"/>
<SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<Reference URI="#rps:1ABCDZ">
<Transforms>
<Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
</Transforms>
<DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<DigestValue> </DigestValue>
</Reference>
</SignedInfo>
<SignatureValue> </SignatureValue>
<KeyInfo>
<X509Data>
<X509Certificate> </X509Certificate>
</X509Data>
</KeyInfo>
</Signature>
Before this part in the note comes the tags with values, description of the services, etc. I'm really in need of help to generate DigestValue, SignatureValue and X509Certificate in python. Can someone help me?
Thank you very much,