'Connects to remote ADDR, and then wraps the connection in
an SSL channel.'

def connect(self, addr):

    if self._sslobj:
        raise ValueError('attempt    to    connect    already-connected    SSLSocket!')
    socket.connect(self, addr)
    self._sslobj = _ssl2.sslwrap(self._sock, False, self.keyfile, self.certfile, self.cert_reqs, self.ssl_version, self.ca_certs)
    if self.do_handshake_on_connect:
        self.do_handshake()
