summaryrefslogtreecommitdiff
path: root/howler
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@phys.columbia.edu>2008-05-26 18:30:49 -0400
committerJameson Graef Rollins <jrollins@phys.columbia.edu>2008-05-26 18:30:49 -0400
commit84d5807bec33e8f5e7ef8de8c9488c5895bdd838 (patch)
tree2495b140eee601466aa919409f4dbd2fbd1fa82e /howler
parentec55ca0c26b054a63265947b50e0392060b2a7e0 (diff)
change howler command from "trust-uids" (which is inaccurate) to "trust-key".
Diffstat (limited to 'howler')
-rwxr-xr-xhowler/howler24
1 files changed, 15 insertions, 9 deletions
diff --git a/howler/howler b/howler/howler
index d0bb13d..0b67c02 100755
--- a/howler/howler
+++ b/howler/howler
@@ -17,7 +17,7 @@ usage() {
cat <<EOF
usage: $PGRM gen-key
$PGRM publish-key
- $PGRM trust-uids USERID [USERID...]
+ $PGRM trust-key KEYID [KEYID...]
$PGRM help
EOF
}
@@ -78,12 +78,15 @@ publish_key() {
echo "gpg --send-keys --keyserver $KEYSERVER $keyID"
}
-# FIXME: need to figure out how to automate this, in a batch mode
-# or something.
-trust_uids() {
- for userID ; do
- gpg --keyserver "$KEYSERVER" --search ="$userID"
- gpg --edit-key "$userID"
+trust_key() {
+ for keyID ; do
+ # get the key from the key server
+ gpg --keyserver "$KEYSERVER" --recv-key "$keyID" || failure "could not retrieve key '$keyID'"
+
+ # edit the key to change trust
+ # FIXME: need to figure out how to automate this,
+ # in a batch mode or something.
+ gpg --edit-key "$keyID"
done
}
@@ -114,8 +117,11 @@ case $COMMAND in
'publish-key')
publish_key
;;
- 'trust-uids')
- trust_uids "$@"
+ 'trust-key')
+ if [ -z "$1" ] ; then
+ failure "you must specify at least one key to trust."
+ fi
+ trust_key "$@"
;;
'help')
usage