fix some things bugs from the separation transition, and try to fix the test scripts
[monkeysphere.git] / src / monkeysphere-host
index 4c978c94809b3075056d5b9045b61b3b207a0629..0b37ba98e7ca3dcc6581bdf72e7a72ae87ed76fa 100755 (executable)
@@ -107,18 +107,12 @@ check_host_keyring() {
 show_key() {
     local fingerprintPGP
     local fingerprintSSH
-    local ret=0
 
     # FIXME: you shouldn't have to be root to see the host key fingerprint
-    if is_root ; then
-       check_host_keyring
-       fingerprintPGP=$(fingerprint_server_key)
-       gpg_authentication "--fingerprint --list-key --list-options show-unusable-uids $fingerprintPGP" 2>/dev/null
-       echo "OpenPGP fingerprint: $fingerprintPGP"
-    else
-       log info "You must be root to see host OpenPGP fingerprint."
-       ret='1'
-    fi
+    check_host_keyring
+    fingerprintPGP=$(fingerprint_server_key)
+    gpg_host "--fingerprint --list-key --list-options show-unusable-uids $fingerprintPGP" 2>/dev/null
+    echo "OpenPGP fingerprint: $fingerprintPGP"
 
     if [ -f "${SYSDATADIR}/ssh_host_rsa_key.pub" ] ; then
        fingerprintSSH=$(ssh-keygen -l -f "${SYSDATADIR}/ssh_host_rsa_key.pub" | \
@@ -126,10 +120,7 @@ show_key() {
        echo "ssh fingerprint: $fingerprintSSH"
     else
        log info "SSH host key not found."
-       ret='1'
     fi
-
-return $ret
 }
 
 ########################################################################