Conversation
| } | ||
|
|
||
| pub fn handle_timeout(&mut self, now: Instant) -> Result<(), Error> { | ||
| if self.connect_timeout == Timeout::Unarmed { |
|
@copilot fix snowflake ci and codeql |
Co-authored-by: xnorpx <302709+xnorpx@users.noreply.github.com>
Co-authored-by: xnorpx <302709+xnorpx@users.noreply.github.com>
Co-authored-by: xnorpx <302709+xnorpx@users.noreply.github.com>
Fixed in e1d91cf, 2ef48c6, and 05185c8. Snowflake’s DTLS 1.2 import violation is corrected, and the CodeQL-sensitive debug/logging paths now avoid formatting potentially sensitive output while retaining safe diagnostics. Local validation passed: |
|
@copilot we are still failing CodeQL CI check |
Co-authored-by: xnorpx <302709+xnorpx@users.noreply.github.com>
Co-authored-by: xnorpx <302709+xnorpx@users.noreply.github.com>
Co-authored-by: xnorpx <302709+xnorpx@users.noreply.github.com>
Fixed in fa00010 and 26b6fe8. The CodeQL-flagged sinks now avoid logging dynamic data entirely: DTLS 1.3 queue-full warnings are static, timing panic paths no longer format output fields, and the auto timing match remains exhaustive with static per-variant messages. Local validation passed: |
TL;DR
Unify handshake and retransmission timing across DTLS 1.2, DTLS 1.3, and Auto.
The overall handshake budget now starts only at the observable first ClientHello boundary: packet emission for clients and accepted-fragment reception for servers. That absolute deadline survives cookie exchanges, HelloRetryRequest, retransmissions, and Auto version transitions, then shuts off after connection. Every flight uses the configured RTO and retry policy with proportional jitter and overflow-safe deadline arithmetic.
Fixes #161.
Timing model
flowchart LR A["Constructed / idle"] -->|"No budget consumed"| B{"First ClientHello boundary"} B -->|"Client emits packet"| C["Arm absolute handshake deadline"] B -->|"Server accepts fragment"| C C --> D["Cookie, HRR, Auto transition, later flights"] D -->|"Preserve the same deadline"| E["Handshake complete"] E -->|"Disable overall deadline"| F["Application data / KeyUpdate"] D -. "Each new flight" .-> G["Reset configured RTO and retry budget"] G -->|"x2 backoff with +/-25% jitter"| DIssues fixed
BufferTooSmallnow leaves both clocks untouched.handshake_timeoutandflight_start_rtoand used a separate hard-coded retransmission schedule.flight_retries = 0meaning no retransmissions after the initial send.Added lines
Counts use
git diff --numstat main...HEAD; additions inside in-source#[cfg(test)]blocks are counted as test code rather than production code.Validation
cargo test --all-featurescargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warnings