Commit b5a1ea3
committed
Almost a complete rewrite of rustls integration
Main changes:
* Now it contains understandable connection state machine instead of a
handful of entangled variables.
* OID and NID mappings are generated from OpenSSL data files. Some
mappings are still hardcoded but those are much smaller than before and
are actually testable.
* OpenSSL-compatible cipher list string (`man openssl-ciphers`) is parsed
correctly (I hope so).
* Difference between socket IO and buffered IO handling is minimal.
Please check the module-level doc comment in crates/stdlib/src/rustls.rs
for additional information.
What is missing:
* ssl timeout support. Normal socket timeouts still work just fine but
Python's ssl module implementation handles timeouts for whole
SSL/TLS operations, like handshake. This does not break anything and
just makes timeouts imprecise so I believe that proper timeouts can be
implemented later.
* Socket IO still uses _socket.socket.send/recv instead of methods of
the socket object itself. Otherwise everything hangs and this must
be investigated.
* See other TODO items in crates/stdlib/src/rustls.rs1 parent 3f5cb40 commit b5a1ea3
14 files changed
Lines changed: 5334 additions & 9469 deletions
File tree
- crates/stdlib
- src
- ssl
- examples
- src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
201 | 200 | | |
202 | 201 | | |
203 | 202 | | |
| |||
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
276 | | - | |
277 | 275 | | |
278 | 276 | | |
279 | 277 | | |
| |||
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
291 | | - | |
| 288 | + | |
292 | 289 | | |
| 290 | + | |
293 | 291 | | |
294 | 292 | | |
295 | 293 | | |
| |||
327 | 325 | | |
328 | 326 | | |
329 | 327 | | |
330 | | - | |
331 | 328 | | |
332 | | - | |
333 | 329 | | |
334 | 330 | | |
335 | 331 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | | - | |
120 | | - | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
123 | 124 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
129 | 128 | | |
130 | 129 | | |
131 | 130 | | |
| |||
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| |||
0 commit comments