Add tests for bidirectional shutdown.

Now that it even works at all (type = 0 bug aside), add tests for it.
Test both close_notify being received before and after SSL_shutdown is
called. In the latter case, have the peer send some junk to be ignored
to test that works.

Also test that SSL_shutdown fails on unclean shutdown and that quiet
shutdowns ignore it.


Change-Id: Iff13b08feb03e82f21ecab0c66d5f85aec256137
Reviewed-by: Adam Langley <>
6 files changed