Repository navigation
Commit 82cd595
authored
ssl: unify handshake, transport and shutdown state (#8656)
* ssl: accept ClientHello before selecting the SNI context
Replace the provisional server connection and replay flags with explicit handshake states. Retain fatal alerts across nonblocking retries and preserve fragmented input on timeout. Enable the three SNI alert regressions.
Assisted-by: Codex:GPT-5
* ssl: share socket and MemoryBIO transport progress
Queue drained TLS records before fallible output and use one handshake record loop for both transports.
Assisted-by: Codex:GPT-5
* ssl: unify shutdown and fatal alert lifecycle
Track close-notify progress in TlsState, preserve pending alerts across retries, and share record-boundary shutdown for sockets and MemoryBIO. Retain rustls errors until Python exception conversion.
Assisted-by: Codex:GPT-5
* ssl: emit the full peer certificate dict
Use the same certificate dict helper for getpeercert() and
Certificate.get_info() so OCSP, caIssuers, and CRL URLs are present.
Clear CHANNEL_BINDING_TYPES on the rustls backend, and add a MemoryBIO
leftover-plaintext snippet.
Assisted-by: Claude1 parent 55cebcd commit 82cd595
8 files changed
Lines changed: 701 additions & 1463 deletions
File tree
- Lib
- test
- test_asyncio
- crates/stdlib/src
- ssl
- extra_tests/snippets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
271 | 274 | | |
272 | 275 | | |
273 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1289 | 1289 | | |
1290 | 1290 | | |
1291 | 1291 | | |
1292 | | - | |
1293 | 1292 | | |
1294 | 1293 | | |
1295 | 1294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4192 | 4192 | | |
4193 | 4193 | | |
4194 | 4194 | | |
4195 | | - | |
4196 | 4195 | | |
4197 | 4196 | | |
4198 | 4197 | | |
| |||
4455 | 4454 | | |
4456 | 4455 | | |
4457 | 4456 | | |
4458 | | - | |
4459 | 4457 | | |
4460 | 4458 | | |
4461 | 4459 | | |
| |||
4469 | 4467 | | |
4470 | 4468 | | |
4471 | 4469 | | |
4472 | | - | |
4473 | 4470 | | |
4474 | 4471 | | |
4475 | 4472 | | |
| |||
4489 | 4486 | | |
4490 | 4487 | | |
4491 | 4488 | | |
4492 | | - | |
4493 | 4489 | | |
4494 | 4490 | | |
4495 | 4491 | | |
| |||
0 commit comments