Пример #1
0
    def __init__(self, *args, **kwargs):
        try:
            kwargs['context'] = ssl._create_unverified_context()
        except AttributeError:
            # Python prior to 2.7.9 doesn't have default-enabled certificate
            # verification
            pass

        HTTPSHandler.__init__(self, *args, **kwargs)
Пример #2
0
  def __init__(self, timeout=None, debuglevel=0):
    """Initialize the object.

    Args:
      timeout: the socket connect timeout value.
      debuglevel: the debuglevel level.
    """
    _HS.__init__(self, debuglevel)
    TimeoutHTTPSConnection._timeout = timeout
    def __init__(self, timeout=None, debuglevel=0):
        """Initialize the object.

    Args:
      timeout: the socket connect timeout value.
      debuglevel: the debuglevel level.
    """
        _HS.__init__(self, debuglevel)
        TimeoutHTTPSConnection._timeout = timeout
Пример #4
0
    def __init__(self, key, cert):
        ctx = ssl._create_unverified_context()
        ctx.check_hostname = False
        ctx.verify_mode = ssl.CERT_NONE

        HTTPSHandler.__init__(self, context=ctx)

        self.context = ctx
        self.key = key
        self.cert = cert
 def __init__(self, ca_certs=None):
     HTTPSHandler.__init__(self)
     self._ca_certs = ca_certs
Пример #6
0
 def __init__(self, ca_certs=None):
     HTTPSHandler.__init__(self)
     self._ca_certs = ca_certs
Пример #7
0
 def __init__(self, cert, key):
     HTTPSHandler.__init__(self)
     self.key = key
     self.cert = cert
Пример #8
0
 def __init__(self, connection_class=UnverifiedHTTPSConnection):
     self.specialized_conn_class = connection_class
     HTTPSHandler.__init__(self)
Пример #9
0
 def __init__(self, key, cert):
     HTTPSHandler.__init__(self)
     self.key = key
     self.cert = cert
Пример #10
0
 def __init__(self, cert, key):
     HTTPSHandler.__init__(self)
     self.cert = cert
     self.key = key
 def __init__(self, cert, key, sslcontext=None):
     HTTPSHandler.__init__(self)
     self.cert = cert
     self.key = key
     self._context = sslcontext
Пример #12
0
 def __init__(self, context):
     HTTPSHandler.__init__(self)
     self.context = context
Пример #13
0
 def __init__(self, cert, key, sslcontext=None):
     HTTPSHandler.__init__(self)
     self.cert = cert
     self.key = key
     self._context = sslcontext