You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 theSSLContext
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:
I have reworked this statement into a PR so that it's generally available for future reference.
Linked PRs
The text was updated successfully, but these errors were encountered: