projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update package description
[monkeysphere.git]
/
src
/
monkeysphere-host
diff --git
a/src/monkeysphere-host
b/src/monkeysphere-host
index b45b50ec60e38c9969426119c469e968751d5dbc..8452e6c082dfddba52ace4638677da8c4e0b869d 100755
(executable)
--- a/
src/monkeysphere-host
+++ b/
src/monkeysphere-host
@@
-138,12
+138,13
@@
Please run 'monkeysphere-host import-key' to import a key."
;;
*)
if [ -z "$keyID" ] ; then
;;
*)
if [ -z "$keyID" ] ; then
- failure "Keyring contains multiple keys. Please specify one to act on (see 'monkeysphere-host show-key')."
+ failure "Your host keyring contains multiple keys.
+Please specify one to act on (see 'monkeysphere-host show-key')."
fi
;;
esac
printf '%s\n' "${fprs[@]}" | grep "${keyID}$" \
fi
;;
esac
printf '%s\n' "${fprs[@]}" | grep "${keyID}$" \
- || failure "
K
ey '$keyID' not found."
+ || failure "
Host k
ey '$keyID' not found."
}
# return 0 if user ID was found.
}
# return 0 if user ID was found.
@@
-174,11
+175,6
@@
multi_key() {
if [[ -z "$1" || "$1" == '--all' ]] ; then
keys="${fprs[@]}"
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
fi
for key in $keys ; do
@@
-208,7
+204,10
@@
show_key() {
# create the ssh key
TMPSSH="$GNUPGHOME"/ssh_host_key_rsa_pub
# 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 \
# get the gpg fingerprint
fingerprint=$(gpg --quiet --list-keys \