Make sure we also cope with the (theoretical) case of not getting a certificate from the server.
WIP on implementing a "shutdown" command.

Currently we're still blocked in accept(), so the server sadly never notices it's been shut down.