parameters: (self, block=False)
docstring: Perform a TLS/SSL handshake.
docstring_summary: Perform a TLS/SSL handshake.
docstring_tokens: Perform a TLS / SSL handshake .
function: def do_handshake(self, block=False):
          """Perform a TLS/SSL handshake."""
          self._check_connected()
          timeout = self.gettimeout()
          try:
              if timeout == 0.0 and block:
                  self.settimeout(None)
              self._sslobj.do_handshake()
          finally:
              self.settimeout(timeout)
  
          if self.context.check_hostname:
              if not self.server_hostname:
                  raise ValueError("check_hostname needs server_hostname "
                                   "argument")
              match_hostname(self.getpeercert(), self.server_hostname)
function_tokens: def do_handshake ( self , block = False ) : self . _check_connected ( ) timeout = self . gettimeout ( ) try : if timeout == 0.0 and block : self . settimeout ( None ) self . _sslobj . do_handshake ( ) finally : self . settimeout ( timeout ) if self . context . check_hostname : if not self . server_hostname : raise ValueError ( "check_hostname needs server_hostname " "argument" ) match_hostname ( self . getpeercert ( ) , self . server_hostname )