'Start the SSL shutdown sequence.
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 shutdown is complete. The callback will be
called without arguments.'

def shutdown(self, callback=None):

    if (self._state == _UNWRAPPED):
        raise RuntimeError('no    security    layer    present')
    if (self._state == _SHUTDOWN):
        raise RuntimeError('shutdown    in    progress')
    assert (self._state in (_WRAPPED, _DO_HANDSHAKE))
    self._state = _SHUTDOWN
    self._shutdown_cb = callback
    (ssldata, appdata) = self.feed_ssldata('')
    assert ((appdata == []) or (appdata == ['']))
    return ssldata
