Repro here: https://gist.github.com/tarcieri/b20437a1b9364d82c365 Attempting to do I/O before the SSL handshake has completed should raise an exception instead of writing plaintext to the wire.