This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author alex.gronholm
Recipients alex.gronholm, christian.heimes, lukasz.langa
Date 2022-01-09.13:40:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641735617.1.0.262008079316.issue46313@roundup.psfhosted.org>
In-reply-to
Content
PR #25309 (https://github.com/python/cpython/pull/25309) changed OpenSSL behavior so that it ignores unexpected EOFs by default. This was detected by the test suites of both trio and AnyIO when running on OpenSSL 3.

We worked around the problem by explicitly unsetting the SSL_OP_IGNORE_UNEXPECTED_EOF flag and then checking if the "strerror" attribute of SSLError contains the text "UNEXPECTED_EOF_WHILE_READING".

The remedy in the standard library would be twofold:
1. Revert the change of enabling SSL_OP_IGNORE_UNEXPECTED_EOF by default
2. Handle the condition properly so that SSLEOFError is raised instead of the generic SSLError

As SSLSockets ignore SSLEOFError by default, this fix should work fine for those too.
History
Date User Action Args
2022-01-09 13:40:17alex.gronholmsetrecipients: + alex.gronholm, christian.heimes, lukasz.langa
2022-01-09 13:40:17alex.gronholmsetmessageid: <1641735617.1.0.262008079316.issue46313@roundup.psfhosted.org>
2022-01-09 13:40:17alex.gronholmlinkissue46313 messages
2022-01-09 13:40:16alex.gronholmcreate