-
Notifications
You must be signed in to change notification settings - Fork 273
Avoid automatic TLS crypto provider detection #3104
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
Comments
I think we originally opted to use |
It would also be nice if we could build fewer than 3 versions of rustls... 😢 |
@michelleN no - #3103 prevents a runtime error, but we are still doing automatic crypto provider detection. So things work currently, but we're at the mercy of any crate update messing things up again. This issue is advocating for using |
@rylev Agree it makes sense to do this in (Edited because I missed some of what Ryan said right at tbe beginning of the issue. Sigh.) |
As can be seen in #2830 and #3103 - rustls has automatic detection of the crypto provider used for TLS crypto operations. This can very easily go wrong in a complex project like Spin where many different dependencies come together to determine which features are enabled.
Instead, we should explicitly set the crypto provider once so that automatic detection does not happen. The only question is where this should happen. The crypto provider is a global variable which should only be set once. Therefore, it probably makes most sense to set it in main and allow each subcrate of Spin to be ignorant of this entire situation.
The text was updated successfully, but these errors were encountered: