diff options
author | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:52:47 +0000 |
---|---|---|
committer | Ralf S. Engelschall <rse@openssl.org> | 1998-12-21 10:52:47 +0000 |
commit | d02b48c63a58ea4367a0e905979f140b7d090f86 (patch) | |
tree | 504f62ed3d84799f785b9cd9fab255a21b0e1b0e /test/testenc | |
download | openssl-d02b48c63a58ea4367a0e905979f140b7d090f86.tar.gz |
Import of old SSLeay release: SSLeay 0.8.1b
Diffstat (limited to 'test/testenc')
-rw-r--r-- | test/testenc | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/test/testenc b/test/testenc new file mode 100644 index 0000000000..7bcf3d145c --- /dev/null +++ b/test/testenc @@ -0,0 +1,61 @@ +#!/bin/sh + +testsrc=Makefile.ssl +test=./p +cmd=../apps/ssleay + +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 + +for i in rc4 \ + des-cfb des-ede-cfb des-ede3-cfb \ + des-ofb des-ede-ofb des-ede3-ofb \ + des-ecb des-ede des-ede3 desx \ + des-cbc des-ede-cbc des-ede3-cbc \ + idea-ecb idea-cfb idea-ofb idea-cbc \ + rc2-ecb rc2-cfb rc2-ofb rc2-cbc \ + bf-ecb bf-cfb bf-ofb bf-cbc +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 |