This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import libxml2 | |
import xmlsec | |
from SOAPpy import SOAPProxy | |
import xml.etree.ElementTree as ET | |
#pip install SOAPpy | |
#svn checkout svn://labs.libre-entreprise.org/svnroot/pyxmlsec | |
TEMPLATE_XML_SEMILLA = """<?xml version="1.0"?><getToken><item><Semilla>{semilla}</Semilla></item><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/><SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue/></Reference></SignedInfo><SignatureValue/><KeyInfo><KeyValue><RSAKeyValue><Modulus/><Exponent/></RSAKeyValue></KeyValue><X509Data><X509Certificate/></X509Data></KeyInfo></Signature></getToken>""" |