gh-148292: Update SSLSocket.read() for OpenSSL 4#148602
gh-148292: Update SSLSocket.read() for OpenSSL 4#148602vstinner wants to merge 1 commit intopython:mainfrom
Conversation
Add _got_eof attribute to avoid calling SSL_read_ex() again after SSL_ERROR_EOF.
|
@picnixz @gpshead: Would you mind to review this (draft) change? I marked the PR as a draft since I'm not sure if the fix makes sense and is correct. See #148600 (comment) to reproduce the issue and build Python 3.15 with OpenSSL 4.0.0. Note: #148601 (Add Modules/_ssl_data_40.h data) has no effect on |
|
See #146217 (comment) for differences between OpenSSL 3 and OpenSSL 4. In short:
|
|
I don't think it's the correct change because I need to investigate. The reason why I don't think it's correct is because the code path being taken to trigger "A failure in the SSL library occurred" means that the last OpenSSL error code was not set (either we cleared it accidently or they didn't set it correctly) and this is something that can happen elsewhere. |
|
FTR, this may be related #148594. |
Add _got_eof attribute to avoid calling SSL_read_ex() again after SSL_ERROR_EOF.