X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-host;h=903e3335c8f34a6735defbda1b5cf05f9b28c132;hb=539d6e02d7aeb66e37b598cfbe78b689fdedb151;hp=b45b50ec60e38c9969426119c469e968751d5dbc;hpb=ce45ef5702e072e869fa9d1b703f99dc740eb000;p=monkeysphere.git diff --git a/src/monkeysphere-host b/src/monkeysphere-host index b45b50e..903e333 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -174,11 +174,6 @@ multi_key() { if [[ -z "$1" || "$1" == '--all' ]] ; then keys="${fprs[@]}" - else - for key in $keys ; do - printf '%s\n' "${fprs[@]}" | grep "${key}$" \ - || failure "Key '$key' not found." - done fi for key in $keys ; do @@ -208,7 +203,10 @@ show_key() { # create the ssh key TMPSSH="$GNUPGHOME"/ssh_host_key_rsa_pub - gpg --export "$id" | openpgp2ssh 2>/dev/null >"$TMPSSH" + if ! gpg --export "$id" 2>/dev/null \ + | openpgp2ssh 2>/dev/null >"$TMPSSH" ; then + failure "Key '$id' not found." + fi # get the gpg fingerprint fingerprint=$(gpg --quiet --list-keys \