-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
test_ssl.test_wrong_cert_tls13
should accept "Broken pipe" as valid error
#117483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
…_wrong_cert_tls13` On macOS, the closed connection can lead to a "Broken pipe" error instead of a "Connection reset by peer" error.
…_cert_tls13` (GH-117484) On macOS, the closed connection can lead to a "Broken pipe" error instead of a "Connection reset by peer" error.
Interesting. Could it be related to #26893? |
IMO it's related to #115628. And the fact that SSL tests are too strict about the exact wording of the messages. I checked that adding the |
@encukou I am agreed with your opinion |
…_wrong_cert_tls13` (pythonGH-117484) On macOS, the closed connection can lead to a "Broken pipe" error instead of a "Connection reset by peer" error.
The
test_wrong_cert_tls13
unit tests checks the behavior when the server rejects the client's ceritficate. On macOS, this can sometimes lead to a "Broken pipe" on the client instead of a "Connection reset by peer" when the connection is closed during thes.write()
call.This happens frequently in the free-threaded build, but can also be reproduced on the default (with GIL) build by adding a short
time.sleep(0.1)
immediately before thes.write(b'data')
.cpython/Lib/test/test_ssl.py
Lines 3153 to 3178 in 8eda146
Linked PRs
test_wrong_cert_tls13
#117484The text was updated successfully, but these errors were encountered: