fix gpg_ssh_fingerprint() in monkeysphere to use internal implementation of ssh finge...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 17 Apr 2010 20:17:15 +0000 (16:17 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sat, 17 Apr 2010 20:17:15 +0000 (16:17 -0400)
src/monkeysphere

index fe92960472b6b114fea610238084c5755c609ba4..121db36ea7f0f7b47b0812666449336637859455 100755 (executable)
@@ -68,18 +68,7 @@ gpg_user() {
 # output the ssh fingerprint of a gpg key
 gpg_ssh_fingerprint() {
     keyid="$1"
-    local tmpfile=$(msmktempfile)
-
-    # trap to remove tmp file if break
-    trap "rm -f $tmpfile" EXIT
-
-    # use temporary file, since ssh-keygen won't accept keys on stdin
-    gpg_user --export "$keyid" --no-armor | openpgp2ssh "$keyid" >"$tmpfile"
-    ssh-keygen -l -f "$tmpfile" | awk '{ print $1, $2, $4 }'
-
-    # remove the tmp file
-    trap - EXIT
-    rm -rf "$tmpfile"
+    gpg_user --export "$keyid" --no-armor | "$SYSSHAREDIR/keytrans" openpgp2sshfpr "$keyid"
 }
 
 # take a secret key ID and check that only zero or one ID is provided,