Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
bpo-43921: Cleanup test_ssl.test_wrong_cert_tls13()#26520
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Don't catch OSError, and check the SSLError message.
vstinner commentedJun 3, 2021
I don't see why a SSLSocket would raise an OSError on read()/write(). On ECONNRESET error, read() raises an SSLEOFError exception: seehttps://bugs.python.org/issue43921#msg394967 cc@tiran |
tiran commentedJun 3, 2021
It's based on old code from Antoine, see |
vstinner commentedJun 3, 2021
I see. For test_wrong_cert_tls12(), SSLError or OSError is expected on connect(), not on read/write. There is a comment explaining the OSError: test_wrong_cert_tls13() is different because TLS 1.3 is different. The test doesn't expect any error on connect(), only on read() or write(). It also explained in a comment: In short, test_wrong_cert_tls12() looks correct, and I now understand how test_wrong_cert_tls13() inherited |
vstinner commentedJun 3, 2021
This change makes the test more strict (check the exact error message). I'm not sure that it works well on all platforms and all supported OpenSSL versions. I prefer to not backport the change to 3.10. At least, not now. |
tiran commentedJun 3, 2021
Either keep 3.9 to 3.11 tests in sync or don't merge changes. |
miss-islington commentedJun 3, 2021
Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10. |
miss-islington commentedJun 3, 2021
Thanks@vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9. |
miss-islington commentedJun 3, 2021
Sorry@vstinner, I had trouble checking out the |
miss-islington commentedJun 3, 2021
Sorry,@vstinner, I could not cleanly backport this to |
tiran commentedJun 3, 2021
@vstinner please backport changes to 3.10 and 3.9. Tests should be kept in sync. |
Uh oh!
There was an error while loading.Please reload this page.
Don't catch OSError, and check the SSLError message.
https://bugs.python.org/issue43921