Skip to content

fix: skip system CA store for pypi mapping middleware client - #6936

Open
r3wretrhy wants to merge 1 commit into
prefix-dev:mainfrom
r3wretrhy:pypi-mapping-no-system-ca
Open

fix: skip system CA store for pypi mapping middleware client#6936
r3wretrhy wants to merge 1 commit into
prefix-dev:mainfrom
r3wretrhy:pypi-mapping-no-system-ca

Conversation

@r3wretrhy

Copy link
Copy Markdown

The mapping cache middleware builds a dummy reqwest client so the cache can sit outside the caller's offline stack. Client::new() still initializes system CAs, which panics when tls-root-certs = webpki on a host without a conventional CA store.

Use tls_certs_only([]) for that unused inner client. Also list tls-root-certs in pixi config list.

Fixes #6825.

How Has This Been Tested?

cargo test -p pypi_mapping unused_mapping_http_client_builds_without_system_cas
cargo check -p pixi_cli

The mapping cache stack needs a dummy reqwest client because the cache must sit outside the caller's offline middleware. Client::new() still loads system roots and panics on hosts without a CA store, even when tls-root-certs = webpki.

Also list tls-root-certs in pixi config list so the setting is inspectable.

Fixes prefix-dev#6825.
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.

Bare reqwest::Client::new() in pypi_mapping ignores tls-root-certs and can panic without a system CA store

1 participant