KEMBAR78
[3.11] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (GH-113334) by miss-islington · Pull Request #113340 · python/cpython · GitHub
Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Dec 20, 2023

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 1ff0238)

Co-authored-by: Martijn Pieters mj@zopatista.com

…arios (pythonGH-113334)

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 1ff0238)

Co-authored-by: Martijn Pieters <mj@zopatista.com>
@gvanrossum gvanrossum merged commit 9cbe473 into python:3.11 Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants