Skip to content

Commit

Permalink
Sign autofill?
Browse files Browse the repository at this point in the history
  • Loading branch information
felps-dev committed Aug 23, 2024
1 parent 559d1d8 commit cec1ec4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pynfe/processamento/assinatura.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from pynfe.entidades import CertificadoA1
from pynfe.utils import CustomXMLSigner, etree, remover_acentos
from pynfe.utils.flags import NAMESPACE_SIG


class Assinatura(object):
Expand Down Expand Up @@ -48,14 +47,6 @@ def assinar(self, xml, retorna_string=False):

ref_uri = ("#%s" % reference) if reference else None
signed_root = signer.sign(xml, key=self.key, cert=self.cert, reference_uri=ref_uri)

ns = {"ns": NAMESPACE_SIG}

# coloca o certificado na tag X509Data/X509Certificate
cert = self.cert
cert = cert.replace("\n", "")
tagX509Data = signed_root.find(".//ns:X509Data", namespaces=ns)
etree.SubElement(tagX509Data, "X509Certificate").text = cert
if retorna_string:
return etree.tostring(signed_root, encoding="unicode", pretty_print=False)
else:
Expand Down

0 comments on commit cec1ec4

Please sign in to comment.