Skip to content

[3.12] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios (GH-113334) #113339

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2023

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 1927118 into python:3.12 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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy