summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-04-17 16:17:15 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-04-17 16:17:15 -0400
commit990913d29e5857f8d042fdc037088c05e70bdfa5 (patch)
tree30e04e98f53688e346e16d151c92eb49e34c6375 /src
parent38a5e8544d0698c8b4319359780bb1ec2bc846e1 (diff)
fix gpg_ssh_fingerprint() in monkeysphere to use internal implementation of ssh fingerprinting
Diffstat (limited to 'src')
-rwxr-xr-xsrc/monkeysphere13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index fe92960..121db36 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -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,