3 # run client side of SSL client certificate test. Run this script
4 # after starting authServe script.
6 # In SSL_AUTO mode, we wait SSL_WAIT seconds between runs of sslServer from
7 # the protServe script to allow the sslServer to get initialized.
8 # Otherwise we wait manually via the sh script doprompt.
10 set SSL_KEYCHAIN
=localcert
11 set SSL_NEWROOT
=localcert.cer
13 # set allow hostname spoof for use with numeric IP address (e.g., 10.0.61.6)
14 # if the server cert doesn't have a subjectAltName.
19 set SSL_HOST
=localhost
34 echo 'Usage: protClient [a(auto)]'
39 # options for every run of sslViewer
41 set STD_OPTS
="$SSL_HOST a $SSL_NEWROOT $NAME_SPOOF"
43 echo ===== Server tries authentication
, client refuses
45 runProtClient
$QUIET $STD_OPTS P
=1200 t T
=r
|| exit(1)
46 doprompt
$SSL_AUTO $QUIET
48 echo ===== Server tries authentication
, client sends cert
50 runProtClient
$QUIET $STD_OPTS P
=1201 k
=$SSL_KEYCHAIN t T
=s
|| exit(1)
51 doprompt
$SSL_AUTO $QUIET
53 echo ===== Server requires authentication
, client refuses
, expect error
55 runProtClient
$QUIET e
"Expect error due to auth requirement" \
56 $STD_OPTS P
=1202 t T
=r
|| exit(1)
57 doprompt
$SSL_AUTO $QUIET
59 echo ===== Server requires authentication
, client refuses
, SSL3
, expect error
61 runProtClient
$QUIET e
"Expect error due to auth requirement" \
62 $STD_OPTS P
=1203 3 T
=r
|| exit(1)
63 doprompt
$SSL_AUTO $QUIET
65 echo ===== Server requires authentication
, client sends cert
67 runProtClient
$QUIET $STD_OPTS P
=1204 k
=$SSL_KEYCHAIN t T
=s
|| exit(1)
68 doprompt
$SSL_AUTO $QUIET
71 echo ===== authClient success