From e3864891de9261409297d4d6a959bce89ef5f42a Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 26 Oct 2008 02:40:29 -0400 Subject: [PATCH] testing: change order of operations to make sure that authentication subkey is available during authorized_keys update. --- tests/basic | 12 ++++++------ 1 file 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..." -- 2.26.2