]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.11] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (GH-11333...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 21 Dec 2023 00:51:51 +0000 (01:51 +0100)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 00:51:51 +0000 (16:51 -0800)
commit9cbe4738bc78b7ce5574370ef1116709952a96eb
tree1ddb3e782dfde07a1094604c300491d36755e139
parentd65dfc82383ab89f1ebd879ea887313b3b0e065e
[3.11] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (GH-113334) (#113340)

When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object.

This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based).

(cherry picked from commit 1ff02385944924db7e683a607da2882462594764)

Co-authored-by: Martijn Pieters <mj@zopatista.com>
Lib/asyncio/sslproto.py
Lib/test/test_asyncio/test_sslproto.py
Misc/NEWS.d/next/Library/2023-12-20-21-18-51.gh-issue-113214.JcV9Mn.rst [new file with mode: 0644]