]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/testenc.com
o_str.h isn't a public header file, so make sure it will still be
[thirdparty/openssl.git] / test / testenc.com
CommitLineData
7d7d2cbc
UM
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$
921c9bd5 11$ if f$search(test) .nes. "" then delete 'test';*
b4406973
RL
12$ convert/fdl=sys$input: 'testsrc' 'test'
13RECORD
14 FORMAT STREAM_LF
7d7d2cbc 15$
921c9bd5
RL
16$ if f$search(test+"-cipher") .nes. "" then delete 'test'-cipher;*
17$ if f$search(test+"-clear") .nes. "" then delete 'test'-clear;*
18$
7d7d2cbc
UM
19$ write sys$output "cat"
20$ 'cmd' enc -in 'test' -out 'test'-cipher
21$ 'cmd' enc -in 'test'-cipher -out 'test'-clear
13427e45 22$ backup/compare 'test' 'test'-clear
7d7d2cbc
UM
23$ if $severity .ne. 1 then exit 3
24$ delete 'test'-cipher;*,'test'-clear;*
25$
26$ write sys$output "base64"
27$ 'cmd' enc -a -e -in 'test' -out 'test'-cipher
28$ 'cmd' enc -a -d -in 'test'-cipher -out 'test'-clear
13427e45 29$ backup/compare 'test' 'test'-clear
7d7d2cbc
UM
30$ if $severity .ne. 1 then exit 3
31$ delete 'test'-cipher;*,'test'-clear;*
32$
cde245bd 33$ define/user sys$output 'test'-cipher-commands
7d7d2cbc 34$ 'cmd' list-cipher-commands
cde245bd 35$ open/read f 'test'-cipher-commands
7d7d2cbc
UM
36$ loop_cipher_commands:
37$ read/end=loop_cipher_commands_end f i
38$ write sys$output i
921c9bd5
RL
39$
40$ if f$search(test+"-"+i+"-cipher") .nes. "" then -
41 delete 'test'-'i'-cipher;*
42$ if f$search(test+"-"+i+"-clear") .nes. "" then -
43 delete 'test'-'i'-clear;*
44$
7d7d2cbc
UM
45$ 'cmd' 'i' -bufsize 113 -e -k test -in 'test' -out 'test'-'i'-cipher
46$ 'cmd' 'i' -bufsize 157 -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
13427e45 47$ backup/compare 'test' 'test'-'i'-clear
7d7d2cbc
UM
48$ if $severity .ne. 1 then exit 3
49$ delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
50$
51$ write sys$output i," base64"
52$ 'cmd' 'i' -bufsize 113 -a -e -k test -in 'test' -out 'test'-'i'-cipher
53$ 'cmd' 'i' -bufsize 157 -a -d -k test -in 'test'-'i'-cipher -out 'test'-'i'-clear
13427e45 54$ backup/compare 'test' 'test'-'i'-clear
7d7d2cbc
UM
55$ if $severity .ne. 1 then exit 3
56$ delete 'test'-'i'-cipher;*,'test'-'i'-clear;*
57$
58$ goto loop_cipher_commands
59$ loop_cipher_commands_end:
60$ close f
2202d75e 61$ delete 'test'-cipher-commands;*
7d7d2cbc 62$ delete 'test';*