From: Jameson Graef Rollins Date: Thu, 19 Feb 2009 09:30:40 +0000 (-0500) Subject: don't use /dev/stdin hack with ssh-keygen to get ssh fingerprint. just use a tmp... X-Git-Tag: monkeysphere_0.23~44^2 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=9214361c3f2775e0e71ef319335ba331a5a77f37;hp=77625ad3803dcf89fef32e942ea9e2a5a25a82e0;p=monkeysphere.git don't use /dev/stdin hack with ssh-keygen to get ssh fingerprint. just use a tmp file. --- diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 00f7c34..a67715f 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -172,6 +172,11 @@ show_key() { # import the host key into the tmp dir gpg --quiet --import <"$HOST_KEY_FILE" + # create the ssh key + TMPSSH="$GNUPGHOME"/ssh_host_key_rsa_pub + openpgp2ssh <"$HOST_KEY_FILE" 2>/dev/null >"$TMPSSH" + + # get the gpg fingerprint HOST_FINGERPRINT=$(gpg --quiet --list-keys --with-colons --with-fingerprint \ | grep '^fpr:' | cut -d: -f10 ) @@ -188,9 +193,7 @@ show_key() { # list the ssh fingerprint echo -n "ssh fingerprint: " - ssh-keygen -l -f /dev/stdin \ - <<<$(openpgp2ssh <"$HOST_KEY_FILE" 2>/dev/null) \ - | awk '{ print $1, $2, $4 }' + ssh-keygen -l -f "$TMPSSH" | awk '{ print $1, $2, $4 }' # remove the tmp file trap - EXIT