The fix for CVE-2012-2110 did not take into account that the
[openssl.git] / test / trsa.com
index c7d1ec441dedd4b74868055e6873d94b11d768ce..d3a8a605b788438d0f3475d5afe7cc6e5dca7296 100644 (file)
@@ -1,16 +1,34 @@
 $! TRSA.COM  --  Tests rsa keys
 $
 $      __arch := VAX
-$      if f$getsyi("cpu") .ge. 128 then __arch := AXP
+$      if f$getsyi("cpu") .ge. 128 then -
+          __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$      if __arch .eqs. "" then __arch := UNK
 $      exe_dir := sys$disk:[-.'__arch'.exe.apps]
 $
+$      set noon
+$      define/user sys$output nla0:
+$      mcr 'exe_dir'openssl no-rsa
+$      save_severity=$SEVERITY
+$      set on
+$      if save_severity
+$      then
+$          write sys$output "skipping RSA conversion test"
+$          exit
+$      endif
+$
 $      cmd := mcr 'exe_dir'openssl rsa
 $
 $      t := testrsa.pem
 $      if p1 .nes. "" then t = p1
 $
 $      write sys$output "testing RSA conversions"
-$      copy 't' fff.p
+$      if f$search("fff.*") .nes "" then delete fff.*;*
+$      if f$search("ff.*") .nes "" then delete ff.*;*
+$      if f$search("f.*") .nes "" then delete f.*;*
+$      convert/fdl=sys$input: 't' fff.p
+RECORD
+       FORMAT STREAM_LF
 $
 $      write sys$output "p -> d"
 $      'cmd' -in fff.p -inform p -outform d -out f.d