Commit 3dd44d8
fix: widen 0-RTT transport param validation guard
xqc_conn_tls_transport_params_cb checks remembered vs new transport
parameters when 0-RTT was accepted. The check relied solely on
xqc_tls_is_early_data_accepted(), which queries the TLS backend's
internal state. If xqc_conn_early_data_accept() has already run
(setting XQC_CONN_FLAG_0RTT_OK) before the transport params callback,
the TLS query may still return UNKNOWN, skipping validation.
Add XQC_CONN_FLAG_0RTT_OK as an alternative signal so the validation
runs regardless of callback ordering.
Also fix xqc_test_0rtt_params_each_reduced:
- Set 0RTT_OK flag in test fixture so validation path is reached
- Use safe reduction (val/2 when val<=4) to avoid underflow
Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>1 parent 96155cf commit 3dd44d8
2 files changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6115 | 6115 | | |
6116 | 6116 | | |
6117 | 6117 | | |
6118 | | - | |
| 6118 | + | |
| 6119 | + | |
6119 | 6120 | | |
6120 | 6121 | | |
6121 | 6122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| 406 | + | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
| |||
625 | 626 | | |
626 | 627 | | |
627 | 628 | | |
628 | | - | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
629 | 632 | | |
630 | 633 | | |
631 | 634 | | |
| |||
0 commit comments