boringssl/ssl/test
David Benjamin 8c88153465 Remove a place where SSL_clear cleans up after client/server confusion.
SSL_clear sets s->state and dtls1_clear sets cookie_len on the server. Setting
cookie_len on the server seems to serve no purpose but to let the callback know
how large the buffer is. This can be done just before calling the callback.

It also avoids a bug where the cookie check can be bypassed, should the server
not specify an app_verify_cookie_cb, by supplying a cookie of all zeros of the
maximum size. (Zero is fine because an empty cookie is rejected.)

The goal here is to avoid needing the SSL_clear calls in the handshake
functions. They are currently needed to fix the cookie_len setting when using
the generic method. (They get set wrong and then flipped back.)

Change-Id: I5095891bc0f7df62d83a9c84312fcf0b84826faa
Reviewed-on: https://boringssl-review.googlesource.com/2435
Reviewed-by: Adam Langley <agl@google.com>
2014-12-02 19:31:57 +00:00
..
runner Add test for renego client_version quirk. 2014-12-02 19:29:23 +00:00
async_bio.cc Add initial DTLS tests. 2014-08-14 16:55:45 +00:00
async_bio.h Add initial DTLS tests. 2014-08-14 16:55:45 +00:00
bssl_shim.cc Remove a place where SSL_clear cleans up after client/server confusion. 2014-12-02 19:31:57 +00:00
CMakeLists.txt Add malloc failure tests. 2014-11-19 01:24:46 +00:00
malloc.cc Add malloc failure tests. 2014-11-19 01:24:46 +00:00
packeted_bio.cc Add malloc failure tests. 2014-11-19 01:24:46 +00:00
packeted_bio.h Add initial DTLS tests. 2014-08-14 16:55:45 +00:00
test_config.cc Add tests for OCSP stapling and SCT lists. 2014-12-02 19:26:01 +00:00
test_config.h Add tests for OCSP stapling and SCT lists. 2014-12-02 19:26:01 +00:00