summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 02:24:01 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-26 02:24:01 -0400
commitc4a5813c6847201ae55ab8d3d49b6b4bb9691561 (patch)
tree38a21a0657315d66735b622b5137d9786228a7e2 /tests
parent74b446aef77a46302430ee8aac7124f40d9bf1b4 (diff)
testing: added a passphrase (abc123) for the testuser private key; supplied a phony SSH_ASKPASS to provide the password when needed.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/basic16
-rw-r--r--tests/home/testuser/.gnupg/random_seedbin600 -> 600 bytes
-rw-r--r--tests/home/testuser/.gnupg/secring.gpgbin737 -> 775 bytes
-rwxr-xr-xtests/home/testuser/.ssh/askpass6
4 files changed, 14 insertions, 8 deletions
diff --git a/tests/basic b/tests/basic
index 751dec4..10b3c31 100755
--- a/tests/basic
+++ b/tests/basic
@@ -135,21 +135,21 @@ export SSHD_PID=$!
# generate an auth subkey for the test user
echo "### generating key for testuser..."
-MONKEYSPHERE_GNUPGHOME="$TEMPDIR"/testuser/.gnupg \
-SSH_ASKPASS=echo \
- monkeysphere gen-subkey --expire 0
+export GNUPGHOME="$TEMPDIR"/testuser/.gnupg
+export SSH_ASKPASS="$TEMPDIR"/testuser/.ssh/askpass
+export MONKEYSPHERE_HOME="$TEMPDIR"/testuser/.monkeysphere
+
+monkeysphere gen-subkey --expire 0
# add server key to testuser keychain
echo "### export server key to testuser..."
-gpgadmin --armor --export "$HOSTKEYID" | \
- GNUPGHOME="$TEMPDIR"/testuser/.gnupg gpg --import
+gpgadmin --armor --export "$HOSTKEYID" | gpg --import
# 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..."
-GNUPGHOME="$TEMPDIR"/testuser/.gnupg \
-MONKEYSPHERE_HOME="$TEMPDIR"/testuser/.monkeysphere \
- ssh-agent bash -c \
+
+ssh-agent bash -c \
'monkeysphere subkey-to-ssh-agent && ssh -F "$TEMPDIR"/testuser/.ssh/config testhost'
trap - EXIT
diff --git a/tests/home/testuser/.gnupg/random_seed b/tests/home/testuser/.gnupg/random_seed
index 40ab6a6..230b315 100644
--- a/tests/home/testuser/.gnupg/random_seed
+++ b/tests/home/testuser/.gnupg/random_seed
Binary files differ
diff --git a/tests/home/testuser/.gnupg/secring.gpg b/tests/home/testuser/.gnupg/secring.gpg
index a5519a6..26cf230 100644
--- a/tests/home/testuser/.gnupg/secring.gpg
+++ b/tests/home/testuser/.gnupg/secring.gpg
Binary files differ
diff --git a/tests/home/testuser/.ssh/askpass b/tests/home/testuser/.ssh/askpass
new file mode 100755
index 0000000..5b7b059
--- /dev/null
+++ b/tests/home/testuser/.ssh/askpass
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+# phony/automatic askpass, to provide the passphrase for the
+# testuser's GPG key.
+
+echo abc123