Skip to content

Rework the PGP key configuration #2085

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 26, 2019
Merged

Conversation

kinnison
Copy link
Contributor

This PR adds a number of commits which work toward a better PGP key infrastructure inside Rustup.

In particular it adds (deliberately undocumented at this time) a settings.toml entry pgp_keys and the environment variable RUSTUP_PGP_KEY.

We add a PgpKey enum which indicates where a key came from, so that we can use it in future debugging and/or informational messages to the user.

Perhaps @dignifiedquire might take a look over this?

Copy link
Contributor

@dignifiedquire dignifiedquire left a comment

Choose a reason for hiding this comment

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

Nice, this should do the trick.

Is there a good place to document this though? As currently this seems a bit hidden for a user

@kinnison
Copy link
Contributor Author

I am deliberately hiding this for now. Once we have proper signature checking integrated, I'll probably add something to the README.md about public keys, since I'll probably add a rustup show keys or somesuch to enumerate and show all the keys rustup knows about and where they come from.

This will be used to permit the specification of local PGP public keys which
can be used to validate channels and/or rustup releases.

Signed-off-by: Daniel Silverstone <[email protected]>
Useful for reading (small) binary files.

Signed-off-by: Daniel Silverstone <[email protected]>
We now support reading PGP public keys from environment-specified files and
settings specified files.  I've chosen to hide pgp_keys from the public part of
`Cfg` as a start on data-hiding for better encapsulation.

Signed-off-by: Daniel Silverstone <[email protected]>
@kinnison kinnison merged commit 3929244 into rust-lang:master Oct 26, 2019
@kinnison kinnison deleted the kinnison/pgp-keys branch January 6, 2020 09:51
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.

2 participants