Skip to content

Instantly share code, notes, and snippets.

@quasarj
Last active February 28, 2018 18:50
Show Gist options
  • Save quasarj/079c94f0698a8b0c58ee to your computer and use it in GitHub Desktop.
Save quasarj/079c94f0698a8b0c58ee to your computer and use it in GitHub Desktop.

Revisions

  1. quasarj renamed this gist Jun 9, 2015. 1 changed file with 0 additions and 0 deletions.
  2. quasarj created this gist Jun 9, 2015.
    24 changes: 24 additions & 0 deletions python_2.7.10_suds_unverified.patch
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    --- /usr/lib/python2.7/site-packages/suds/transport/http.py 2015-06-09 17:40:15.000000000 -0500
    +++ http.py 2015-06-09 17:42:05.953929465 -0500
    @@ -19,6 +19,7 @@
    """

    import urllib2 as u2
    +import ssl
    import base64
    import socket
    from suds.transport import *
    @@ -135,6 +136,14 @@
    @rtype: [Handler,...]
    """
    handlers = []
    +
    + # build a special unverified HTTPSHandler
    + unverified_context = ssl.create_default_context()
    + unverified_context.check_hostname = False
    + unverified_context.verify_mode = ssl.CERT_NONE
    + unverified_handler = u2.HTTPSHandler(context=unverified_context)
    +
    + handlers.append(unverified_handler)
    handlers.append(u2.ProxyHandler(self.proxy))
    return handlers