summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 02:40:29 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 02:40:29 -0400
commite3864891de9261409297d4d6a959bce89ef5f42a (patch)
tree72e7d04cc3027e6a1b702aa72e6627f9f9621e30 /tests
parenta40dd55ec85e64d3cc86bf7dc3eb14f4475cccaf (diff)
testing: change order of operations to make sure that authentication subkey is available during authorized_keys update.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/basic b/tests/basic
index 3ef5c6c..9f4d02e 100755
--- a/tests/basic
+++ b/tests/basic
@@ -127,12 +127,6 @@ HostKey ${MONKEYSPHERE_SYSDATADIR}/ssh_host_rsa_key
AuthorizedKeysFile ${MONKEYSPHERE_SYSDATADIR}/authorized_keys/%u
EOF
-# teach the "server" about the testuser's key
-GNUPGHOME="$TEMPDIR"/testuser/.gnupg gpg --export testuser | \
- monkeysphere-server gpg-authentication-cmd --import
-
-monkeysphere-server update-users testuser
-
# launch test sshd with the new host key.
echo "### starting sshd..."
socat EXEC:"/usr/sbin/sshd -f ${SSHD_CONFIG} -i -D -e" "UNIX-LISTEN:${SOCKET}" 2> "$TEMPDIR"/sshd.log &
@@ -152,6 +146,12 @@ monkeysphere gen-subkey --expire 0
echo "### export server key to testuser..."
gpgadmin --armor --export "$HOSTKEYID" | gpg --import
+# teach the "server" about the testuser's key
+echo "### export testuser key to server..."
+gpg --export testuser | monkeysphere-server gpg-authentication-cmd --import
+echo "### update server authorized_keys file for testuser..."
+monkeysphere-server update-users testuser
+
# connect to test sshd, using monkeysphere-ssh-proxycommand to verify
# the identity before connection. This should work in both directions!
echo "### testuser connecting to sshd socket..."