'Perform a TLS/SSL handshake.'

def do_handshake(self, block=False):

    timeout = self.gettimeout()
    try:
        if ((timeout == 0.0) and block):
            self.settimeout(None)
        self._sslobj.do_handshake()
    finally:
        self.settimeout(timeout)
