From c4a5813c6847201ae55ab8d3d49b6b4bb9691561 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Sun, 26 Oct 2008 02:24:01 -0400 Subject: [PATCH] testing: added a passphrase (abc123) for the testuser private key; supplied a phony SSH_ASKPASS to provide the password when needed. --- tests/basic | 16 ++++++++-------- tests/home/testuser/.gnupg/random_seed | Bin 600 -> 600 bytes tests/home/testuser/.gnupg/secring.gpg | Bin 737 -> 775 bytes tests/home/testuser/.ssh/askpass | 6 ++++++ 4 files changed, 14 insertions(+), 8 deletions(-) create mode 100755 tests/home/testuser/.ssh/askpass 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 40ab6a6ca0470c7abbf1ec3412cbd4ff71b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yH m6AI#FGC|6!sw_ZtpO69`1Ov_fpPS1Y{}S~^QP^i3ufhT-yd?<$ diff --git a/tests/home/testuser/.gnupg/secring.gpg b/tests/home/testuser/.gnupg/secring.gpg index a5519a6c68e0310fe7f5979c26c50b0641b2d705..26cf230a4a309407a6e70ac7f615a9f8a98f917f 100644 GIT binary patch delta 399 zcmV;A0dW4|1&0O$l>z>d1C4+F0|NrVEYr+%iuOccRJ$j*sGGm@X*FH`v&jIy%i)b- zfpypqe-7!K}^8|}S(dCgnmi*;y0M7m(5(jT(`{ZA<--4ZB zV1y=qItp}JK+mO2K;-egEwXdkxdv(;5PwiHx=c9f_Q*#-%+J?C4u^mHpw#_~B%m>I zF5m28W1K9rk54Crg1X;;e8@MWqVBCsL$u4%-* z!5Lv>XY+gIJ_C)HHxLScnqdjR8;b`P?d_!L{m?{1bxq~b!kgcd& t$6K+OntHKgtu^=TnKo6*6_l(&SjKP*u}ri`O>b^%WqEUOXl0Y<0s49m$jkr$ delta 350 zcmV-k0iphf2H^z*l>yk11C4(G1O7iLwNpIhw!Q7IPFV)oDb+@cecBB09FgE61;ZUn z<^~v0PO-j_wiG?sZPEBeCH|yMi8V%p*$Z-YN-jpEi_yuaQ|ITbH&HW$VZzgFNeUiz zKIz%xC-DZ2~ZHS w2rcw#Q0y~o)@N*Ww+k5CqzWVj(0&vkQDfpJZ{5{+PKAJ&ING3ZvjGAI0i748i~s-t 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 -- 2.26.2