| # Run key localization tests and compare with data given in the USM |
| # FIX CHECKEXACT() will produce 2 lines when SCAPI is built with |
| # SNMP_TESTING_CODE, but only 1 line without the #define. The script |
| # assumes SNMP_TESTING_CODE is defined. |
| #------------------------------------ -o- |
| DATAFILE_PREFIX=data.kul- |
| DATAFILE_SUFFIXES="md5 sha1" |
| #------------------------------------ -o- |
| for dfs in $DATAFILE_SUFFIXES; do |
| OUTPUT "== Test of key localization correctness with transform \"$dfs\"." |
| set x `awk '{ print $1 }' ${DATAFILE_PREFIX}$dfs` |
| [ $# -lt 4 ] && FAILED 1 \ |
| "Wrong number of lines ($#) in datafile \"$DATAFILE_PREFIX}$dfs\"." |
| CAPTURE "ktest -l -P $P -E $engineID " |
| FAILED $? "Master key was not generated." |
| FAILED $? "Localized key was not generated." |
| SUCCESS "Key localization correctness test with transform \"$dfs\"." |
| #------------------------------------ -o- |