alexliesenfeld / httpmock

HTTP mocking library for Rust
https://httpmock.rs
MIT License
488 stars 45 forks source link

fix rustls crypto provider features #117

Closed Taowyoo closed 1 week ago

Taowyoo commented 1 month ago

Changes in this PR

  1. ensure no rustls crypto provider is selected by default: sync up with rustls = { version = "0.23", default-features = false, features = ["std", "tls12"], optional = true }
  2. ensure ring is turn on if https is needed

Context

Without change 2, A simple crate like this will fail to compile:

[package]
name = "test-mockhttp"
version = "0.1.0"
edition = "2021"

[dependencies]
httpmock = { version = "0.8.0-alpha.1", features = ["remote-https"]}

Change 1is made because current dependency definition let tokio-rustls and hyper-rustls default to use aws-lc-rs. Since I assume current rustls = { version = "0.23", default-features = false, features = ["std", "tls12"], optional = true } is intent to not use any crypto provide by default. So, I think it's better to sync up them.

alexliesenfeld commented 1 week ago

Thank you very much for this PR. I can confirm this issue still exists. Looking into the changes so we can merge this soon.