summaryrefslogtreecommitdiff
path: root/tests/basic
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-20 12:27:01 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-20 12:27:01 -0500
commit10888c602170f6157ff43a81bad920babdd6a59e (patch)
treed54791d162953d2761b71e1ff3ef448a6c8de315 /tests/basic
parent9b47ae89c3840eb2af9a57a885e19ccbe36957d5 (diff)
monkeysphere-host revoke-key should now be capable of publishing the
revocation certificate to the keyservers directly, should the admin want that. It can also run without prompting, if MONKEYSPHERE_PROMPT=false. In the no-prompts case, it never publishes to the keyserver, it indicates that the key was compromised, and it writes a boilerplate description to make it easy to identify this kind of certificate.
Diffstat (limited to 'tests/basic')
-rwxr-xr-xtests/basic19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/basic b/tests/basic
index 3d50977..fd4f673 100755
--- a/tests/basic
+++ b/tests/basic
@@ -110,7 +110,13 @@ export MONKEYSPHERE_SYSDATADIR="$TEMPDIR"
export MONKEYSPHERE_SYSCONFIGDIR="$TEMPDIR"
export MONKEYSPHERE_SYSSHAREDIR="$TESTDIR"/../src/share
export MONKEYSPHERE_MONKEYSPHERE_USER=$(whoami)
+
export MONKEYSPHERE_CHECK_KEYSERVER=false
+# example.org does not respond to the HKP port, so this should cause
+# any keyserver connection attempts that do happen (they shouldn't!)
+# to hang, so we'll notice them:
+export MONKEYSPHERE_KEYSERVER=example.org
+
export MONKEYSPHERE_LOG_LEVEL=DEBUG
export MONKEYSPHERE_CORE_KEYLENGTH=1024
export MONKEYSPHERE_PROMPT=false
@@ -202,7 +208,7 @@ monkeysphere-host set-expire 1
# (this would normally be done via keyservers)
echo "##################################################"
echo "### certifying server host key..."
-GNUPGHOME="$MONKEYSPHERE_SYSCONFIGDIR"/host gpg --armor --export "$HOSTKEYID" | gpgadmin --import
+< "$MONKEYSPHERE_SYSCONFIGDIR"/ssh_host_rsa_key.pub.gpg gpgadmin --import
echo y | gpgadmin --command-fd 0 --sign-key "$HOSTKEYID"
# FIXME: add revoker?
@@ -301,13 +307,22 @@ echo "##################################################"
echo "### ssh connection test for server authentication denial..."
ssh_test 255
chmod o-w "$TESTHOME"/.monkeysphere/authorized_user_ids
+monkeysphere-authentication update-users $(whoami)
# FIXME: addtest: remove admin as id-certifier and check ssh failure
# FIXME: addtest: add hostname on host key
# FIXME: addtest: revoke hostname on host key and check ssh failure
-# FIXME: addtest: revoke the host key and check ssh failure
+# addtest: revoke the host key and check ssh failure
+# test to make sure things are OK after the previous tests:
+ssh_test
+echo "##################################################"
+echo "### ssh connection test for server with revoked key..."
+# generate the revocation certificate and feed it directly to the test
+# user's keyring (we're not publishing to the keyservers)
+monkeysphere-host revoke-key | gpg --import
+ssh_test 255
######################################################################