You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex() #87020
SSL_read() and SSL_write() are limited to int. The new SSL_write_ex() and SSL_read_ex() APIs support size_t just like read(2) and recv(2). Also see bpo-42853.
I am still seeing failures to read responses over 2 GB in Python 3.10b1. I'm working on a reproducer, but I'm getting the same "OverflowError: signed integer is greater than maximum" that I get in 3.9.
geofft commented on Jul 19, 2021
geofftmannequin
Mannequin
More actions
Christian mentioned on Twitter that this is probably due to a missing argument clinic change from "int" to "Py_ssize_t". I can confirm that fixing that and rerunning argument clinic makes things start to work.
I don't have the ability to reopen this bug (I think), can someone reopen it please?
New changeset 83d1430 by Pablo Galindo Salgado in branch 'main': bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271) 83d1430
New changeset 5ec2757 by Miss Islington (bot) in branch '3.10': bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271) (GH-27308) 5ec2757
I could not find any discussion regarding these reverts, so it is not immediately obvious if they are still needed. @pablogsal, your review was requested for both of these reverts; do you remember the discussion?
I could not find any discussion regarding these reverts, so it is not immediately obvious if they are still needed. @pablogsal, your review was requested for both of these reverts; do you remember the discussion?
I remember my commit but unfortunately I don't remember the discussion for the reverts :(
Well, given that the reverts were not applied for 1,5 years, perhaps we could close those PRs. It would seem to me that there would exist an issue for this if these were release blockers or if they represented critical bugs.
Activity
tiran commentedon Jan 7, 2021
SSL_read() and SSL_write() are limited to int. The new SSL_write_ex() and SSL_read_ex() APIs support size_t just like read(2) and recv(2). Also see bpo-42853.
Both functions return 1 for success or 0 for failure.
tiran commentedon Jan 7, 2021
As of version 3.3.1, LibreSSL does not have SSL_write_ex() and SSL_read_ex(). The read and write functions are limited to int.
tiran commentedon Apr 17, 2021
3.10 branch now requires OpenSSL 1.1.1. This should be easy to implement.
tiran commentedon Apr 19, 2021
SSL_write_ex() and SSL_read_ex() solve two issues:
tiran commentedon Apr 19, 2021
New changeset 89d1550 by Christian Heimes in branch 'master':
bpo-42854: Use SSL_read/write_ex() (GH-25468)
89d1550
tiran commentedon Apr 20, 2021
Ethan, what's your platform and OpenSSL version?
ethanfurman commentedon Apr 21, 2021
False alarm, sorry. Still getting used to merging, rebasing, etc.
Current tests run fine.
geofft commentedon Jul 19, 2021
I am still seeing failures to read responses over 2 GB in Python 3.10b1. I'm working on a reproducer, but I'm getting the same "OverflowError: signed integer is greater than maximum" that I get in 3.9.
geofft commentedon Jul 19, 2021
Christian mentioned on Twitter that this is probably due to a missing argument clinic change from "int" to "Py_ssize_t". I can confirm that fixing that and rerunning argument clinic makes things start to work.
I don't have the ability to reopen this bug (I think), can someone reopen it please?
FFY00 commentedon Jul 19, 2021
https://twitter.com/geofft/status/1417167982665551877
pablogsal commentedon Jul 20, 2021
I will push a fix today
pablogsal commentedon Jul 23, 2021
New changeset 83d1430 by Pablo Galindo Salgado in branch 'main':
bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271)
83d1430
pablogsal commentedon Jul 23, 2021
New changeset 5ec2757 by Miss Islington (bot) in branch '3.10':
bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271) (GH-27308)
5ec2757
erlend-aasland commentedon Jan 4, 2024
Two reverts were opened after this issue was resolved:
I could not find any discussion regarding these reverts, so it is not immediately obvious if they are still needed. @pablogsal, your review was requested for both of these reverts; do you remember the discussion?
pablogsal commentedon Jan 4, 2024
I remember my commit but unfortunately I don't remember the discussion for the reverts :(
erlend-aasland commentedon Jan 4, 2024
Well, given that the reverts were not applied for 1,5 years, perhaps we could close those PRs. It would seem to me that there would exist an issue for this if these were release blockers or if they represented critical bugs.
erlend-aasland commentedon Jan 5, 2024
I closed the revert PRs. We can open them later if needed.