facebook/tornado — pull request #547 by evanj (2012-06-26 16:20:47+00:00)
Title: Detect SSL option errors at start up

Feel free to reject this, as I can easily add these checks to my own code.

Previously, ssl_option errors aren't detected until a client connects. I've run into this more than once, where I screwed up some configuration or was missing a file, and thought the server was happy. This does some basic validation at startup, so the server crashes immediately on startup instead.

Ideally, we would use ssl.wrap_socket to actually try to *read* the key and certificate. However, this is a pain in the ass because it needs a connected socket. I decided that was too much work.