From: Daniel Kahn Gillmor Date: Mon, 18 Jan 2010 22:28:43 +0000 (-0500) Subject: made public use of m-h show-keys instead of show-key, fixed stupid field-numbering... X-Git-Tag: monkeysphere_0.28~21 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=9b9b23c821e9309dd04cc3f193885ec5f32a0fdc;p=monkeysphere.git made public use of m-h show-keys instead of show-key, fixed stupid field-numbering bug in fingerprint extraction --- 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