Created
October 21, 2011 17:15
-
-
Save snay2/1304368 to your computer and use it in GitHub Desktop.
Bash shell script to automate PGP key signing
This file contains 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
while [ 1 ]; do | |
echo ">> Enter an email address:" | |
read EMAIL | |
gpg --keyserver pgp.mit.edu --search-keys $EMAIL | |
FINGERPRINT=`gpg --fingerprint $EMAIL` | |
[[ $FINGERPRINT =~ 2048[DR]/([0-9A-F]{8}) ]]; | |
KEY_ID=${BASH_REMATCH[1]} | |
gpg --sign-key $EMAIL | |
echo ">> Going to sign key $KEY_ID" | |
gpg --keyserver pgp.mit.edu --send-key $KEY_ID | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Am I reading line 6 right that it will only proceed with 2048 bit keys?