Repository navigation
python3Packages.grpcio: link vendored roots.pem to cacert - #576514
Merged
Merged
Conversation
grpcio sets a roots override callback. The callback returns the vendored grpc/_cython/_credentials/roots.pem. gRPC core calls it before it tries the system trust store, so grpcio always uses the vendored copy. That copy does not get cacert updates. It still contains emSign ECC Root CA - G3, for example. Replace the vendored file with a link to the cacert bundle, so that a cacert update also updates the grpcio trust store. GRPC_DEFAULT_SSL_ROOTS_FILE_PATH still overrides it. Assisted-by: Claude Code (claude-opus-5)
This was referenced Oct 20, 2026
Contributor
|
Successfully created backport PR for |
Contributor
This seems like the wrong fix for nixpkgs. If another eMudhra incident happens, the package would would then trust the revoked certificate even if the system was properly updated (ex. with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
python3Packages.grpcio sets a root-certificate callback that returns its vendored
roots.pem. That callback comes before the system roots in gRPC core, so grpcio always trusted its own copy of the Mozilla roots (with emSign ECC Root CA - G3) and never got cacert updates. Link the vendored file to the cacert bundle.The grpc C core is not changed: on NixOS it already uses
/etc/ssl/certs/ca-certificates.crtand never readsshare/grpc/roots.pem.Tested on x86_64-linux: the scanner finds no vendored bundle, a TLS handshake to pubsub.googleapis.com:443 with the default
ssl_channel_credentials()works, and withGRPC_DEFAULT_SSL_ROOTS_FILE_PATHset to a bundle without the needed root it fails.Related to: #576485
Related to: #576541
Assisted-by: Claude Code (claude-opus-5)
Things done
./result/bin/.nixpkgs-reviewon this PR. See nixpkgs-review usage.passthru.tests.