summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-01-18 17:28:43 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-01-18 17:28:43 -0500
commit9b9b23c821e9309dd04cc3f193885ec5f32a0fdc (patch)
tree31b39cbaae6aaacca39cbfb87be2d2bed52788af
parent9307f58b4fdf8e139c4fd5de5c3a878b8b12d0b1 (diff)
made public use of m-h show-keys instead of show-key, fixed stupid field-numbering bug in fingerprint extraction
-rwxr-xr-xsrc/monkeysphere-host6
-rwxr-xr-xtests/basic2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/monkeysphere-host b/src/monkeysphere-host
index 2335f1a..c9b6a4c 100755
--- a/src/monkeysphere-host
+++ b/src/monkeysphere-host
@@ -93,12 +93,12 @@ gpg_host_edit() {
update_pgp_pub_file() {
log debug "updating openpgp public key file '$HOST_KEY_FILE'..."
gpg_host --export --armor --export-options export-minimal \
- $(gpg_host --list-secret-keys --with-colons --fingerprint | grep ^fpr | cut -f9 -d:) \
+ $(gpg_host --list-secret-keys --with-colons --fingerprint | grep ^fpr | cut -f10 -d:) \
> "$HOST_KEY_FILE"
}
host_fingerprints() {
- local fprs=($(<"$HOST_KEY_FILE" "$SYSSHAREDIR/keytrans" listfprs))
+ local fprs=($(gpg_host --list-secret-keys --with-colons --fingerprint | grep ^fpr: | cut -f10 -d:))
log debug "host key fingerprints:"
printf '%s\n' "${fprs[@]}" | log debug
@@ -136,7 +136,7 @@ Please run 'monkeysphere-host import-key' to import a key."
*)
if [ -z "$keyID" ] ; then
failure "Your host keyring contains multiple keys.
-Please specify one to act on (see 'monkeysphere-host show-key')."
+Please specify one to act on (see 'monkeysphere-host show-keys')."
fi
;;
esac
diff --git a/tests/basic b/tests/basic
index d8d24ce..6755329 100755
--- a/tests/basic
+++ b/tests/basic
@@ -257,7 +257,7 @@ monkeysphere-host import-key "$TEMPDIR"/ssh_host_rsa_key ssh://testhost
echo
echo "##################################################"
echo "### getting host key fingerprint..."
-SSHHOSTKEYID=$( monkeysphere-host show-key | grep '^OpenPGP fingerprint: ' | cut -f3 -d\ )
+SSHHOSTKEYID=$( monkeysphere-host show-keys | grep '^OpenPGP fingerprint: ' | cut -f3 -d\ )
echo "$SSHHOSTKEYID"
# change host key expiration