• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(334)  |  Call(316)  |  Derive(0)  |  Import(18)
No Document.

            def ssl(sock, keyfile=None, certfile=None):
        # we do an internal import here because the ssl
        # module imports the socket module
        import ssl as _realssl
        warnings.warn("socket.ssl() is deprecated.  Use ssl.wrap_socket() instead.",
                      DeprecationWarning, stacklevel=2)
        return _realssl.sslwrap_simple(sock, keyfile, certfile)
        


src/p/y/python-cookbook-HEAD/cb2_examples/cb2_14_8_sol_1.py   python-cookbook(Download)
if status!='200':
    raise IOError, 'Connecting to proxy: status=%s' % status
# trivial setup for SSL socket
ssl = socket.ssl(proxy_socket, None, None)
sock = httplib.FakeSocket(proxy_socket, ssl)
# initialize httplib and replace the connection's socket with the SSL one
h = httplib.HTTPConnection('localhost')

src/a/r/artie-HEAD/example/applications/scrape.py   artie(Download)
    if verbose >= 3:
        print >>sys.stderr, 'connect:', host, port
    sock.connect((host, int(port)))
    file = scheme == 'https' and socket.ssl(sock) or sock.makefile()
    if verbose >= 3:
        print >>sys.stderr, ('\r\n' + request.rstrip()).replace(
            '\r\n', '\nrequest: ').lstrip()

src/g/o/google-app-engine-HEAD/lib/fancy_urllib/fancy_urllib/__init__.py   google-app-engine(Download)
            raise InvalidCertificateException(hostname, cert,
                                              'hostname mismatch')
      except ImportError:
        ssl = socket.ssl(self.sock,
                         keyfile=self.key_file,
                         certfile=self.cert_file)
        self.sock = httplib.FakeSocket(self.sock, ssl)

src/g/a/gaesdk-python-HEAD/lib/fancy_urllib/fancy_urllib/__init__.py   gaesdk-python(Download)
            raise InvalidCertificateException(hostname, cert,
                                              'hostname mismatch')
      except ImportError:
        ssl = socket.ssl(self.sock,
                         keyfile=self.key_file,
                         certfile=self.cert_file)
        self.sock = httplib.FakeSocket(self.sock, ssl)

src/j/y/jython-HEAD/sandbox/tobias/jython/CPythonLib/httplib.py   jython(Download)
    def connect(self):
        "Connect to a host on a given (SSL) port."
 
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        ssl = socket.ssl(sock, self.key_file, self.cert_file)
        self.sock = FakeSocket(sock, ssl)

src/j/y/jython-HEAD/jython/CPythonLib/httplib.py   jython(Download)
    def connect(self):
        "Connect to a host on a given (SSL) port."
 
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        ssl = socket.ssl(sock, self.key_file, self.cert_file)
        self.sock = FakeSocket(sock, ssl)

src/p/y/pypy3-HEAD/lib-python/2.5.2/httplib.py   pypy3(Download)
    def connect(self):
        "Connect to a host on a given (SSL) port."
 
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        ssl = socket.ssl(sock, self.key_file, self.cert_file)
        self.sock = FakeSocket(sock, ssl)

src/p/y/pypy-HEAD/lib-python/2.5.2/httplib.py   pypy(Download)
    def connect(self):
        "Connect to a host on a given (SSL) port."
 
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        ssl = socket.ssl(sock, self.key_file, self.cert_file)
        self.sock = FakeSocket(sock, ssl)

src/s/p/spike-HEAD/vendor/stackless/v2.5.1/Lib/httplib.py   spike(Download)
    def connect(self):
        "Connect to a host on a given (SSL) port."
 
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        ssl = socket.ssl(sock, self.key_file, self.cert_file)
        self.sock = FakeSocket(sock, ssl)

src/s/p/spike-HEAD/vendor/stackless/current/Lib/httplib.py   spike(Download)
    def connect(self):
        "Connect to a host on a given (SSL) port."
 
        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        sock.connect((self.host, self.port))
        ssl = socket.ssl(sock, self.key_file, self.cert_file)
        self.sock = FakeSocket(sock, ssl)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next