summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 02:37:18 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 02:37:18 -0400
commita40dd55ec85e64d3cc86bf7dc3eb14f4475cccaf (patch)
treeda9261473daed72ef36c3e81f853cb0bd5748d20 /tests
parentdeff162a515d6cbd4a657f62d8137c4e82ca7d30 (diff)
testing: setting up the authorized_keys for testuser.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/basic b/tests/basic
index 832b33a..3ef5c6c 100755
--- a/tests/basic
+++ b/tests/basic
@@ -90,6 +90,7 @@ EOF
# setup monkeysphere temp gnupghome directories
mkdir -p -m 750 "$MONKEYSPHERE_SYSDATADIR"/gnupg-host
mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/gnupg-authentication
+mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/authorized_keys
cat <<EOF > "$MONKEYSPHERE_SYSDATADIR"/gnupg-authentication/gpg.conf
primary-keyring ${MONKEYSPHERE_SYSDATADIR}/gnupg-authentication/pubring.gpg
keyring ${MONKEYSPHERE_SYSDATADIR}/gnupg-host/pubring.gpg
@@ -126,8 +127,11 @@ HostKey ${MONKEYSPHERE_SYSDATADIR}/ssh_host_rsa_key
AuthorizedKeysFile ${MONKEYSPHERE_SYSDATADIR}/authorized_keys/%u
EOF
-# FIXME: teach the "server" about the testuser's key, and update the
-# fake authorized_keys file for testuser!
+# 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..."