Conversation
|
@copilot fix snowflake ci and codeql |
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 |
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: |
6da483e to
b3d84d6
Compare
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. Start events only mark a timer pending; the next
handle_timeout(now)arms it with fresh time, so an endpoint idle for longer than the budget cannot inherit a stale deadline.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 --no-default-features --features rcgencargo test --no-default-features --features rust-cryptocargo fmt --all -- --checkcargo clippy -- -D warningsRUSTDOCFLAGS=-Dwarnings cargo doc --no-deps