1 $! TESTENC.COM -- Test encoding and decoding
4 $ if f$getsyi("cpu") .ge. 128 then __arch := AXP
5 $ exe_dir := sys$disk:[-.'__arch'.exe.apps]
7 $ testsrc := makefile.ssl
9 $ cmd := mcr 'exe_dir'openssl
11 $ copy 'testsrc' 'test'
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;*
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;*
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
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;*
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;*
46 $ goto loop_cipher_commands
47 $ loop_cipher_commands_end:
49 $ delete 'test'-cipher-commands;*