make update
[openssl.git] / test / testenc.com
1 $! TESTENC.COM  --  Test encoding and decoding
2 $
3 $       __arch := VAX
4 $       if f$getsyi("cpu") .ge. 128 then __arch := AXP
5 $       exe_dir := sys$disk:[-.'__arch'.exe.apps]
6 $
7 $       testsrc := makefile.ssl
8 $       test := p.txt
9 $       cmd := mcr 'exe_dir'openssl
10 $
11 $       if f$search(test) .nes. "" then delete 'test';*
12 $       copy 'testsrc' 'test'
13 $
14 $       if f$search(test+"-cipher") .nes. "" then delete 'test'-cipher;*
15 $       if f$search(test+"-clear") .nes. "" then delete 'test'-clear;*
16 $
17 $       write sys$output "cat"
18 $       'cmd' enc -in 'test' -out 'test'-cipher
19 $       'cmd' enc -in 'test'-cipher -out 'test'-clear
20 $       backup/compare 'test' 'test'-clear
21 $       if $severity .ne. 1 then exit 3
22 $       delete 'test'-cipher;*,'test'-clear;*
23 $
24 $       write sys$output "base64"
25 $       'cmd' enc -a -e -in 'test' -out 'test'-cipher
26 $       'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear
27 $       backup/compare 'test' 'test'-clear
28 $       if $severity .ne. 1 then exit 3
29 $       delete 'test'-cipher;*,'test'-clear;*
30 $
31 $       define/user sys$output 'test'-cipher-commands
32 $       'cmd' list-cipher-commands
33 $       open/read f 'test'-cipher-commands
34 $ loop_cipher_commands:
35 $       read/end=loop_cipher_commands_end f i
36 $       write sys$output i
37 $
38 $       if f$search(test+"-"+i+"-cipher") .nes. "" then -
39                 delete 'test'-'i'-cipher;*
40 $       if f$search(test+"-"+i+"-clear") .nes. "" then -
41                 delete 'test'-'i'-clear;*
42 $
43 $       'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher
44 $       'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
45 $       backup/compare 'test' 'test'-'i'-clear
46 $       if $severity .ne. 1 then exit 3
47 $       delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
48 $
49 $       write sys$output i," base64"
50 $       'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher
51 $       'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
52 $       backup/compare 'test' 'test'-'i'-clear
53 $       if $severity .ne. 1 then exit 3
54 $       delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
55 $
56 $       goto loop_cipher_commands
57 $ loop_cipher_commands_end:
58 $       close f
59 $       delete 'test'-cipher-commands;*
60 $       delete 'test';*