diff options
author | ryker <> | 1998-10-05 20:13:14 +0000 |
---|---|---|
committer | ryker <> | 1998-10-05 20:13:14 +0000 |
commit | aeeae06a79815dc190061534d47236cec09f9e32 (patch) | |
tree | 851692b9c2f9c04f077666855641900f19fdb217 /src/lib/libssl/test/testenc | |
parent | a4f79641824cbf9f60ca9d1168d1fcc46717a82a (diff) | |
download | openbsd-aeeae06a79815dc190061534d47236cec09f9e32.tar.gz openbsd-aeeae06a79815dc190061534d47236cec09f9e32.tar.bz2 openbsd-aeeae06a79815dc190061534d47236cec09f9e32.zip |
Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD build
functionality for shared libs.
Note that routines such as sslv2_init and friends that use RSA will
not work due to lack of RSA in this library.
Needs documentation and help from ports for easy upgrade to full
functionality where legally possible.
Diffstat (limited to 'src/lib/libssl/test/testenc')
-rw-r--r-- | src/lib/libssl/test/testenc | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/lib/libssl/test/testenc b/src/lib/libssl/test/testenc new file mode 100644 index 0000000000..42db56c2be --- /dev/null +++ b/src/lib/libssl/test/testenc | |||
@@ -0,0 +1,62 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | testsrc=Makefile.ssl | ||
4 | test=./p | ||
5 | cmd=../apps/ssleay | ||
6 | |||
7 | cat $testsrc >$test; | ||
8 | |||
9 | echo cat | ||
10 | $cmd enc < $test > $test.cipher | ||
11 | $cmd enc < $test.cipher >$test.clear | ||
12 | cmp $test $test.clear | ||
13 | if [ $? != 0 ] | ||
14 | then | ||
15 | exit 1 | ||
16 | else | ||
17 | /bin/rm $test.cipher $test.clear | ||
18 | fi | ||
19 | echo base64 | ||
20 | $cmd enc -a -e < $test > $test.cipher | ||
21 | $cmd enc -a -d < $test.cipher >$test.clear | ||
22 | cmp $test $test.clear | ||
23 | if [ $? != 0 ] | ||
24 | then | ||
25 | exit 1 | ||
26 | else | ||
27 | /bin/rm $test.cipher $test.clear | ||
28 | fi | ||
29 | |||
30 | for i in rc4 \ | ||
31 | des-cfb des-ede-cfb des-ede3-cfb \ | ||
32 | des-ofb des-ede-ofb des-ede3-ofb \ | ||
33 | des-ecb des-ede des-ede3 desx \ | ||
34 | des-cbc des-ede-cbc des-ede3-cbc \ | ||
35 | idea-ecb idea-cfb idea-ofb idea-cbc \ | ||
36 | rc2-ecb rc2-cfb rc2-ofb rc2-cbc \ | ||
37 | bf-ecb bf-cfb bf-ofb bf-cbc rc4 \ | ||
38 | cast5-ecb cast5-cfb cast5-ofb cast5-cbc | ||
39 | do | ||
40 | echo $i | ||
41 | $cmd $i -bufsize 113 -e -k test < $test > $test.$i.cipher | ||
42 | $cmd $i -bufsize 157 -d -k test < $test.$i.cipher >$test.$i.clear | ||
43 | cmp $test $test.$i.clear | ||
44 | if [ $? != 0 ] | ||
45 | then | ||
46 | exit 1 | ||
47 | else | ||
48 | /bin/rm $test.$i.cipher $test.$i.clear | ||
49 | fi | ||
50 | |||
51 | echo $i base64 | ||
52 | $cmd $i -bufsize 113 -a -e -k test < $test > $test.$i.cipher | ||
53 | $cmd $i -bufsize 157 -a -d -k test < $test.$i.cipher >$test.$i.clear | ||
54 | cmp $test $test.$i.clear | ||
55 | if [ $? != 0 ] | ||
56 | then | ||
57 | exit 1 | ||
58 | else | ||
59 | /bin/rm $test.$i.cipher $test.$i.clear | ||
60 | fi | ||
61 | done | ||
62 | rm -f $test | ||