Skip to content

Instantly share code, notes, and snippets.

@skaji
Created November 28, 2021 17:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skaji/e31c3fbfc4a746f2262306d42fe60303 to your computer and use it in GitHub Desktop.
Save skaji/e31c3fbfc4a746f2262306d42fe60303 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -exu
curl -sO https://www.cpan.org/authors/id/S/SK/SKAJI/CHECKSUMS
perl -ne 'print unless /BEGIN PGP SIGNATURE/../END PGP SIGNATURE/' CHECKSUMS > CHECKSUMS-NO-PGP-SIGNATURE
perl -MModule::Signature -e 'my $rv = Module::Signature::_verify(shift); printf "%s, %s\n", $rv, $rv eq Module::Signature::SIGNATURE_OK ? "OK" : "NOT OK"' CHECKSUMS-NO-PGP-SIGNATURE
❯ bash test.sh
+ curl -sO https://www.cpan.org/authors/id/S/SK/SKAJI/CHECKSUMS
+ perl -ne 'print unless /BEGIN PGP SIGNATURE/../END PGP SIGNATURE/' CHECKSUMS
+ perl -MModule::Signature -e 'my $rv = Module::Signature::_verify(shift); printf "%s, %s\n", $rv, $rv eq Module::Signature::SIGNATURE_OK ? "OK" : "NOT OK"' CHECKSUMS-NO-PGP-SIGNATURE
gpg: verify signatures failed: Unknown system error
0E0, NOT OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment