boringssl/ssl/test
David Benjamin 7538122ca6 Rework DTLS handshake message reassembly logic.
Notably, drop all special cases around receiving a message in order and
receiving a full message. It makes things more complicated and was the source
of bugs (the MixCompleteMessageWithFragments tests added in this CL did not
pass before). Instead, every message goes through an hm_fragment, and
dtls1_get_message always checks buffered_messages to see if the next is
complete.

The downside is that we pay one more copy of the message data in the common
case. This is only during connection setup, so I think it's worth the
simplicity. (If we want to optimize later, we could either tighten
ssl3_get_message's interface to allow the handshake data being in the
hm_fragment's backing store rather than s->init_buf or swap out s->init_buf
with the hm_fragment's backing store when a mesasge completes.

This CL does not address ssl_read_bytes being an inappropriate API for DTLS.
Future work will revise the handshake/transport boundary to align better with
DTLS's needs. Also other problems that I've left as TODOs.

Change-Id: Ib4570d45634b5181ecf192894d735e8699b1c86b
Reviewed-on: https://boringssl-review.googlesource.com/3764
Reviewed-by: Adam Langley <agl@google.com>
2015-03-10 00:56:45 +00:00
..
runner Rework DTLS handshake message reassembly logic. 2015-03-10 00:56:45 +00:00
async_bio.cc Use just one style for the shim. 2015-02-10 01:18:24 +00:00
async_bio.h Use just one style for the shim. 2015-02-10 01:18:24 +00:00
bssl_shim.cc Add tests for installing the certificate on the early callback. 2015-02-25 21:22:35 +00:00
CMakeLists.txt Change CMakeLists.txt to two-space indent. 2015-01-28 16:37:10 -08:00
malloc.cc aarch64 support. 2015-01-14 23:38:11 +00:00
packeted_bio.cc Use TCP sockets rather than socketpairs in the SSL tests. 2015-02-23 19:59:06 +00:00
packeted_bio.h Use just one style for the shim. 2015-02-10 01:18:24 +00:00
scoped_types.h RAII bssl_shim. 2015-02-09 20:04:05 +00:00
test_config.cc Add tests for installing the certificate on the early callback. 2015-02-25 21:22:35 +00:00
test_config.h Add tests for installing the certificate on the early callback. 2015-02-25 21:22:35 +00:00