diff options
Diffstat (limited to 'net/py-soap2py/files')
-rw-r--r-- | net/py-soap2py/files/patch-pysimplesoap-c14n.py | 32 | ||||
-rw-r--r-- | net/py-soap2py/files/patch-pysimplesoap-xmlsec.py | 21 |
2 files changed, 53 insertions, 0 deletions
diff --git a/net/py-soap2py/files/patch-pysimplesoap-c14n.py b/net/py-soap2py/files/patch-pysimplesoap-c14n.py new file mode 100644 index 000000000000..43cf4e18cafc --- /dev/null +++ b/net/py-soap2py/files/patch-pysimplesoap-c14n.py @@ -0,0 +1,32 @@ +--- pysimplesoap/c14n.py.orig 2014-09-17 01:42:27 UTC ++++ pysimplesoap/c14n.py +@@ -174,7 +174,7 @@ class _implementation: + elif node.nodeType == Node.DOCUMENT_TYPE_NODE: + pass + else: +- raise TypeError, str(node) ++ raise TypeError(str(node)) + + + def _inherit_context(self, node): +@@ -217,7 +217,7 @@ class _implementation: + elif child.nodeType == Node.DOCUMENT_TYPE_NODE: + pass + else: +- raise TypeError, str(child) ++ raise TypeError(str(child)) + handlers[Node.DOCUMENT_NODE] = _do_document + + +@@ -346,9 +346,9 @@ class _implementation: + + if not ns_rendered.has_key(prefix) and not ns_local.has_key(prefix): + if not ns_unused_inherited.has_key(prefix): +- raise RuntimeError,\ ++ raise RuntimeError(\ + 'For exclusive c14n, unable to map prefix "%s" in %s' %( +- prefix, node) ++ prefix, node)) + + ns_local[prefix] = ns_unused_inherited[prefix] + del ns_unused_inherited[prefix] diff --git a/net/py-soap2py/files/patch-pysimplesoap-xmlsec.py b/net/py-soap2py/files/patch-pysimplesoap-xmlsec.py new file mode 100644 index 000000000000..6f77f51f3080 --- /dev/null +++ b/net/py-soap2py/files/patch-pysimplesoap-xmlsec.py @@ -0,0 +1,21 @@ +--- pysimplesoap/xmlsec.py.orig 2014-09-17 02:33:34 UTC ++++ pysimplesoap/xmlsec.py +@@ -203,15 +203,15 @@ def x509_verify(cacert, cert, binary=Fal + if __name__ == "__main__": + # basic test of enveloping signature (the reference is a part of the xml) + sample_xml = """<Object xmlns="http://www.w3.org/2000/09/xmldsig#" Id="object">data</Object>""" +- print canonicalize(sample_xml) ++ print(canonicalize(sample_xml)) + vars = rsa_sign(sample_xml, '#object', "no_encriptada.key", "password") +- print SIGNED_TMPL % vars ++ print(SIGNED_TMPL % vars) + + # basic test of enveloped signature (the reference is the document itself) + sample_xml = """<?xml version="1.0" encoding="UTF-8"?><Object>data%s</Object>""" + vars = rsa_sign(sample_xml % "", '', "no_encriptada.key", "password", + sign_template=SIGN_ENV_TMPL, c14n_exc=False) +- print sample_xml % (SIGNATURE_TMPL % vars) ++ print(sample_xml % (SIGNATURE_TMPL % vars)) + + # basic signature verification: + public_key = x509_extract_rsa_public_key(open("zunimercado.crt").read()) |