1998-12-21 10:52:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-06-13 14:09:48 +00:00
|
|
|
testsrc=testenc
|
1998-12-21 10:52:47 +00:00
|
|
|
test=./p
|
2005-02-01 23:48:37 +00:00
|
|
|
cmd="../util/shlib_wrap.sh ../apps/openssl"
|
1998-12-21 10:52:47 +00:00
|
|
|
|
|
|
|
cat $testsrc >$test;
|
|
|
|
|
|
|
|
echo cat
|
|
|
|
$cmd enc < $test > $test.cipher
|
|
|
|
$cmd enc < $test.cipher >$test.clear
|
|
|
|
cmp $test $test.clear
|
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
/bin/rm $test.cipher $test.clear
|
|
|
|
fi
|
|
|
|
echo base64
|
|
|
|
$cmd enc -a -e < $test > $test.cipher
|
|
|
|
$cmd enc -a -d < $test.cipher >$test.clear
|
|
|
|
cmp $test $test.clear
|
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
/bin/rm $test.cipher $test.clear
|
|
|
|
fi
|
|
|
|
|
1999-04-11 02:49:35 +00:00
|
|
|
for i in `$cmd list-cipher-commands`
|
1998-12-21 10:52:47 +00:00
|
|
|
do
|
|
|
|
echo $i
|
|
|
|
$cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher
|
|
|
|
$cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear
|
|
|
|
cmp $test $test.$i.clear
|
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
/bin/rm $test.$i.cipher $test.$i.clear
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo $i base64
|
|
|
|
$cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher
|
|
|
|
$cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear
|
|
|
|
cmp $test $test.$i.clear
|
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
/bin/rm $test.$i.cipher $test.$i.clear
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
rm -f $test
|