Correction.
[openssl.git] / test / trsa.com
1 $! TRSA.COM  --  Tests rsa keys
2 $
3 $       __arch := VAX
4 $       if f$getsyi("cpu") .ge. 128 then __arch := AXP
5 $       exe_dir := sys$disk:[-.'__arch'.exe.apps]
6 $
7 $       found_it := NO
8 $       define/user sys$output trsa-standard-commands.
9 $       mcr 'exe_dir'openssl list-standard-commands
10 $       open/read f trsa-standard-commands.
11 $ loop_standard_commands:
12 $       read/end=loop_standard_commands_end f i
13 $       if f$edit(i,"lowercase") .eqs. "rsa"
14 $       then
15 $           found_it := YES
16 $           goto loop_standard_commands_end
17 $       endif
18 $       goto loop_standard_commands
19 $ loop_standard_commands_end:
20 $       close f
21 $       delete trsa-standard-commands.;*
22 $
23 $       cmd := mcr 'exe_dir'openssl rsa
24 $
25 $       t := testrsa.pem
26 $       if p1 .nes. "" then t = p1
27 $
28 $       write sys$output "testing RSA conversions"
29 $       if f$search("fff.*") .nes "" then delete fff.*;*
30 $       if f$search("ff.*") .nes "" then delete ff.*;*
31 $       if f$search("f.*") .nes "" then delete f.*;*
32 $       copy 't' fff.p
33 $
34 $       write sys$output "p -> d"
35 $       'cmd' -in fff.p -inform p -outform d -out f.d
36 $       if $severity .ne. 1 then exit 3
37 $!      write sys$output "p -> t"
38 $!      'cmd' -in fff.p -inform p -outform t -out f.t
39 $!      if $severity .ne. 1 then exit 3
40 $       write sys$output "p -> p"
41 $       'cmd' -in fff.p -inform p -outform p -out f.p
42 $       if $severity .ne. 1 then exit 3
43 $
44 $       write sys$output "d -> d"
45 $       'cmd' -in f.d -inform d -outform d -out ff.d1
46 $       if $severity .ne. 1 then exit 3
47 $!      write sys$output "t -> d"
48 $!      'cmd' -in f.t -inform t -outform d -out ff.d2
49 $!      if $severity .ne. 1 then exit 3
50 $       write sys$output "p -> d"
51 $       'cmd' -in f.p -inform p -outform d -out ff.d3
52 $       if $severity .ne. 1 then exit 3
53 $
54 $!      write sys$output "d -> t"
55 $!      'cmd' -in f.d -inform d -outform t -out ff.t1
56 $!      if $severity .ne. 1 then exit 3
57 $!      write sys$output "t -> t"
58 $!      'cmd' -in f.t -inform t -outform t -out ff.t2
59 $!      if $severity .ne. 1 then exit 3
60 $!      write sys$output "p -> t"
61 $!      'cmd' -in f.p -inform p -outform t -out ff.t3
62 $!      if $severity .ne. 1 then exit 3
63 $
64 $       write sys$output "d -> p"
65 $       'cmd' -in f.d -inform d -outform p -out ff.p1
66 $       if $severity .ne. 1 then exit 3
67 $!      write sys$output "t -> p"
68 $!      'cmd' -in f.t -inform t -outform p -out ff.p2
69 $!      if $severity .ne. 1 then exit 3
70 $       write sys$output "p -> p"
71 $       'cmd' -in f.p -inform p -outform p -out ff.p3
72 $       if $severity .ne. 1 then exit 3
73 $
74 $       backup/compare fff.p f.p
75 $       if $severity .ne. 1 then exit 3
76 $       backup/compare fff.p ff.p1
77 $       if $severity .ne. 1 then exit 3
78 $!      backup/compare fff.p ff.p2
79 $!      if $severity .ne. 1 then exit 3
80 $       backup/compare fff.p ff.p3
81 $       if $severity .ne. 1 then exit 3
82 $
83 $!      backup/compare f.t ff.t1
84 $!      if $severity .ne. 1 then exit 3
85 $!      backup/compare f.t ff.t2
86 $!      if $severity .ne. 1 then exit 3
87 $!      backup/compare f.t ff.t3
88 $!      if $severity .ne. 1 then exit 3
89 $
90 $       backup/compare f.p ff.p1
91 $       if $severity .ne. 1 then exit 3
92 $!      backup/compare f.p ff.p2
93 $!      if $severity .ne. 1 then exit 3
94 $       backup/compare f.p ff.p3
95 $       if $severity .ne. 1 then exit 3
96 $
97 $       delete f.*;*,ff.*;*,fff.*;*