54 lines
1.1 KiB
Bash
54 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
testsrc=Makefile
|
|
test=./p
|
|
cmd="../util/shlib_wrap.sh ../apps/openssl"
|
|
|
|
cat $testsrc >$test;
|
|
|
|
echo cat
|
|
$cmd enc -non-fips-allow < $test > $test.cipher
|
|
$cmd enc -non-fips-allow < $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 -non-fips-allow -a -e < $test > $test.cipher
|
|
$cmd enc -non-fips-allow -a -d < $test.cipher >$test.clear
|
|
cmp $test $test.clear
|
|
if [ $? != 0 ]
|
|
then
|
|
exit 1
|
|
else
|
|
/bin/rm $test.cipher $test.clear
|
|
fi
|
|
|
|
for i in `$cmd list-cipher-commands`
|
|
do
|
|
echo $i
|
|
$cmd $i -non-fips-allow -bufsize 113 -e -k test < $test > $test.$i.cipher
|
|
$cmd $i -non-fips-allow -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 -non-fips-allow -bufsize 113 -a -e -k test < $test > $test.$i.cipher
|
|
$cmd $i -non-fips-allow -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
|