blob: 6dbe59ef644fd24151e206dbb0309a8862ad84e8 [file] [log] [blame]
Ulf Möller7d7d2cb1999-05-13 11:37:32 +00001$! 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$
Richard Levittec13ee212000-03-13 22:27:52 +00007$ set noon
8$ define/user sys$output nla0:
9$ mcr 'exe_dir'openssl no-rsa
10$ save_severity=$SEVERITY
11$ set on
12$ if save_severity
Richard Levittebc23b702000-03-13 19:05:18 +000013$ then
Richard Levittec13ee212000-03-13 22:27:52 +000014$ write sys$output "skipping RSA conversion test"
15$ exit
Richard Levittebc23b702000-03-13 19:05:18 +000016$ endif
Richard Levittebc23b702000-03-13 19:05:18 +000017$
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000018$ cmd := mcr 'exe_dir'openssl rsa
19$
20$ t := testrsa.pem
21$ if p1 .nes. "" then t = p1
22$
23$ write sys$output "testing RSA conversions"
Richard Levitte921c9bd2000-02-26 03:59:46 +000024$ if f$search("fff.*") .nes "" then delete fff.*;*
25$ if f$search("ff.*") .nes "" then delete ff.*;*
26$ if f$search("f.*") .nes "" then delete f.*;*
Richard Levitteb4406972002-08-14 11:08:43 +000027$ convert/fdl=sys$input: 't' fff.p
28RECORD
29 FORMAT STREAM_LF
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000030$
31$ write sys$output "p -> d"
32$ 'cmd' -in fff.p -inform p -outform d -out f.d
33$ if $severity .ne. 1 then exit 3
34$! write sys$output "p -> t"
35$! 'cmd' -in fff.p -inform p -outform t -out f.t
36$! if $severity .ne. 1 then exit 3
37$ write sys$output "p -> p"
38$ 'cmd' -in fff.p -inform p -outform p -out f.p
39$ if $severity .ne. 1 then exit 3
40$
41$ write sys$output "d -> d"
42$ 'cmd' -in f.d -inform d -outform d -out ff.d1
43$ if $severity .ne. 1 then exit 3
44$! write sys$output "t -> d"
45$! 'cmd' -in f.t -inform t -outform d -out ff.d2
46$! if $severity .ne. 1 then exit 3
47$ write sys$output "p -> d"
48$ 'cmd' -in f.p -inform p -outform d -out ff.d3
49$ if $severity .ne. 1 then exit 3
50$
51$! write sys$output "d -> t"
52$! 'cmd' -in f.d -inform d -outform t -out ff.t1
53$! if $severity .ne. 1 then exit 3
54$! write sys$output "t -> t"
55$! 'cmd' -in f.t -inform t -outform t -out ff.t2
56$! if $severity .ne. 1 then exit 3
57$! write sys$output "p -> t"
58$! 'cmd' -in f.p -inform p -outform t -out ff.t3
59$! if $severity .ne. 1 then exit 3
60$
61$ write sys$output "d -> p"
62$ 'cmd' -in f.d -inform d -outform p -out ff.p1
63$ if $severity .ne. 1 then exit 3
64$! write sys$output "t -> p"
65$! 'cmd' -in f.t -inform t -outform p -out ff.p2
66$! if $severity .ne. 1 then exit 3
67$ write sys$output "p -> p"
68$ 'cmd' -in f.p -inform p -outform p -out ff.p3
69$ if $severity .ne. 1 then exit 3
70$
Richard Levitte13427e41999-11-12 01:46:50 +000071$ backup/compare fff.p f.p
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000072$ if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000073$ backup/compare fff.p ff.p1
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000074$ if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000075$! backup/compare fff.p ff.p2
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000076$! if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000077$ backup/compare fff.p ff.p3
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000078$ if $severity .ne. 1 then exit 3
79$
Richard Levitte13427e41999-11-12 01:46:50 +000080$! backup/compare f.t ff.t1
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000081$! if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000082$! backup/compare f.t ff.t2
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000083$! if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000084$! backup/compare f.t ff.t3
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000085$! if $severity .ne. 1 then exit 3
86$
Richard Levitte13427e41999-11-12 01:46:50 +000087$ backup/compare f.p ff.p1
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000088$ if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000089$! backup/compare f.p ff.p2
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000090$! if $severity .ne. 1 then exit 3
Richard Levitte13427e41999-11-12 01:46:50 +000091$ backup/compare f.p ff.p3
Ulf Möller7d7d2cb1999-05-13 11:37:32 +000092$ if $severity .ne. 1 then exit 3
93$
94$ delete f.*;*,ff.*;*,fff.*;*