Skip to content

fix: upgrade reqwest from 0.12 to 0.13 and rename the rustls-tls feature to rustls#1068

Open
Giorno-Giovana wants to merge 2 commits intovoidzero-dev:mainfrom
Giorno-Giovana:main
Open

fix: upgrade reqwest from 0.12 to 0.13 and rename the rustls-tls feature to rustls#1068
Giorno-Giovana wants to merge 2 commits intovoidzero-dev:mainfrom
Giorno-Giovana:main

Conversation

@Giorno-Giovana
Copy link

@Giorno-Giovana Giorno-Giovana commented Mar 20, 2026

closes #1014

Motivation

vp install fails on macOS with a TLS error when trying to download the Node.js runtime from nodejs.org:

error: Failed to download Node.js runtime: Failed to download from
https://nodejs.org/dist/v22.18.0/SHASUMS256.txt: error sending request for url

The root cause is how reqwest 0.12 handles TLS certificate verification on non-Windows platforms. With the
rustls-tls feature, it uses webpki-roots — a hardcoded bundle of Mozilla root certificates compiled into the
binary. If the server's certificate chain involves a CA not present in that bundle (or the bundle is
outdated), TLS verification fails, even though the system's certificate store (macOS Keychain) trusts the
certificate.

reqwest 0.13 replaces the rustls-tls feature with rustls, which uses rustls-platform-verifier instead of
webpki-roots. This verifier delegates certificate validation to the OS-native certificate store
(Security.framework on macOS, SChannel on Windows), matching the behavior of curl and other system tools.

@netlify
Copy link

netlify bot commented Mar 20, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit fb3d428
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69c1079374f0480008151d95

@Giorno-Giovana Giorno-Giovana changed the title Up reqwest version Upgrade reqwest from 0.12 to 0.13 and rename the rustls-tls feature to rustls (the new name in 0.13) Mar 20, 2026
@fengmk2
Copy link
Member

fengmk2 commented Mar 20, 2026

@Giorno-Giovana why close?

@Giorno-Giovana
Copy link
Author

@fengmk2 looks like duplicate dwhoban#1

@Giorno-Giovana
Copy link
Author

But I think this could be merged anyway😁

@fengmk2
Copy link
Member

fengmk2 commented Mar 21, 2026

@codex review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@fengmk2 fengmk2 changed the title Upgrade reqwest from 0.12 to 0.13 and rename the rustls-tls feature to rustls (the new name in 0.13) fix: upgrade reqwest from 0.12 to 0.13 and rename the rustls-tls feature to rustls Mar 21, 2026
Copy link
Member

@fengmk2 fengmk2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, I will release a test version to verify before I merge.

@fengmk2
Copy link
Member

fengmk2 commented Mar 21, 2026

macOS build fails

@Giorno-Giovana
Copy link
Author

The macOS build fails because reqwest 0.13 with the rustls feature pulls in aws-lc-rs as the default crypto
provider.

Fix: Switch from aws-lc-rs to ring as the crypto provider:

  1. Changed reqwest feature from rustls to rustls-no-provider (avoids pulling in aws-lc-sys)
  2. Added rustls as a workspace dependency with ring feature enabled
  3. Added ensure_tls_provider() calls that install the ring crypto provider at runtime (using OnceLock for
    one-time initialization)

This completely removes aws-lc-sys from the dependency tree while keeping the same TLS behavior (platform
certificate verification via rustls-platform-verifier).

@Giorno-Giovana Giorno-Giovana requested a review from fengmk2 March 23, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reqwest calls in vp fail when running behind a MITM proxy.

2 participants