You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: correct 0-RTT transport param validation guard and test mock
Revert the ineffective `|| XQC_CONN_FLAG_0RTT_OK` added to the
production guard in xqc_conn_tls_transport_params_cb. The original
condition `xqc_tls_is_early_data_accepted() == ACCEPT` is already
correct at tp_cb time: BoringSSL sets `early_data_accepted` during
do_read_encrypted_extensions (step 2), while set_read_secret(application)
fires in do_complete_second_flight (step 9), so the SSL query returns
the right value. 0RTT_OK is set even later in handshake completion,
making the `||` branch dead code in production.
The real problem was the unit test: mock connections have
tls->resumption == FALSE (no session ticket), causing
xqc_tls_is_early_data_accepted() to early-return NO_EARLY_DATA and
skip the validation block entirely.
Fix by adding xqc_tls_set_early_data_accepted() to override the
early-data query result without a real TLS handshake, and use it in
the test mock setup. Also move 0-RTT test registration earlier in
main.c to avoid a pre-existing SIGSEGV in a later test.
Refs: RFC 9000 Section 7.4.1, issue #717
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
0 commit comments