Skip to content
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

OpenPGP verification of downloaded tarball for GHC #57

Closed
wants to merge 4 commits into from
Closed

OpenPGP verification of downloaded tarball for GHC #57

wants to merge 4 commits into from

Conversation

Franciman
Copy link

Hi,
I tried using gpg to make integrity verification of the downloaded tarball for GHC.
It seemed useful to me.
For now I just made a sketchy implementation, probably it should be an optional feature and more configurable.
Also I could use some advice on how to deal with the public key used for signing ghc tarballs, for now I saved it in a file and told gpg that it's trusted (forcing it with the use of --trusted-key option).
Let me know what you think about it!

@Franciman
Copy link
Author

I've fixed errors given by shellcheck, and I've put the correct URL for ghc public key download.
Previously it referred to my fork's repository. Now the test is going to fail since in haskell/ghcup there is not the .ghc-public-key file yet.

@hasufell
Copy link
Member

hasufell commented Dec 4, 2018

I'm generally not very comfortable with anything that involves gpg and "automatic verification".

Cryptographic signing has many pitfalls and one is blindly downloading/trusting keys. It makes the whole point of it void.

In addition, we are not restricted to GHC upstream as the source for tarballs.

@Franciman
Copy link
Author

Franciman commented Dec 4, 2018

Makes sense. How about verifying the signature using the user's keyring, then?
Shouldn't other sources provide signatures or checksums too?
I think that verifying tarball integrity is important, especially when the tarball contains an executable.

@hasufell
Copy link
Member

hasufell commented Dec 4, 2018

I think that verifying tarball integrity

Well, that can be done purely by sha checksums. Signatures are about trust. Building and managing trust is a manual procedure.

We would probably have to extend our .download-urls format somehow so we can feed it sha checksums and signature files per tarball. The latter could be optionally used for verification (cli switch) without any automatic trust setting.

@Franciman Franciman closed this Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants