3 # Monkeysphere authentication remove-certifier subcommand
5 # The monkeysphere scripts are written by:
6 # Jameson Rollins <jrollins@fifthhorseman.net>
7 # Jamie McClelland <jm@mayfirst.org>
8 # Daniel Kahn Gillmor <dkg@fifthhorseman.net>
10 # They are Copyright 2008, and are all released under the GPL, version 3
13 # delete a certifiers key from the host keyring
21 if [ -z "$keyID" ] ; then
22 failure "You must specify the key ID of a key to remove."
25 if gpg_authentication "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key 0x${keyID}!" ; then
26 read -p "Really remove above listed identity certifier? (y/N) " OK; OK=${OK:-N}
27 if [ "${OK/y/Y}" != 'Y' ] ; then
28 failure "Identity certifier not removed."
34 # delete the requested key
35 if gpg_authentication "--delete-key --batch --yes 0x${keyID}!" ; then
36 # delete key from host keyring as well
37 gpg_host --delete-key --batch --yes "0x${keyID}!"
39 # update the trustdb for the authentication keyring
40 gpg_authentication "--check-trustdb"
43 echo "Identity certifier removed."
45 failure "Problem removing identity certifier."