def _continue_tls_handshake(self):
try:<EOL><INDENT>logger.debug("<STR_LIT>")<EOL>self._socket.do_handshake()<EOL><DEDENT>except ssl.SSLError as err:<EOL><INDENT>if err.args[<NUM_LIT:0>] == ssl.SSL_ERROR_WANT_READ:<EOL><INDENT>self._tls_state = "<STR_LIT>"<EOL>logger.debug("<STR_LIT>")<EOL>self._state_cond.notify()<EOL>return<EOL><DEDENT>elif err.args[<NUM_LIT:0>] == ssl.SSL_ERROR_WANT_WRITE:<EOL><INDENT>self._tls_state = "<STR_LIT>"<EOL>logger.debug("<STR_LIT>")<EOL>self._write_queue.appendleft(TLSHandshake)<EOL>return<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>self._tls_state = "<STR_LIT>"<EOL>self._set_state("<STR_LIT>")<EOL>self._auth_properties['<STR_LIT>'] = "<STR_LIT>"<EOL>if "<STR_LIT>" in CHANNEL_BINDING_TYPES:<EOL><INDENT>try:<EOL><INDENT>tls_unique = self._socket.get_channel_binding("<STR_LIT>")<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>self._auth_properties['<STR_LIT>'] = {<EOL>"<STR_LIT>": tls_unique}<EOL><DEDENT><DEDENT>try:<EOL><INDENT>cipher = self._socket.cipher()<EOL><DEDENT>except AttributeError:<EOL><INDENT>cipher = "<STR_LIT>"<EOL><DEDENT>cert = get_certificate_from_ssl_socket(self._socket)<EOL>self.event(TLSConnectedEvent(cipher, cert))<EOL>
Continue a TLS handshake.