1*ebfedea0SLionel Sambuc#!/bin/sh 2*ebfedea0SLionel Sambuc 3*ebfedea0SLionel Sambuctestsrc=Makefile 4*ebfedea0SLionel Sambuctest=./p 5*ebfedea0SLionel Sambuccmd="../util/shlib_wrap.sh ../apps/openssl" 6*ebfedea0SLionel Sambuc 7*ebfedea0SLionel Sambuccat $testsrc >$test; 8*ebfedea0SLionel Sambuc 9*ebfedea0SLionel Sambucecho cat 10*ebfedea0SLionel Sambuc$cmd enc < $test > $test.cipher 11*ebfedea0SLionel Sambuc$cmd enc < $test.cipher >$test.clear 12*ebfedea0SLionel Sambuccmp $test $test.clear 13*ebfedea0SLionel Sambucif [ $? != 0 ] 14*ebfedea0SLionel Sambucthen 15*ebfedea0SLionel Sambuc exit 1 16*ebfedea0SLionel Sambucelse 17*ebfedea0SLionel Sambuc /bin/rm $test.cipher $test.clear 18*ebfedea0SLionel Sambucfi 19*ebfedea0SLionel Sambucecho base64 20*ebfedea0SLionel Sambuc$cmd enc -a -e < $test > $test.cipher 21*ebfedea0SLionel Sambuc$cmd enc -a -d < $test.cipher >$test.clear 22*ebfedea0SLionel Sambuccmp $test $test.clear 23*ebfedea0SLionel Sambucif [ $? != 0 ] 24*ebfedea0SLionel Sambucthen 25*ebfedea0SLionel Sambuc exit 1 26*ebfedea0SLionel Sambucelse 27*ebfedea0SLionel Sambuc /bin/rm $test.cipher $test.clear 28*ebfedea0SLionel Sambucfi 29*ebfedea0SLionel Sambuc 30*ebfedea0SLionel Sambucfor i in `$cmd list-cipher-commands` 31*ebfedea0SLionel Sambucdo 32*ebfedea0SLionel Sambuc echo $i 33*ebfedea0SLionel Sambuc $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher 34*ebfedea0SLionel Sambuc $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear 35*ebfedea0SLionel Sambuc cmp $test $test.$i.clear 36*ebfedea0SLionel Sambuc if [ $? != 0 ] 37*ebfedea0SLionel Sambuc then 38*ebfedea0SLionel Sambuc exit 1 39*ebfedea0SLionel Sambuc else 40*ebfedea0SLionel Sambuc /bin/rm $test.$i.cipher $test.$i.clear 41*ebfedea0SLionel Sambuc fi 42*ebfedea0SLionel Sambuc 43*ebfedea0SLionel Sambuc echo $i base64 44*ebfedea0SLionel Sambuc $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher 45*ebfedea0SLionel Sambuc $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear 46*ebfedea0SLionel Sambuc cmp $test $test.$i.clear 47*ebfedea0SLionel Sambuc if [ $? != 0 ] 48*ebfedea0SLionel Sambuc then 49*ebfedea0SLionel Sambuc exit 1 50*ebfedea0SLionel Sambuc else 51*ebfedea0SLionel Sambuc /bin/rm $test.$i.cipher $test.$i.clear 52*ebfedea0SLionel Sambuc fi 53*ebfedea0SLionel Sambucdone 54*ebfedea0SLionel Sambucrm -f $test 55