Commit ea9a296
Python 3.10 changed from using SSL_write() and SSL_read() to SSL_write_ex() and
SSL_read_ex(), but did not update handling of the return value.
Change error handling so that the return value is not examined.
OSError (not EOF) is now returned when retval is 0.
According to *recent* man pages of all functions for which we call
PySSL_SetError, (in OpenSSL 3.0 and 1.1.1), their return value should
be used to determine whether an error happened (i.e. if PySSL_SetError
should be called), but not what kind of error happened (so,
PySSL_SetError shouldn't need retval). To get the error,
we need to use SSL_get_error.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent d52bdfb commit ea9a296
File tree
3 files changed
+35
-43
lines changed- Lib/test
- Misc/NEWS.d/next/Library
- Modules
3 files changed
+35
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2429 | 2429 | | |
2430 | 2430 | | |
2431 | 2431 | | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
2432 | 2442 | | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
2438 | | - | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
| 2443 | + | |
2442 | 2444 | | |
2443 | 2445 | | |
2444 | 2446 | | |
| |||
3166 | 3168 | | |
3167 | 3169 | | |
3168 | 3170 | | |
3169 | | - | |
3170 | | - | |
| 3171 | + | |
| 3172 | + | |
3171 | 3173 | | |
3172 | 3174 | | |
3173 | 3175 | | |
| |||
4532 | 4534 | | |
4533 | 4535 | | |
4534 | 4536 | | |
4535 | | - | |
4536 | | - | |
| 4537 | + | |
| 4538 | + | |
4537 | 4539 | | |
4538 | 4540 | | |
4539 | 4541 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
615 | | - | |
616 | 615 | | |
617 | 616 | | |
618 | 617 | | |
| |||
645 | 644 | | |
646 | 645 | | |
647 | 646 | | |
648 | | - | |
649 | | - | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
650 | 659 | | |
651 | 660 | | |
652 | 661 | | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | 662 | | |
675 | 663 | | |
676 | 664 | | |
| |||
1030 | 1018 | | |
1031 | 1019 | | |
1032 | 1020 | | |
1033 | | - | |
| 1021 | + | |
1034 | 1022 | | |
1035 | 1023 | | |
1036 | 1024 | | |
| |||
2437 | 2425 | | |
2438 | 2426 | | |
2439 | 2427 | | |
2440 | | - | |
| 2428 | + | |
2441 | 2429 | | |
2442 | 2430 | | |
2443 | 2431 | | |
| |||
2467 | 2455 | | |
2468 | 2456 | | |
2469 | 2457 | | |
2470 | | - | |
| 2458 | + | |
2471 | 2459 | | |
2472 | 2460 | | |
2473 | 2461 | | |
| |||
2590 | 2578 | | |
2591 | 2579 | | |
2592 | 2580 | | |
2593 | | - | |
| 2581 | + | |
2594 | 2582 | | |
2595 | 2583 | | |
2596 | 2584 | | |
| |||
2716 | 2704 | | |
2717 | 2705 | | |
2718 | 2706 | | |
2719 | | - | |
| 2707 | + | |
2720 | 2708 | | |
2721 | 2709 | | |
2722 | 2710 | | |
| |||
0 commit comments