]>
git.saurik.com Git - apple/security.git/blob - SecurityTests/cspxutils/cspdvt
   3 # run CSP/X regression tests. 
   5 set BUILD_DIR
=$LOCAL_BUILD_DIR 
  11 # CSPDL null for bare CSP, 'D' for CSPDL combo 
  16 # note the 's' option is here for backwards compatibility; the short 
  17 # option is now the default. 
  48 # Select 'quick' or 'normal' test params 
  50 if($QUICK_TEST == 1) then 
  52     set BADSIG_ARGS
="l=4 i=10" 
  56         set HASHTEST_ARGS
="l=100" 
  60         set MINIWRAP_ARGS
="l=4" 
  61         set WRAPTEST_ARGS
="l=2 k" 
  62         set PBETEST_ARGS
="l=4" 
  64         set KEYHASH_ASYM_ARGS
= 
  69         set ASYMCOMPAT_ARGS
="l=2 k=512" 
  72         set RAWSIG_ARGS
="l=2 i=2 s" 
  73         set DHTEST_ARGS
="i=dhParams_512.der" 
  77     set BADSIG_ARGS
="l=20 k=r" 
  78         set DSAPARTIAL_ARGS
="l=100" 
  80         set BADMAC_ARGS
="l=100" 
  81         set HASHTEST_ARGS
="l=1000" 
  82         set HASHCLONE_ARGS
="l=200" 
  83         set SYMTEST_ARGS
="l=500" 
  89         set KEYHASH_ASYM_ARGS
= 
  91         set SYMDELTA_ARGS
="l=50" 
  93         set HASHCOMPAT_ARGS
="l=1000" 
  94         set ASYMCOMPAT_ARGS
="l=10" 
  95         set MACCOMPAT_ARGS
="l=1000" 
  98         set DHTEST_ARGS
="k=1024" 
  99         set ECDHTEST_ARGS
="l=100" 
 102 # First, test the basic Digest, MAC, and symmetrict algorithms in libSystem.  
 105 if($RAWCSP == YES
) then 
 106         .
/ccdvt 
$QUIET || exit(1) 
 109 # Basic digest and MAC tests 
 111 $BUILD_DIR/hashTest 
$HASHTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 112 if($RAWCSP == YES
) then 
 113         $BUILD_DIR/hashClone 
$HASHCLONE_ARGS $QUIET $VERB $CSPDL || exit(1) 
 115 #TODO $BUILD_DIR/hashCompat $HASHCOMPAT_ARGS $QUIET $VERB $CSPDL || exit(1) 
 116 $BUILD_DIR/sha2VectorsCdsa 
$QUIET $CSPDL || exit(1) 
 117 #TODO $BUILD_DIR/macCompat $MACCOMPAT_ARGS $QUIET $VERB $CSPDL || exit(1) 
 118 $BUILD_DIR/macTest 
$MACTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 119 $BUILD_DIR/badmac 
$BADMAC_ARGS $QUIET $VERB $CSPDL || exit(1) 
 121 # Basic symmetric encryption tests 
 123 # symTest - once with padding, once without 
 124 $BUILD_DIR/symTest 
$SYMTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 125 $BUILD_DIR/symTest 
$SYMTEST_ARGS $QUIET $VERB $CSPDL o 
|| exit(1) 
 127 # symCompat - once with the full set of algorithms 
 129 #TODO $BUILD_DIR/symCompat $SYMCOMPAT_ARGS $QUIET $VERB $CSPDL || exit(1) 
 131 # And one specifically to test AES padding mode (which uses ssleay instead of  
 132 # the NIST reference implementation) 
 134 $BUILD_DIR/symCompat 
$SYMCOMPAT_ARGS a
=a y 
$QUIET $VERB $CSPDL || exit(1) 
 135 $BUILD_DIR/contextReuse 
$QUIET $VERB $CSPDL || exit(1) 
 140 $BUILD_DIR/sigtest 
$SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 141 # Several for for ECDSA, with some keys in blob form for raw CSP only 
 142 $BUILD_DIR/sigtest a
=E 
$SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 143 if($RAWCSP == YES
) then 
 144         $BUILD_DIR/sigtest a
=7 b r 
$SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 145         $BUILD_DIR/sigtest a
=8 k
=256 b 
$SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 146         $BUILD_DIR/sigtest a
=9 k
=521 b r 
$SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 148         $BUILD_DIR/sigtest a
=7 $SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 149         $BUILD_DIR/sigtest a
=8 k
=256 $SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 150         $BUILD_DIR/sigtest a
=9 k
=521 $SIGTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 152 # this one tests all algorithms with random key sizes 
 153 $BUILD_DIR/badsig 
$BADSIG_ARGS $QUIET $VERB $CSPDL || exit(1) 
 157 $BUILD_DIR/keyDate 
$QUIET $VERB $CSPDL || exit(1) 
 158 $BUILD_DIR/keyHash 
$KEYHASH_ARGS $QUIET $VERB $CSPDL || exit(1) 
 159 cd $CSPXUTILS/keyHashAsym
 
 160 $BUILD_DIR/keyHashAsym 
$KEYHASH_ASYM_ARGS $QUIET $VERB $CSPDL || exit(1) 
 161 if($RAWCSP == NO
) then 
 162         $BUILD_DIR/keyStore 
$KEYSTORE_ARGS $QUIET $VERB || exit(1) 
 164 if($RAWCSP == YES
) then 
 165         $BUILD_DIR/dhTest 
$DHTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 168 # One run for ECDH, one for ECDH_X963_KDF 
 170 $BUILD_DIR/ecdhTest 
$ECDHTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 171 $BUILD_DIR/ecdhTest X 
$ECDHTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 172 # this requires param files in cwd 
 173 cd $CSPXUTILS/dsaPartial
 
 174 $BUILD_DIR/dsaPartial 
$DSAPARTIAL_ARGS $QUIET $VERB $CSPDL || exit(1) 
 175 $BUILD_DIR/symDelta 
$SYMDELTA_ARGS $QUIET $VERB $CSPDL || exit(1) 
 176 $BUILD_DIR/asymTest 
$ASYMTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 177 $BUILD_DIR/miniWrap 
$MINIWRAP_ARGS $QUIET $VERB $CSPDL || exit(1) 
 178 $BUILD_DIR/wrapTest 
$WRAPTEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 179 $BUILD_DIR/pbeTest 
$PBETEST_ARGS $QUIET $VERB $CSPDL || exit(1) 
 180 #TODO $BUILD_DIR/asymCompat $ASYMCOMPAT_ARGS $QUIET $VERB $CSPDL || exit(1) 
 181 #TODO $BUILD_DIR/badattr $BADATTR_ARGS $QUIET $VERB $CSPDL || exit(1) 
 182 $BUILD_DIR/rawSig 
$RAWSIG_ARGS $QUIET $VERB $CSPDL || exit(1) 
 183 $BUILD_DIR/ssl2Padding 
$QUIET $VERB $CSPDL || exit(1) 
 185 echo ===== cspdvt success 
=====