#! /bin/csh -f
set SSL_KEYCHAIN=localcert
set SSL_NEWROOT=localcert.cer
set NAME_SPOOF=
set SSL_HOST=localhost
set SSL_AUTO=0
set QUIET=
while ( $ switch ( "$argv[1]" )
case a:
set SSL_AUTO = 1
shift
breaksw
case q:
set QUIET = q
shift
breaksw
default:
echo 'Usage: protClient [a(auto)]'
exit(1)
endsw
end
set STD_OPTS="$SSL_HOST a $SSL_NEWROOT $NAME_SPOOF"
echo ===== Server tries authentication, client refuses
runProtClient $QUIET $STD_OPTS P=1200 t T=r || exit(1)
doprompt $SSL_AUTO $QUIET
echo ===== Server tries authentication, client sends cert
runProtClient $QUIET $STD_OPTS P=1201 k=$SSL_KEYCHAIN t T=s || exit(1)
doprompt $SSL_AUTO $QUIET
echo ===== Server requires authentication, client refuses, expect error
runProtClient $QUIET e "Expect error due to auth requirement" \
$STD_OPTS P=1202 t T=r || exit(1)
doprompt $SSL_AUTO $QUIET
echo ===== Server requires authentication, client refuses, SSL3, expect error
runProtClient $QUIET e "Expect error due to auth requirement" \
$STD_OPTS P=1203 3 T=r || exit(1)
doprompt $SSL_AUTO $QUIET
echo ===== Server requires authentication, client sends cert
runProtClient $QUIET $STD_OPTS P=1204 k=$SSL_KEYCHAIN t T=s || exit(1)
doprompt $SSL_AUTO $QUIET
echo =====
echo ===== authClient success
echo =====