perlasm: fix symptom-less bugs, missing semicolons and 'my' declarations.
[openssl.git] / test / testss.com
index 34eaa7b7ad5c2c67b1094e558664904e2ec1bd00..32a74d0fc2102e462997ca900c79f8e270364e88 100644 (file)
@@ -1,13 +1,19 @@
 $! TESTSS.COM
 $
-$      __arch := VAX
-$      if f$getsyi("cpu") .ge. 128 then __arch := AXP
-$      exe_dir := sys$disk:[-.'__arch'.exe.apps]
+$      __arch = "VAX"
+$      if f$getsyi("cpu") .ge. 128 then -
+          __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
+$      if __arch .eqs. "" then __arch = "UNK"
+$!
+$      if (p1 .eqs. "64") then __arch = __arch+ "_64"
+$!
+$      exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
 $
-$      digest="-mdc2"
-$      reqcmd := mcr 'exe_dir'openssl req
-$      x509cmd := mcr 'exe_dir'openssl x509 'digest'
-$      verifycmd := mcr 'exe_dir'openssl verify
+$      digest="-md5"
+$      reqcmd = "mcr ''exe_dir'openssl req"
+$      x509cmd = "mcr ''exe_dir'openssl x509 ''digest'"
+$      verifycmd = "mcr ''exe_dir'openssl verify"
+$      dummycnf = "sys$disk:[-.apps]openssl-vms.cnf"
 $
 $      CAkey="""keyCA.ss"""
 $      CAcert="""certCA.ss"""
@@ -22,7 +28,20 @@ $    Ucert="""certU.ss"""
 $
 $      write sys$output ""
 $      write sys$output "make a certificate request using 'req'"
-$      'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' -new ! -out err.ss
+$
+$      set noon
+$      define/user sys$output nla0:
+$      mcr 'exe_dir'openssl no-rsa
+$      save_severity=$SEVERITY
+$      set on
+$      if save_severity
+$      then
+$          req_new="-newkey dsa:[-.apps]dsa512.pem"
+$      else
+$          req_new="-new"
+$      endif
+$
+$      'reqcmd' -config 'CAconf' -out 'CAreq' -keyout 'CAkey' 'req_new' ! -out err.ss
 $      if $severity .ne. 1
 $      then
 $              write sys$output "error using 'req' to generate a certificate request"
@@ -48,14 +67,14 @@ $           write sys$output "error using 'x509' convert a certificate to a certificate r
 $              exit 3
 $      endif
 $
-$      'reqcmd' -verify -in 'CAreq' -noout
+$      'reqcmd' -config 'dummycnf' -verify -in 'CAreq' -noout
 $      if $severity .ne. 1
 $      then
 $              write sys$output "first generated request is invalid"
 $              exit 3
 $      endif
 $
-$      'reqcmd' -verify -in 'CAreq2' -noout
+$      'reqcmd' -config 'dummycnf' -verify -in 'CAreq2' -noout
 $      if $severity .ne. 1
 $      then
 $              write sys$output "second generated request is invalid"
@@ -72,7 +91,7 @@ $
 $      write sys$output ""
 $      write sys$output "make another certificate request using 'req'"
 $      define /user sys$output err.ss
-$      'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' -new
+$      'reqcmd' -config 'Uconf' -out 'Ureq' -keyout 'Ukey' 'req_new'
 $      if $severity .ne. 1
 $      then
 $              write sys$output "error using 'req' to generate a certificate request"
@@ -101,4 +120,4 @@ $
 $      write sys$output "The generated user certificate is ",Ucert
 $      write sys$output "The generated user private key is ",Ukey
 $
-$      delete err.ss;*
+$      if f$search("err.ss;*") .nes. "" then delete err.ss;*