2 # This should be sourced by bash (though we welcome changes to make it POSIX sh compliant)
4 # Monkeysphere authentication remove-certifier subcommand
6 # The monkeysphere scripts are written by:
7 # Jameson Rollins <jrollins@finestructure.net>
8 # Jamie McClelland <jm@mayfirst.org>
9 # Daniel Kahn Gillmor <dkg@fifthhorseman.net>
11 # They are Copyright 2008-2009, and are all released under the GPL,
14 # delete a certifiers key from the host keyring
22 if [ -z "$keyID" ] ; then
23 failure "You must specify the key ID of a key to remove."
26 # FIXME: should we be doing a fancier list_certifier output here?
27 gpg_core --list-key --fingerprint "0x${keyID}!" || failure
29 if [ "$PROMPT" != "false" ] ; then
30 printf "Really remove the above listed identity certifier? (Y/n) " >&2
32 if [ "${OK/y/Y}" != 'Y' ] ; then
33 failure "Identity certifier not removed."
36 log debug "certifier removed without prompting."
39 # delete the requested key from the sphere keyring
40 if gpg_sphere "--delete-key --batch --yes 0x${keyID}!" ; then
41 # delete key from core keyring as well
42 gpg_core --delete-key --batch --yes "0x${keyID}!"
44 # update the trustdb for the authentication keyring
45 gpg_sphere "--check-trustdb"
47 log info "Identity certifier removed."
49 failure "Problem removing identity certifier."