done
keyID="$1"
+ if [ -z "$keyID" ] ; then
+ failure "You must specify the key ID of your primary key."
+ fi
gpgOut=$(gpg --quiet --fixed-list-mode --list-keys --with-colons \
"$keyID" 2> /dev/null)
;;
'gen-subkey'|'g')
- keyID="$1"
- if [ -z "$keyID" ] ; then
- failure "You must specify the key ID of your primary key."
- fi
- gen_subkey "$keyID"
+ gen_subkey "$@"
;;
'help'|'h'|'?')
done
keyID="$1"
+ if [ -z "$keyID" ] ; then
+ failure "You must specify the key ID of a key to add."
+ fi
export keyID
# export host ownertrust to authentication keyring
echo "key found:"
gpg_authentication "--fingerprint $fingerprint"
- read -p "Are you sure you want to add this key as a certifier of users on this system? (y/N) " OK; OK=${OK:-N}
+ echo "Are you sure you want to add this key as a certifier of"
+ read -p "users on this system? (y/N) " OK; OK=${OK:-N}
if [ "${OK/y/Y}" != 'Y' ] ; then
failure "aborting."
fi
local fingerprint
keyID="$1"
+ if [ -z "$keyID" ] ; then
+ failure "You must specify the key ID of a key to remove."
+ fi
# delete the requested key (with prompting)
gpg_host --delete-key "$keyID"
;;
'add-identity-certifier'|'add-certifier'|'a')
- if [ -z "$1" ] ; then
- failure "You must specify a key ID."
- fi
add_certifier "$1"
;;
'remove-identity-certifier'|'remove-certifier'|'r')
- if [ -z "$1" ] ; then
- failure "You must specify a key ID."
- fi
remove_certifier "$1"
;;