Commit Graph
12 Commits
Author SHA1 Message Date
Jeong, YunWon 3a8a196996 ssl: share rustls engine in host_env and fire msg callbacks (#8665)
* ssl: fire msg callbacks and compute tls-unique

Observe TLS records to invoke _msg_callback, and derive TLS 1.2
tls-unique from the KeyLog master secret plus rustls PRF.
Restore CHANNEL_BINDING_TYPES and drop the remaining test_ssl
RUSTPYTHON skips.

Assisted-by: Claude

* lzma: build the xz-core engine on wasm32

Expose `_lzma` on wasm32 and Android by compiling the xz-core
engine on those targets instead of gating it out.

Assisted-by: Claude

* ssl: move the rustls engine into rustpython-common

Extract the VM-independent rustls helpers (MemoryBio, certificate
decode, cipher strings, OID table, chain builder, providers, and
TLS record observation) so stdlib _ssl wraps a shared engine.

Assisted-by: Claude

* ssl: keep the rustls engine in host_env

TLS helpers share the host trust store and default verify paths, so
they belong next to native_certs rather than in rustpython-common.

Assisted-by: Claude

* stdlib: drop unused jiff after moving cert decode

Assisted-by: Claude
2026-09-08 00:25:16 +09:00
Jeong, YunWon 531cf2b378 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: Claude
2026-09-06 07:54:59 +09:00
CPython Developers 2dcc116380 Update ssl from v3.14.3 2026-03-01 11:36:46 +09:00
Jeong, YunWon fda9ceea54 Update ssl.py from CPython 3.13.9 (#6217)
* update ssl.py from CPython 3.13.9

* test_ssl

* mark failing tests

* remove test/*.pem

* fix certdata path

* unmark fixed tests
2025-10-28 13:19:12 +09:00
Jeong, YunWon 3ec905e08a ssl.{SSLSession,MemoryBIO} (#6209)
* SSLSession

* get_unverified_chain

* SSL MemoryBIO
2025-10-23 18:37:40 +09:00
Noah bed2ddee46 Update ssl.py to version from CPython 3.8 2021-02-07 19:39:36 -06:00
Noah 407bbb1513 Use IntEnum._convert_ in ssl.py 2020-09-18 23:56:09 -05:00
Noah 12c57ce135 Add ssl.RAND_* functions 2020-03-27 15:24:08 -05:00
Noah 31905bd1ce Add OPENSSL_VERSION constants 2020-03-27 15:24:08 -05:00
Noah bea6e54a37 Make ssl work on windows 2020-03-27 15:24:08 -05:00
Noah 255b5a631a Edit ssl.py slightly 2020-03-27 14:40:19 -05:00
Noah d3cc3601d6 Add ssl.py from CPython 3.6 2020-03-27 14:40:19 -05:00