]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/sslScripts/AlexTest
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / clxutils / sslScripts / AlexTest
1 #! /bin/csh -f
2 #
3 # Test Alexander-specific SecureTransport features
4 #
5 set SSL_HOST=trading.etrade.com
6 echo === $SSL_HOST : expired leaf cert ===
7 echo === ...no options : expect errSSLCertExpired
8 sslViewer $SSL_HOST 3
9 if($status == 0) then
10 echo $SSL_HOST did not fail!
11 exit(1)
12 endif
13 echo === ... allowExpiredRoot expect errSSLCertExpired
14 sslViewer $SSL_HOST 3 E
15 if($status == 0) then
16 echo $SSL_HOST did not fail!
17 exit(1)
18 endif
19 echo === ... allowExpiredCerts expect success
20 sslViewer $SSL_HOST 3 e
21 if($status != 0) then
22 echo allowExpiredCerts did not fix $SSL_HOST!
23 exit(1)
24 endif
25
26 #
27 #
28 #
29 set SSL_HOST=iproject.apple.com
30 echo === $SSL_HOST : good leaf, expired root ===
31 echo === ...no options : expect errSSLCertExpired
32 sslViewer $SSL_HOST 3
33 if($status == 0) then
34 echo $SSL_HOST did not fail!
35 exit(1)
36 endif
37 echo === ... allowExpiredRoot expect success
38 sslViewer $SSL_HOST 3 E
39 if($status != 0) then
40 echo allowExpiredRoot did not fix $SSL_HOST!
41 exit(1)
42 endif
43 echo === ... allowExpiredCerts expect success
44 sslViewer $SSL_HOST 3 e
45 if($status != 0) then
46 echo allowExpiredCerts did not fix $SSL_HOST!
47 exit(1)
48 endif
49 #
50 #
51 #
52 set SSL_HOST=www.xdss.com
53 echo === $SSL_HOST : unknown root ===
54 echo === ...no options : expect errSSLNoRootCert
55 sslViewer $SSL_HOST 3
56 if($status == 0) then
57 echo $SSL_HOST did not fail!
58 exit(1)
59 endif
60 echo === ... allowAnyRoot, the old gross workaround, expect success
61 sslViewer $SSL_HOST 3 r
62 if($status != 0) then
63 echo allowAnyRoot did not fix $SSL_HOST!
64 exit(1)
65 endif
66 set ANCHOR_FILE=verisignCA.cer
67 echo === ... only anchor = $ANCHOR_FILE, expect success
68 sslViewer $SSL_HOST 3 A $ANCHOR_FILE
69 if($status != 0) then
70 echo A $ANCHOR_FILE did not fix $SSL_HOST!
71 exit(1)
72 endif
73 echo === ... add anchor $ANCHOR_FILE, expect success
74 sslViewer $SSL_HOST 3 a $ANCHOR_FILE
75 if($status != 0) then
76 echo a $ANCHOR_FILE did not fix $SSL_HOST!
77 exit(1)
78 endif
79
80 echo ===== SUCCESS =====