testing: added a passphrase (abc123) for the testuser private key; supplied a phony...
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 06:24:01 +0000 (02:24 -0400)
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Sun, 26 Oct 2008 06:24:01 +0000 (02:24 -0400)
tests/basic
tests/home/testuser/.gnupg/random_seed
tests/home/testuser/.gnupg/secring.gpg
tests/home/testuser/.ssh/askpass [new file with mode: 0755]

index 751dec46443f24712c71d1475b6dd67384fd30e5..10b3c3112173e19b60aed8e9dfd74bd2354a2647 100755 (executable)
@@ -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
index 40ab6a6ca0470c7abbf1ec3412cbd4ff71b5ee2d..230b3152998f8198b59c81fb2a1a01b8edba7adf 100644 (file)
Binary files a/tests/home/testuser/.gnupg/random_seed and b/tests/home/testuser/.gnupg/random_seed differ
index a5519a6c68e0310fe7f5979c26c50b0641b2d705..26cf230a4a309407a6e70ac7f615a9f8a98f917f 100644 (file)
Binary files a/tests/home/testuser/.gnupg/secring.gpg and b/tests/home/testuser/.gnupg/secring.gpg differ
diff --git a/tests/home/testuser/.ssh/askpass b/tests/home/testuser/.ssh/askpass
new file mode 100755 (executable)
index 0000000..5b7b059
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+
+# phony/automatic askpass, to provide the passphrase for the
+# testuser's GPG key.
+
+echo abc123