su_monkeysphere_user "gpg $@"
}
-# load the core fingerprint into the fingerprint variable, using the
-# gpg host secret key
+# output to stdout the core fingerprint from the gpg core secret
+# keyring
core_fingerprint() {
log debug "determining core key fingerprint..."
gpg_core --quiet --list-secret-key \
| grep '^fpr:' | cut -d: -f10 )
# list the host key info
- gpg --list-key --fingerprint --list-options show-unusable-uids 2>/dev/null
+ gpg --list-keys --fingerprint \
+ --list-options show-unusable-uids 2>/dev/null
# list the pgp fingerprint
echo "OpenPGP fingerprint: $HOST_FINGERPRINT"
if [ "$problemsfound" -gt 0 ]; then
echo "When the above $problemsfound issue"$(if [ "$problemsfound" -eq 1 ] ; then echo " is" ; else echo "s are" ; fi)" resolved, please re-run:"
- echo " monkeysphere-authentication expert diagnostics"
+ echo " monkeysphere-authentication diagnostics"
else
echo "Everything seems to be in order!"
fi
if [ "$problemsfound" -gt 0 ]; then
echo "When the above $problemsfound issue"$(if [ "$problemsfound" -eq 1 ] ; then echo " is" ; else echo "s are" ; fi)" resolved, please re-run:"
- echo " monkeysphere-host expert diagnostics"
+ echo " monkeysphere-host diagnostics"
else
echo "Everything seems to be in order!"
fi
ssh-keygen -b 1024 -t rsa -N '' -f "$TEMPDIR"/ssh_host_rsa_key
monkeysphere-host import-key testhost < "$TEMPDIR"/ssh_host_rsa_key
+echo "##################################################"
+echo "### getting host key fingerprint..."
+HOSTKEYID=$( monkeysphere-host show-key | grep '^OpenPGP fingerprint: ' | cut -f3 -d\ )
+echo "$HOSTKEYID"
+
# change host key expiration
echo "##################################################"
echo "### setting host key expiration..."
monkeysphere-host set-expire 1
# FIXME: how do we check that the expiration has really been set?
-echo "##################################################"
-echo "### getting host key fingerprint..."
-HOSTKEYID=$( monkeysphere-host show-key | grep '^OpenPGP fingerprint: ' | cut -f3 -d\ )
-echo "$HOSTKEYID"
-
# certify host key with the "Admin's Key".
# (this would normally be done via keyservers)
echo "##################################################"
# teach the "server" about the testuser's key
echo "##################################################"
echo "### export testuser key to server..."
-gpg --export testuser | monkeysphere-authentication expert gpg-cmd --import
+gpg --export testuser | monkeysphere-authentication gpg-cmd --import
# update authorized_keys for user
echo "##################################################"