(self, callback=None)
return ssldata
Start the SSL handshake.

        Return a list of ssldata. A ssldata element is a list of buffers

        The optional *callback* argument can be used to install a callback that
        will be called when the handshake is complete. The callback will be
        called with None if successful, else an exception instance.
Start the SSL handshake.
Start the SSL handshake .
def do_handshake(self, callback=None):
        """Start the SSL handshake.

        Return a list of ssldata. A ssldata element is a list of buffers

        The optional *callback* argument can be used to install a callback that
        will be called when the handshake is complete. The callback will be
        called with None if successful, else an exception instance.
        """
        if self._state != _UNWRAPPED:
            raise RuntimeError('handshake in progress or completed')
        self._sslobj = self._context.wrap_bio(
            self._incoming, self._outgoing,
            server_side=self._server_side,
            server_hostname=self._server_hostname)
        self._state = _DO_HANDSHAKE
        self._handshake_cb = callback
        ssldata, appdata = self.feed_ssldata(b'', only_handshake=True)
        assert len(appdata) == 0
        return ssldata
def do_handshake ( self , callback = None ) : if self . _state != _UNWRAPPED : raise RuntimeError ( 'handshake in progress or completed' ) self . _sslobj = self . _context . wrap_bio ( self . _incoming , self . _outgoing , server_side = self . _server_side , server_hostname = self . _server_hostname ) self . _state = _DO_HANDSHAKE self . _handshake_cb = callback ssldata , appdata = self . feed_ssldata ( b'' , only_handshake = True ) assert len ( appdata ) == 0 return ssldata