]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] 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:36 +0000 (01:51 +0100)
committerGitHub <noreply@github.com>
Thu, 21 Dec 2023 00:51:36 +0000 (16:51 -0800)
commit192711856bbe88e9dfeee9af00da22189047463e
treeb917747b389b6949062a0920ec9e9ed0a22e4fb4
parentb01caf1d9d50f07fe8e032f0a1fb76ff6e5e9fd2
[3.12] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (GH-113334) (#113339)

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]