summaryrefslogtreecommitdiffstats
path: root/test/test.txt
blob: c6d8d50ba9d4e5b99bde580f0437fbd9a72a7286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

test=./test.txt

cat $0 >$test;

for i in rc4 des-cfb des-ofb des-ecb des-cbc des-ede des-ede3 \
	des-cbc-ede des-cbc-ede3 idea-ecb idea-cfb idea-ofb idea-cbc 
do
	echo $i
	../apps/ssleay $i -e -k test < $test > $test.$i.cipher
	../apps/ssleay $i -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
	../apps/ssleay $i -a -e -k test < $test > $test.$i.cipher
	../apps/ssleay $i -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