]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/sslScripts/authServe
Security-57031.10.10.tar.gz
[apple/security.git] / SecurityTests / clxutils / sslScripts / authServe
1 #! /bin/csh -f
2 #
3 # run server side of SSL client certificate state test.
4 #
5 set SSL_KEYCHAIN=localcert
6 #
7 # use this to explicitly open the keychain
8 #
9 set KEYCHAIN_PWD="z=localcert"
10 #
11 echo =====
12 echo ===== Run authClient script after server starts up
13 echo ===== Server tries authentication, client refuses
14 echo =====
15 set cmd="sslServer P=1200 k=$SSL_KEYCHAIN $KEYCHAIN_PWD u=t T=r"
16 echo $cmd
17 $cmd || exit(1)
18
19 echo =====
20 echo ===== prompt the authClient Script
21 echo ===== Server tries authentication, client sends cert
22 echo =====
23 set cmd="sslServer P=1201 k=$SSL_KEYCHAIN $KEYCHAIN_PWD u=t T=s"
24 echo $cmd
25 $cmd || exit(1)
26
27 echo =====
28 echo ===== prompt the authClient Script
29 echo ===== Server requires authentication, client refuses, expect error
30 echo =====
31 set cmd="sslServer P=1202 k=$SSL_KEYCHAIN $KEYCHAIN_PWD u=a T=r"
32 echo $cmd
33 $cmd
34 if($status != 1) then
35 echo @@@@@@ expected one error from sslServer; got $status; aborting.
36 exit(1)
37 endif
38
39 echo =====
40 echo ===== prompt the authClient Script
41 echo ===== Server requires authentication, client refuses, SSL3, expect error
42 echo =====
43 set cmd="sslServer P=1203 k=$SSL_KEYCHAIN $KEYCHAIN_PWD u=a T=r"
44 echo $cmd
45 $cmd
46 if($status != 1) then
47 echo @@@@@@ expected one error from sslServer; got $status; aborting.
48 exit(1)
49 endif
50
51 echo =====
52 echo ===== prompt the authClient Script
53 echo ===== Server requires authentication, client sends cert
54 echo =====
55 set cmd="sslServer P=1204 k=$SSL_KEYCHAIN $KEYCHAIN_PWD u=a T=s"
56 echo $cmd
57 $cmd || exit(1)
58
59 echo =====
60 echo ===== authServe success
61 echo =====
62