With a TLS socket configured with -blocking 0, tls::handshake returns 1 too early during the TLS handshake, when the handshake has not actually completed.

1.6.7 shows the correct behaviour (tls::handshake returns 0 if the handshake is still in progress). 1.7.11 shows the broken behavior.

This breaks any code that tries to do a nonblocking handshake.

Testcase: