Should server connection notice when client connection aborts handshake?
I've added this FIXME to on_accept_certificate_with_sync_close()
in the connection test:
/* FIXME: When writing this test, I initially wanted to return FALSE
* here to reject the connection. However, this surfaces a bug that I
* have not fixed yet. The problem is the server is not seeing the end
* of its g_output_stream_write() when the client fails the handshake.
* No good. The server's implicit handshake failure should trigger a
* write failure as well, instead of stalling. This needs to be fixed.
*
* Fixing this would allow us to guarantee that this callback is
* actually executed by checking test->read_error at the bottom of
* test_sync_op_during_handshake(). Currently, this test would still
* pass even if this callback were to be improperly skipped.
*/
Probably the server connection's implicit handshake should fail when the client rejects the certificate.