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

--verify option does not actually verify downloaded tarball #192

Open
Footpad opened this issue Dec 1, 2023 · 0 comments
Open

--verify option does not actually verify downloaded tarball #192

Footpad opened this issue Dec 1, 2023 · 0 comments

Comments

@Footpad
Copy link

Footpad commented Dec 1, 2023

When running swiftenv install with the --verify flag, it attempts to verify the signature but actually fails open with the following logging:

gpg: no signed data
gpg: can't hash datafile: No data

The current implementation doesn't actually do the needful because it doesn't meet gpg's conventions around naming:

--verify
       Assume that the first argument is a signed file or a detached signature
       and verify it without generating any output. With no arguments, the
       signature packet is read from STDIN. If only a sigfile is given, it may
       be a complete signature or a detached signature, in which case the signed
       stuff is expected in a file without the ".sig" or ".asc" extension.
       With more than 1 argument, the first should be a detached signature
       and the remaining files are the signed stuff.

In the Swift.org instructions, the example works because the tarball is a swift-*.tar.gz and the signature is a swift-*.tar.gz.sig file and thus meets the single-argument conventions.

The code here is not preserving the names of the tarball and signature locally, so it does not match up and gpg fails to actually verify the signature whilst (unhelpfully) keeping its exit code as 0.

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

No branches or pull requests

1 participant