| # Run test of KeyChange TC against data given by Bert Wijnen in email. |
| # NOTE The snmp_debug flag bit DEBUG_RANDOMZEROS in file snmplib/debug.h |
| # MUST be set before compiling and linking libsnmp.a to testing/ktest |
| #------------------------------------ -o- |
| DATAFILE_PREFIX=data.keychange- |
| DATAFILE_SUFFIXES="md5 sha1 sha1-des" |
| #------------------------------------ -o- |
| for dfs in $DATAFILE_SUFFIXES; do |
| OUTPUT "== Test of KeyChange TC correctness for \"$dfs\"." |
| set x `awk '{ print $1 }' ${DATAFILE_PREFIX}$dfs` |
| [ $# -lt 3 ] && FAILED 1 \ |
| "Wrong number of lines ($#) in datafile \"$DATAFILE_PREFIX}$dfs\"." |
| CAPTURE "ktest -k -O $oldkey -N $newkey" |
| CHECKEXACT $keychangestring |
| FAILED $? "Proper KeyChange string was not generated." |
| SUCCESS "KeyChange TC correctness test for \"$dfs\"." |
| #------------------------------------ -o- |