Created
December 9, 2020 21:01
-
-
Save vpetrigo/7efd477ce4a5d74b38e3519a6e6ebfc5 to your computer and use it in GitHub Desktop.
Verify file signature with a GPG ASC file
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
#!/bin/bash | |
# usage: verify.sh <ASC file name without extension> <signature filename> <file to verify> | |
# verify.sh 18A9236D file.sig file.txt | |
asc_filename="$1" | |
sig="$2" | |
file_to_verify="$3" | |
gpg -o ${asc_filename}.gpg --dearmor ${asc_filename}.asc | |
gpg --no-default-keyring --keyring ./${asc_filename}.gpg --verify "$sig" "$file_to_verify" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment