From 7b30291a2d162934c98e361256fd29b54c76854b Mon Sep 17 00:00:00 2001 From: Jameson Graef Rollins Date: Sat, 25 Oct 2008 15:50:59 -0400 Subject: more tweaks to test script. --- tests/basic | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'tests/basic') diff --git a/tests/basic b/tests/basic index e14b765..fc7dfba 100755 --- a/tests/basic +++ b/tests/basic @@ -18,7 +18,6 @@ gpgadmin() { GNUPGHOME="$TESTDIR"/home/admin/.gnupg gpg "$@" } - # cleanup: cleanup() { # FIXME: stop the sshd process @@ -33,7 +32,7 @@ cleanup() { } ## setup trap -#trap cleanup EXIT +trap cleanup EXIT ## set up some variables to ensure that we're operating strictly in ## the tests, not system-wide: @@ -61,6 +60,7 @@ export MONKEYSPHERE_CHECK_KEYSERVER=false SSHD_CONFIG="$TEMPDIR"/sshd_config export SOCKET="$TEMPDIR"/ssh-socket + ### SERVER TESTS # create the temp gnupghome directories @@ -68,7 +68,7 @@ mkdir -p -m 750 "$MONKEYSPHERE_SYSDATADIR"/gnupg-host mkdir -p -m 700 "$MONKEYSPHERE_SYSDATADIR"/gnupg-authentication # add the quick-random option to the gpg host config -echo "quick-random" >> "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host.conf +echo "quick-random" >> "$MONKEYSPHERE_SYSCONFIGDIR"/gnupg-host/gpg.conf # create a new host key echo "### generating server key..." @@ -114,6 +114,10 @@ echo "### generating key for testuser..." MONKEYSPHERE_GNUPGHOME="$TEMPDIR"/testuser/.gnupg \ monkeysphere gen-subkey --expire 0 +# add server key to testuser keychain +monkeysphere-server gpg-authentication-cmd "--armor --export $HOSTKEYID" | \ + GNUPGHOME="$TEMPDIR"/testuser/.gnupg gpg --import + # connect to test sshd, using monkeysphere to verify the identity # before connection. echo "### connecting to sshd socket..." @@ -122,5 +126,8 @@ ssh -oProxyCommand="$PROXY_COMMAND" testhost # create a new client side key, certify it with the "CA", use it to # log in. - ## FIXME: implement! + + +### FINISH +read -p "press enter to cleanup tmp:" -- cgit v1.2.3