when checking OAEP, signal just a single kind of 'decoding error'
[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 $       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
13 $       then
14 $           write sys$output "skipping RSA conversion test"
15 $           exit
16 $       endif
17 $
18 $       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"
24 $       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.*;*
27 $       copy 't' fff.p
28 $
29 $       write sys$output "p -> d"
30 $       'cmd' -in fff.p -inform p -outform d -out f.d
31 $       if $severity .ne. 1 then exit 3
32 $!      write sys$output "p -> t"
33 $!      'cmd' -in fff.p -inform p -outform t -out f.t
34 $!      if $severity .ne. 1 then exit 3
35 $       write sys$output "p -> p"
36 $       'cmd' -in fff.p -inform p -outform p -out f.p
37 $       if $severity .ne. 1 then exit 3
38 $
39 $       write sys$output "d -> d"
40 $       'cmd' -in f.d -inform d -outform d -out ff.d1
41 $       if $severity .ne. 1 then exit 3
42 $!      write sys$output "t -> d"
43 $!      'cmd' -in f.t -inform t -outform d -out ff.d2
44 $!      if $severity .ne. 1 then exit 3
45 $       write sys$output "p -> d"
46 $       'cmd' -in f.p -inform p -outform d -out ff.d3
47 $       if $severity .ne. 1 then exit 3
48 $
49 $!      write sys$output "d -> t"
50 $!      'cmd' -in f.d -inform d -outform t -out ff.t1
51 $!      if $severity .ne. 1 then exit 3
52 $!      write sys$output "t -> t"
53 $!      'cmd' -in f.t -inform t -outform t -out ff.t2
54 $!      if $severity .ne. 1 then exit 3
55 $!      write sys$output "p -> t"
56 $!      'cmd' -in f.p -inform p -outform t -out ff.t3
57 $!      if $severity .ne. 1 then exit 3
58 $
59 $       write sys$output "d -> p"
60 $       'cmd' -in f.d -inform d -outform p -out ff.p1
61 $       if $severity .ne. 1 then exit 3
62 $!      write sys$output "t -> p"
63 $!      'cmd' -in f.t -inform t -outform p -out ff.p2
64 $!      if $severity .ne. 1 then exit 3
65 $       write sys$output "p -> p"
66 $       'cmd' -in f.p -inform p -outform p -out ff.p3
67 $       if $severity .ne. 1 then exit 3
68 $
69 $       backup/compare fff.p f.p
70 $       if $severity .ne. 1 then exit 3
71 $       backup/compare fff.p ff.p1
72 $       if $severity .ne. 1 then exit 3
73 $!      backup/compare fff.p ff.p2
74 $!      if $severity .ne. 1 then exit 3
75 $       backup/compare fff.p ff.p3
76 $       if $severity .ne. 1 then exit 3
77 $
78 $!      backup/compare f.t ff.t1
79 $!      if $severity .ne. 1 then exit 3
80 $!      backup/compare f.t ff.t2
81 $!      if $severity .ne. 1 then exit 3
82 $!      backup/compare f.t ff.t3
83 $!      if $severity .ne. 1 then exit 3
84 $
85 $       backup/compare f.p ff.p1
86 $       if $severity .ne. 1 then exit 3
87 $!      backup/compare f.p ff.p2
88 $!      if $severity .ne. 1 then exit 3
89 $       backup/compare f.p ff.p3
90 $       if $severity .ne. 1 then exit 3
91 $
92 $       delete f.*;*,ff.*;*,fff.*;*