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