Closed
Description
Specification
Currently we are seeing unintended behaviour when the connection fails a TLS handshake.
What we want to happen is, if a connection fails the TLS handshake then we close the connection.
- The connection should gracefully end for both the server and client.
- any further attempts to establish the connection is ended.
- Errors are propagated and the failure condition is clearly indicated to the best of our ability. This should mainly state that the TLS failed, hopefully it will specify why the TLS failed.
We need to add tests to test these conditions. The tests should check for
- Connection success
- Server certs fail verification
- Client certs fail verification
- Both server and client certs fail verification
- We should test RSA, EC and ED signed certs.
The main way we can trigger verification failure is to have the certs self signed. We can make the certs succeed verification by providing a CA cert that allows the self signed signature.
Additional context
Tasks
- Expand tests to test for the above conditions
- Fix up the connection logic to match the expected behaviour.
- Add text fixtures for certs. These should be included in git.