diff options
Diffstat (limited to 'src/lib/libssl/test/testenc.com')
-rw-r--r-- | src/lib/libssl/test/testenc.com | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/lib/libssl/test/testenc.com b/src/lib/libssl/test/testenc.com new file mode 100644 index 0000000000..0756e8bada --- /dev/null +++ b/src/lib/libssl/test/testenc.com | |||
@@ -0,0 +1,50 @@ | |||
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 | $ copy 'testsrc' 'test' | ||
12 | $ | ||
13 | $ write sys$output "cat" | ||
14 | $ 'cmd' enc -in 'test' -out 'test'-cipher | ||
15 | $ 'cmd' enc -in 'test'-cipher -out 'test'-clear | ||
16 | $ difference/output=nl: 'test' 'test'-clear | ||
17 | $ if $severity .ne. 1 then exit 3 | ||
18 | $ delete 'test'-cipher;*,'test'-clear;* | ||
19 | $ | ||
20 | $ write sys$output "base64" | ||
21 | $ 'cmd' enc -a -e -in 'test' -out 'test'-cipher | ||
22 | $ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear | ||
23 | $ difference/output=nl: 'test' 'test'-clear | ||
24 | $ if $severity .ne. 1 then exit 3 | ||
25 | $ delete 'test'-cipher;*,'test'-clear;* | ||
26 | $ | ||
27 | $ define/user sys$output 'test'-cipher-commands | ||
28 | $ 'cmd' list-cipher-commands | ||
29 | $ open/read f 'test'-cipher-commands | ||
30 | $ loop_cipher_commands: | ||
31 | $ read/end=loop_cipher_commands_end f i | ||
32 | $ write sys$output i | ||
33 | $ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher | ||
34 | $ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | ||
35 | $ difference/output=nl: 'test' 'test'-'i'-clear | ||
36 | $ if $severity .ne. 1 then exit 3 | ||
37 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | ||
38 | $ | ||
39 | $ write sys$output i," base64" | ||
40 | $ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher | ||
41 | $ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear | ||
42 | $ difference/output=nl: 'test' 'test'-'i'-clear | ||
43 | $ if $severity .ne. 1 then exit 3 | ||
44 | $ delete 'test'-'i'-cipher;*,'test'-'i'-clear;* | ||
45 | $ | ||
46 | $ goto loop_cipher_commands | ||
47 | $ loop_cipher_commands_end: | ||
48 | $ close f | ||
49 | $ delete 'test'-cipher-commands;* | ||
50 | $ delete 'test';* | ||