summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/man8/monkeysphere-server.84
-rwxr-xr-xsrc/monkeysphere-server19
2 files changed, 13 insertions, 10 deletions
diff --git a/man/man8/monkeysphere-server.8 b/man/man8/monkeysphere-server.8
index 416cc87..5985f24 100644
--- a/man/man8/monkeysphere-server.8
+++ b/man/man8/monkeysphere-server.8
@@ -71,10 +71,6 @@ in place of `revoke-hostname'.
Output gpg information about host's OpenPGP key. `s' may be used in
place of `show-key'.
.TP
-.B fingerprint
-Output just the fingerprint for the host's OpenPGP key. `f' may be
-used in place of `fingerprint'.
-.TP
.B publish-key
Publish the host's OpenPGP key to the keyserver. `p' may be used in
place of `publish-key'.
diff --git a/src/monkeysphere-server b/src/monkeysphere-server
index 91e2121..99e5f80 100755
--- a/src/monkeysphere-server
+++ b/src/monkeysphere-server
@@ -48,7 +48,6 @@ subcommands:
add-hostname (n+) NAME[:PORT] add hostname user ID to server key
revoke-hostname (n-) NAME[:PORT] revoke hostname user ID
show-key (s) output all server host key information
- fingerprint (f) output just the key fingerprint
publish-key (p) publish server host key to keyserver
diagnostics (d) report on server monkeysphere status
@@ -113,8 +112,20 @@ fingerprint_server_key() {
# output key information
show_server_key() {
local fingerprint
+ local tmpkey
+
fingerprint=$(fingerprint_server_key)
- gpg_host --fingerprint --list-secret-key "$fingerprint"
+ gpg_authentication "--fingerprint --list-key $fingerprint"
+
+ # dumping to a file named ' ' so that the ssh-keygen output
+ # doesn't claim any potentially bogus hostname(s):
+ tmpkey=$(mktemp -d)
+ gpg_authentication "--export $fingerprint" | openpgp2ssh "$fingerprint" 2>/dev/null > "$tmpkey/ "
+ echo -n "ssh fingerprint: "
+ (cd "$tmpkey" && ssh-keygen -l -f ' ')
+ rm -rf "$tmpkey"
+ echo -n "OpenPGP fingerprint: "
+ echo "$fingerprint"
}
# update authorized_keys for users
@@ -899,10 +910,6 @@ case $COMMAND in
show_server_key
;;
- 'show-fingerprint'|'fingerprint'|'f')
- fingerprint_server_key
- ;;
-
'publish-key'|'publish'|'p')
publish_server_key
;;