Skip to content
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

gh-118596: Add thread-safety clarifications to the SSLContext documentation #118597

Merged
merged 1 commit into from
Jun 16, 2024

Conversation

mm-matthias
Copy link
Contributor

@mm-matthias mm-matthias commented May 5, 2024

This PR adds a clarification about the thread-safety and usage of SSLContext to the documentation.

The background to these changes is outlined in this issue.


📚 Documentation preview 📚: https://cpython-previews--118597.org.readthedocs.build/

Copy link

cpython-cla-bot bot commented May 5, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@mm-matthias mm-matthias force-pushed the sslcontext-thread-safety-docs branch from 8d0400c to 9ed2a41 Compare June 14, 2024 09:42
@gpshead gpshead added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 16, 2024
@gpshead gpshead merged commit 4f59f86 into python:main Jun 16, 2024
29 checks passed
@miss-islington-app
Copy link

Thanks @mm-matthias for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 16, 2024
…ocumentation (pythonGH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f86)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 16, 2024
…ocumentation (pythonGH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f86)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 16, 2024

GH-120595 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 16, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 16, 2024

GH-120596 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 16, 2024
@gpshead gpshead self-assigned this Jun 16, 2024
gpshead pushed a commit that referenced this pull request Jun 16, 2024
…documentation (GH-118597) (#120596)

gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f86)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
gpshead pushed a commit that referenced this pull request Jun 16, 2024
…documentation (GH-118597) (#120595)

gh-118596: Add thread-safety clarifications to the SSLContext documentation (GH-118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
(cherry picked from commit 4f59f86)

Co-authored-by: mm-matthias <43849132+mm-matthias@users.noreply.github.com>
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
…ocumentation (python#118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
…ocumentation (python#118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
…ocumentation (python#118597)

Add thread-safety clarifications to the SSLContext documentation. Per the issue:

This issue has also come up [here](psf/requests#6667) where the matter was clarified by @tiran in [this comment](psf/requests#6667):
> `SSLContext` is designed to be shared and used for multiple connections. It is thread safe as long as you don't reconfigure it once it is used by a connection. Adding new certs to the internal trust store is fine, but changing ciphers, verification settings, or mTLS certs can lead to surprising behavior. The problem is unrelated to threads and can even occur in a single-threaded program.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants