3 # Test Alexander-specific SecureTransport features 
   5 set SSL_HOST
=trading.etrade.com
 
   6 echo === $SSL_HOST : expired leaf cert 
=== 
   7 echo === ...no options 
: expect errSSLCertExpired
 
  10    echo $SSL_HOST did not fail
! 
  13 echo === ... allowExpiredRoot expect errSSLCertExpired
 
  14 sslViewer 
$SSL_HOST 3 E
 
  16    echo $SSL_HOST did not fail
! 
  19 echo === ... allowExpiredCerts expect success
 
  20 sslViewer 
$SSL_HOST 3 e
 
  22    echo allowExpiredCerts did not fix 
$SSL_HOST! 
  29 set SSL_HOST
=iproject.apple.com
 
  30 echo === $SSL_HOST : good leaf
, expired root 
=== 
  31 echo === ...no options 
: expect errSSLCertExpired
 
  34    echo $SSL_HOST did not fail
! 
  37 echo === ... allowExpiredRoot expect success
 
  38 sslViewer 
$SSL_HOST 3 E
 
  40    echo allowExpiredRoot did not fix 
$SSL_HOST! 
  43 echo === ... allowExpiredCerts expect success
 
  44 sslViewer 
$SSL_HOST 3 e
 
  46    echo allowExpiredCerts did not fix 
$SSL_HOST! 
  52 set SSL_HOST
=www.xdss.com
 
  53 echo === $SSL_HOST : unknown root 
=== 
  54 echo === ...no options 
: expect errSSLNoRootCert
 
  57    echo $SSL_HOST did not fail
! 
  60 echo === ... allowAnyRoot
, the old gross workaround
, expect success
 
  61 sslViewer 
$SSL_HOST 3 r
 
  63    echo allowAnyRoot did not fix 
$SSL_HOST! 
  66 set ANCHOR_FILE
=verisignCA.cer
 
  67 echo === ... only anchor 
= $ANCHOR_FILE, expect success
 
  68 sslViewer 
$SSL_HOST 3 A 
$ANCHOR_FILE 
  70    echo A 
$ANCHOR_FILE did not fix 
$SSL_HOST! 
  73 echo === ... add anchor 
$ANCHOR_FILE, expect success
 
  74 sslViewer 
$SSL_HOST 3 a 
$ANCHOR_FILE 
  76    echo a 
$ANCHOR_FILE did not fix 
$SSL_HOST! 
  80 echo ===== SUCCESS 
=====