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

Add thread-safety clarifications to the SSLContext documentation #118596

Open
mm-matthias opened this issue May 5, 2024 · 0 comments
Open

Add thread-safety clarifications to the SSLContext documentation #118596

mm-matthias opened this issue May 5, 2024 · 0 comments
Labels
docs Documentation in the Doc dir

Comments

@mm-matthias
Copy link

mm-matthias commented May 5, 2024

Documentation

Currently there is no documentation that tells anything about whether SSLContext is thread-safe or not and how it can be shared between different connections. Knowing how to share the SSLContext between different threads and connections is important for example to solve problems like this.
This issue has also come up here where the matter was clarified by @tiran in this comment:

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.

I have reworked this statement into a PR so that it's generally available for future reference.

Linked PRs

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
Projects
None yet
Development

No branches or pull requests

1 participant