]>
Commit | Line | Data |
---|---|---|
7d7d2cbc UM |
1 | $! TESTENC.COM -- Test encoding and decoding |
2 | $ | |
3 | $ __arch := VAX | |
48f48d96 | 4 | $ if f$getsyi("cpu") .ge. 128 then - |
3acd3158 | 5 | __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE") |
48f48d96 | 6 | $ if __arch .eqs. "" then __arch := UNK |
7d7d2cbc | 7 | $ |
9af1bfb3 | 8 | $ testsrc := makefile. |
7d7d2cbc UM |
9 | $ test := p.txt |
10 | $ cmd := mcr 'exe_dir'openssl | |
11 | $ | |
921c9bd5 | 12 | $ if f$search(test) .nes. "" then delete 'test';* |
b4406973 RL |
13 | $ convert/fdl=sys$input: 'testsrc' 'test' |
14 | RECORD | |
15 | FORMAT STREAM_LF | |
7d7d2cbc | 16 | $ |
921c9bd5 RL |
17 | $ if f$search(test+"-cipher") .nes. "" then delete 'test'-cipher;* |
18 | $ if f$search(test+"-clear") .nes. "" then delete 'test'-clear;* | |
19 | $ | |
7d7d2cbc UM |
20 | $ write sys$output "cat" |
21 | $ 'cmd' enc -in 'test' -out 'test'-cipher | |
22 | $ 'cmd' enc -in 'test'-cipher -out 'test'-clear | |
13427e45 | 23 | $ backup/compare 'test' 'test'-clear |
7d7d2cbc UM |
24 | $ if $severity .ne. 1 then exit 3 |
25 | $ delete 'test'-cipher;*,'test'-clear;* | |
26 | $ | |
27 | $ write sys$output "base64" | |
28 | $ 'cmd' enc -a -e -in 'test' -out 'test'-cipher | |
29 | $ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear | |
13427e45 | 30 | $ backup/compare 'test' 'test'-clear |
7d7d2cbc UM |
31 | $ if $severity .ne. 1 then exit 3 |
32 | $ delete 'test'-cipher;*,'test'-clear;* | |
33 | $ | |
cde245bd | 34 | $ define/user sys$output 'test'-cipher-commands |
7d7d2cbc | 35 | $ 'cmd' list-cipher-commands |
cde245bd | 36 | $ open/read f 'test'-cipher-commands |
7d7d2cbc UM |
37 | $ loop_cipher_commands: |
38 | $ read/end=loop_cipher_commands_end f i | |
39 | $ write sys$output i | |
921c9bd5 RL |
40 | $ |
41 | $ if f$search(test+"-"+i+"-cipher") .nes. "" then - | |
42 | delete 'test'-'i'-cipher;* | |
43 | $ if f$search(test+"-"+i+"-clear") .nes. "" then - | |
44 | delete 'test'-'i'-clear;* | |
45 | $ | |
7d7d2cbc UM |
46 | $ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher |
47 | $ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | |
13427e45 | 48 | $ backup/compare 'test' 'test'-'i'-clear |
7d7d2cbc UM |
49 | $ if $severity .ne. 1 then exit 3 |
50 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | |
51 | $ | |
52 | $ write sys$output i," base64" | |
53 | $ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher | |
54 | $ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | |
13427e45 | 55 | $ backup/compare 'test' 'test'-'i'-clear |
7d7d2cbc UM |
56 | $ if $severity .ne. 1 then exit 3 |
57 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | |
58 | $ | |
59 | $ goto loop_cipher_commands | |
60 | $ loop_cipher_commands_end: | |
61 | $ close f | |
2202d75e | 62 | $ delete 'test'-cipher-commands;* |
7d7d2cbc | 63 | $ delete 'test';* |