Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds socket-peek-based TLS shutdown/read logic to the SSL module to distinguish TLS records from post-TLS cleartext during close-notify handling, plus a private helper to consume exactly one TLS record when appropriate. Also adds tests tracking comparison calls in sorting. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant PySSLSocket
participant Socket
participant TlsConnection
participant VM
Client->>Socket: send data (may be TLS record or cleartext)
PySSLSocket->>Socket: sock_peek(size) -- MSG_PEEK
Socket-->>PySSLSocket: peeked bytes
PySSLSocket->>TlsConnection: analyze peeked bytes (record header)
alt TLS record present
PySSLSocket->>Socket: sock_recv(exact_record_len)
Socket-->>PySSLSocket: TLS record bytes
PySSLSocket->>TlsConnection: feed bytes, process_new_packets()
TlsConnection-->>PySSLSocket: decrypted/plain data
PySSLSocket->>VM: return decrypted data / handle close-notify
else Post-TLS cleartext
PySSLSocket-->>VM: treat peeked bytes as cleartext (do not consume TLS)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Code has been automatically formatted The code in this PR has been formatted using:
git pull origin fix-ssl |
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.