X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fsubcommands%2Fma%2Fremove-certifier;h=560281dfc2583e8932b6e07f42bda2682e0323ff;hb=478cc34eee374166aae51f8598aa392e1fbfdde6;hp=a4eaf548ad5c872810eeaaccd2359dccd553a203;hpb=53f4ee78f320371a0f07865b21fdb4d6707a79d6;p=monkeysphere.git diff --git a/src/subcommands/ma/remove-certifier b/src/subcommands/ma/remove-certifier old mode 100755 new mode 100644 index a4eaf54..560281d --- a/src/subcommands/ma/remove-certifier +++ b/src/subcommands/ma/remove-certifier @@ -1,17 +1,20 @@ -#!/usr/bin/env bash +# -*-shell-script-*- +# This should be sourced by bash (though we welcome changes to make it POSIX sh compliant) # Monkeysphere authentication remove-certifier subcommand # # The monkeysphere scripts are written by: -# Jameson Rollins +# Jameson Rollins # Jamie McClelland # Daniel Kahn Gillmor # -# They are Copyright 2008, and are all released under the GPL, version 3 -# or later. +# They are Copyright 2008-2009, and are all released under the GPL, +# version 3 or later. # delete a certifiers key from the host keyring +remove_certifier() { + local keyID local fingerprint @@ -20,7 +23,7 @@ if [ -z "$keyID" ] ; then failure "You must specify the key ID of a key to remove." fi -if gpg_authentication "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key 0x${keyID}!" ; then +if gpg_sphere "--no-options --list-options show-uid-validity --keyring ${GNUPGHOME_AUTHENTICATION}/pubring.gpg --list-key 0x${keyID}!" ; then read -p "Really remove above listed identity certifier? (y/N) " OK; OK=${OK:-N} if [ "${OK/y/Y}" != 'Y' ] ; then failure "Identity certifier not removed." @@ -30,12 +33,12 @@ else fi # delete the requested key -if gpg_authentication "--delete-key --batch --yes 0x${keyID}!" ; then +if gpg_sphere "--delete-key --batch --yes 0x${keyID}!" ; then # delete key from host keyring as well - gpg_host --delete-key --batch --yes "0x${keyID}!" + gpg_core --delete-key --batch --yes "0x${keyID}!" # update the trustdb for the authentication keyring - gpg_authentication "--check-trustdb" + gpg_sphere "--check-trustdb" echo echo "Identity certifier removed." @@ -43,3 +46,4 @@ else failure "Problem removing identity certifier." fi +}