Skip to content

Commit

Permalink
Test KeyUpdate rejection
Browse files Browse the repository at this point in the history
For now, just test that we don't generate any, since we don't really
expose the mechanics for encrypting one and the QUIC API is not
integrated into the TLSProxy setup.
  • Loading branch information
kaduk authored and tmshort committed Dec 11, 2020
1 parent fea9d3b commit 67ac3a2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/sslapitest.c
Original file line number Diff line number Diff line change
Expand Up @@ -6778,6 +6778,17 @@ static int test_quic_api(void)
|| !TEST_true(SSL_process_quic_post_handshake(clientssl)))
goto end;

/* Dummy handshake call should succeed */
if (!TEST_true(SSL_do_handshake(clientssl)))
goto end;
/* Test that we (correctly) fail to send KeyUpdate */
if (!TEST_true(SSL_key_update(clientssl, SSL_KEY_UPDATE_NOT_REQUESTED))
|| !TEST_int_le(SSL_do_handshake(clientssl), 0))
goto end;
if (!TEST_true(SSL_key_update(serverssl, SSL_KEY_UPDATE_NOT_REQUESTED))
|| !TEST_int_le(SSL_do_handshake(serverssl), 0))
goto end;

testresult = 1;

end:
Expand Down

0 comments on commit 67ac3a2

Please sign in to comment.