Skip to content

[3.8] bpo-43577: Fix deadlock with SSLContext._msg_callback and sni_callback (GH-24957)#24959

Merged
miss-islington merged 1 commit intopython:3.8from
miss-islington:backport-77cde50-3.8
Mar 21, 2021
Merged

[3.8] bpo-43577: Fix deadlock with SSLContext._msg_callback and sni_callback (GH-24957)#24959
miss-islington merged 1 commit intopython:3.8from
miss-islington:backport-77cde50-3.8

Conversation

@miss-islington
Copy link
Copy Markdown
Contributor

@miss-islington miss-islington commented Mar 21, 2021

OpenSSL copies the internal message callback from SSL_CTX->msg_callback to
SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback
to use the callback value of the new context.

PySSL_set_context() now resets the callback and _PySSL_msg_callback()
resets thread state in error path.

Signed-off-by: Christian Heimes [email protected]
(cherry picked from commit 77cde50)

Co-authored-by: Christian Heimes [email protected]

https://bugs.python.org/issue43577

Automerge-Triggered-By: GH:tiran

pythonGH-24957)

OpenSSL copies the internal message callback from SSL_CTX->msg_callback to
SSL->msg_callback. SSL_set_SSL_CTX() does not update SSL->msg_callback
to use the callback value of the new context.

PySSL_set_context() now resets the callback and _PySSL_msg_callback()
resets thread state in error path.

Signed-off-by: Christian Heimes <[email protected]>
(cherry picked from commit 77cde50)

Co-authored-by: Christian Heimes <[email protected]>
@miss-islington
Copy link
Copy Markdown
Contributor Author

@tiran: Status check is done, and it's a success ✅ .

@miss-islington
Copy link
Copy Markdown
Contributor Author

@tiran: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 93b0da7 into python:3.8 Mar 21, 2021
@miss-islington miss-islington deleted the backport-77cde50-3.8 branch March 21, 2021 15:32
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.

4 participants