botan
botan copied to clipboard
Retransmission of Flight 5 fixed in dTLS
This change shall fix the issue: https://github.com/randombit/botan/issues/2498
In case of any delay during the dTLS handshake and retransmission of the Flight 5 messages by the client, the server might receive Flight 5 messages few times. First time it finishes the handshake, for next (retransmitted) messages it re-creates the pending_state. This prevents from further communication, even if the dTLS connection is well established.
Thank you. I'll review this shortly. The CI failure looks to be related to this change - the SendHalfHelloRequest
tests from BoringSSL's suite are now failing.
I think it's OK to just disable SendHalfHelloRequest*
tests (in src/bogo_shim/config.json
); this test is verifying a behavior that is not spec mandated but just how BoringSSL happens to behave.
It would be nice though if there was some test of the reflight behavior though. We can get though via the BoringSSL suite but this requires building timeout support for DTLS, right now all of the DTLS retransmit tests are disabled for this reason.
Thank you for comments @randombit. Currently the fix is just verified manually with Botan & openssl, hope that at some point it would be possible to extend the DTLS retransmission testing with Bogo.
Not good, another test failed: DTLS-SendExtraFinished*. I'll try to look what is happening, maybe the fix causes some other issue(s)
IMHO deduplication should be done in Handshake_Reassembly
- otherwise we have to add a new code path for each type of message which is hard to maintain. https://github.com/randombit/botan/blob/master/src/lib/tls/tls_handshake_io.cpp#L245 might be relevant.