Open
Description
Following code
will make sure we send out a TLS alert when handshake fails to complete, however, (at least on Windows), this leads to indiscriminately sending out ProtocolVersion alerts even for other cases of errors, such as when the two parties cannot communicate because they don't possess a common cipher/sigalg, or because an invalid message was received. This may be misleading when attempting to debug TLS handshake errors.
We should attempt to reply with an alert that most closely resembles the type of error encountered.