X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=test%2Fhandshake_helper.c;h=be96abe3c9c2cc621a80dc35a5773c8e05e10b7b;hb=a84e5c9aa8e50af2bcb445ab30a0e9c19e72f60b;hp=3d59abc66bb9160db236bcdd562ce6e32a15d490;hpb=270a4bba49849de7f928f4fab186205abd132411;p=oweals%2Fopenssl.git diff --git a/test/handshake_helper.c b/test/handshake_helper.c index 3d59abc66b..be96abe3c9 100644 --- a/test/handshake_helper.c +++ b/test/handshake_helper.c @@ -1304,6 +1304,8 @@ static HANDSHAKE_RESULT *do_handshake_internal( handshake_status_t status = HANDSHAKE_RETRY; const unsigned char* tick = NULL; size_t tick_len = 0; + const unsigned char* sess_id = NULL; + unsigned int sess_id_len = 0; SSL_SESSION* sess = NULL; const unsigned char *proto = NULL; /* API dictates unsigned int rather than size_t. */ @@ -1496,8 +1498,10 @@ static HANDSHAKE_RESULT *do_handshake_internal( ret->server_protocol = SSL_version(server.ssl); ret->client_protocol = SSL_version(client.ssl); ret->servername = server_ex_data.servername; - if ((sess = SSL_get0_session(client.ssl)) != NULL) + if ((sess = SSL_get0_session(client.ssl)) != NULL) { SSL_SESSION_get0_ticket(sess, &tick, &tick_len); + sess_id = SSL_SESSION_get_id(sess, &sess_id_len); + } if (tick == NULL || tick_len == 0) ret->session_ticket = SSL_TEST_SESSION_TICKET_NO; else @@ -1505,6 +1509,10 @@ static HANDSHAKE_RESULT *do_handshake_internal( ret->compression = (SSL_get_current_compression(client.ssl) == NULL) ? SSL_TEST_COMPRESSION_NO : SSL_TEST_COMPRESSION_YES; + if (sess_id == NULL || sess_id_len == 0) + ret->session_id = SSL_TEST_SESSION_ID_NO; + else + ret->session_id = SSL_TEST_SESSION_ID_YES; ret->session_ticket_do_not_call = server_ex_data.session_ticket_do_not_call; #ifndef OPENSSL_NO_NEXTPROTONEG