Skip to content

Commit

Permalink
fixup! Add a test for session cache overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mattcaswell committed Apr 5, 2024
1 parent 199b416 commit 750f309
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/sslapitest.c
Original file line number Diff line number Diff line change
Expand Up @@ -9388,8 +9388,11 @@ static int test_session_cache_overflow(int idx)
* Cause this session to have a longer timeout than the next session to
* be added.
*/
if (!TEST_true(SSL_SESSION_set_timeout(sess, LONG_MAX)))
if (!TEST_true(SSL_SESSION_set_timeout(sess, LONG_MAX))) {
sess = NULL;
goto end;
}
sess = NULL;
}

SSL_shutdown(serverssl);
Expand Down Expand Up @@ -9433,12 +9436,10 @@ static int test_session_cache_overflow(int idx)

if (!TEST_true(SSL_set_session(clientssl, sess)))
goto end;
sess = NULL;

if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)))
goto end;


testresult = 1;

end:
Expand Down

0 comments on commit 750f309

Please sign in to comment.