summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMatthew James Goins <mjgoins@openflows.com>2010-03-20 13:32:22 -0400
committerMatthew James Goins <mjgoins@openflows.com>2010-03-20 13:32:22 -0400
commit072e05ac7a9872edc3a3e18e103bbba2706254bf (patch)
tree32ef564a9d3cf5be28c121a94f66d73944dc3d93 /src
parentdd71f5ec4a69c58f894f4f6961ca3786a192bc62 (diff)
parente9f00652e3503ef2292e6d27df80cbb4c8e09504 (diff)
Merge remote branch 'origin/master'
Diffstat (limited to 'src')
-rwxr-xr-xsrc/monkeysphere25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/monkeysphere b/src/monkeysphere
index a763151..fe92960 100755
--- a/src/monkeysphere
+++ b/src/monkeysphere
@@ -48,9 +48,9 @@ subcommands:
ssh-proxycommand HOST [PORT] monkeysphere ssh ProxyCommand
--no-connect do not make TCP connection to host
subkey-to-ssh-agent (s) store authentication subkey in ssh-agent
- sshfpr (f) KEYID output ssh fingerprint of gpg key
- keys-for-userid (u) USERID output valid keys for user id literal
+ keys-for-userid (u) USERID output valid keys for given user ids
+ sshfprs-for-userid USERID output ssh fingerprints for given user ids
gen-subkey (g) [KEYID] generate an authentication subkey
--length (-l) BITS key length in bits (2048)
@@ -68,7 +68,7 @@ gpg_user() {
# output the ssh fingerprint of a gpg key
gpg_ssh_fingerprint() {
keyid="$1"
- local tmpfile=$(mktemp)
+ local tmpfile=$(msmktempfile)
# trap to remove tmp file if break
trap "rm -f $tmpfile" EXIT
@@ -271,7 +271,8 @@ case $COMMAND in
subkey_to_ssh_agent "$@"
;;
- 'sshfpr'|'f')
+ 'sshfpr')
+ echo "Warning: 'sshfpr' is deprecated. Please use 'sshfprs-for-userid' instead." >&2
gpg_ssh_fingerprint "$@"
;;
@@ -280,8 +281,24 @@ case $COMMAND in
keys_for_userid "$@"
;;
+ 'sshfprs-for-userid')
+ CHECK_KEYSERVER=${MONKEYSPHERE_CHECK_KEYSERVER:=${CHECK_KEYSERVER:="true"}}
+ keytmpdir=$(msmktempdir)
+ # use a file named " " to avoid arbitrary non-whitespace text
+ # in the fingerprint output
+ keytmpfile="$keytmpdir/ "
+ cd "$keytmpdir"
+ keys_for_userid "$@" | while read KEYLINE ; do
+ printf '%s\n' "$KEYLINE" > "$keytmpdir/ "
+ ssh-keygen -l -f ' '
+ done
+ rm -f "$keytmpfile"
+ rmdir "$keytmpdir"
+ ;;
+
'keys-from-userid')
echo "Warning: 'keys-from-userid' is deprecated. Please use 'keys-for-userid' instead." >&2
+ CHECK_KEYSERVER=${MONKEYSPHERE_CHECK_KEYSERVER:=${CHECK_KEYSERVER:="true"}}
keys_for_userid "$@"
;;