diff options
author | Matt Caswell <matt@openssl.org> | 2018-03-14 19:22:48 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-05-17 16:48:25 +0100 |
commit | 36ff232cf2bf5dfcaf9e60a8c492439428a243bb (patch) | |
tree | 8e2dfdd9d77088c4ce0245708b9c906daced0e2f /test/handshake_helper.c | |
parent | 394159da608f625b60f07c59e36dc7d01df3a709 (diff) |
Change the default number of NewSessionTickets we send to 2
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5227)
Diffstat (limited to 'test/handshake_helper.c')
-rw-r--r-- | test/handshake_helper.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/handshake_helper.c b/test/handshake_helper.c index b3d94bb1ee..3ebf64dfe3 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -1403,7 +1403,7 @@ static HANDSHAKE_RESULT *do_handshake_internal( HANDSHAKE_EX_DATA server_ex_data, client_ex_data; CTX_DATA client_ctx_data, server_ctx_data, server2_ctx_data; HANDSHAKE_RESULT *ret = HANDSHAKE_RESULT_new(); - int client_turn = 1, client_turn_count = 0; + int client_turn = 1, client_turn_count = 0, client_wait_count = 0; connect_phase_t phase = HANDSHAKE; handshake_status_t status = HANDSHAKE_RETRY; const unsigned char* tick = NULL; @@ -1586,9 +1586,19 @@ static HANDSHAKE_RESULT *do_handshake_internal( ret->result = SSL_TEST_INTERNAL_ERROR; goto err; } - - /* Continue. */ - client_turn ^= 1; + if (client_turn && server.status == PEER_SUCCESS) { + /* + * The server may finish before the client because the + * client spends some turns processing NewSessionTickets. + */ + if (client_wait_count++ >= 2) { + ret->result = SSL_TEST_INTERNAL_ERROR; + goto err; + } + } else { + /* Continue. */ + client_turn ^= 1; + } } break; } |