Set rustls crypto provider explicitly#3590
Conversation
6d11af2 to
610f136
Compare
| redis = "0.32.5" | ||
| regex = "1" | ||
| reqwest = { version = "0.12", features = ["stream", "blocking", "rustls-tls-native-roots"] } | ||
| reqwest = { version = "0.12", features = ["stream", "blocking", "rustls-tls-native-roots-no-provider"] } |
There was a problem hiding this comment.
I think this could be a breaking change for consumers of spin crates that use this workspace dependency.
Is this actually necessary? It looks like reqwest will use an already-installed provider: https://github.com/seanmonstar/reqwest/blob/797df2b96a88ee49a636337f87beebe87f6212fe/src/async_impl/client.rs#L583-L593
There was a problem hiding this comment.
This is not strictly needed, let me try changing it back.
610f136 to
5dd4936
Compare
|
|
||
| #[tokio::main] | ||
| async fn main() { | ||
| spin_trigger::crypto::install_default_crypto_provider(); |
There was a problem hiding this comment.
It's not clear to me why this is in spin_trigger.
There was a problem hiding this comment.
Or it can be in a dedicated crate?
There was a problem hiding this comment.
Yeah, maybe. I don't think there's a good place for it at the moment - maybe spin-common, but that's meant to be reserved for helpers and conventions, and I am cautious about putting load-bearing state in there. I am not sure. It's just that if I thought "where is that default crypto thingy" then spin-trigger would not be on my list of places to look. @lann any thoughts?
Signed-off-by: Zhiwei Liang <zhiwei.liang@zliang.me>
5dd4936 to
44c370f
Compare
Fixes #3104.
Summary
spin-triggerhelper for the CLI and trigger harness paths.reqwestto the no-provider rustls feature so it uses the process default.A follow up PR can change the provider from
ringtoaws-lc-rsand optionally upgradereqwestto 0.13