diff options
author | Richard Levitte <levitte@openssl.org> | 2009-05-15 16:37:08 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2009-05-15 16:37:08 +0000 |
commit | 006c7c6bb1fbf13295a531bf5ee55e8e6fb0a501 (patch) | |
tree | aff8907d76668bd049098e7da93c75fccdb29491 /test/tverify.com | |
parent | bd4a902a1506f00e3d738a7c87a606c15adf8f59 (diff) |
Functional VMS changes submitted by sms@antinode.info (Steven M. Schweda).
Thank you\!
(note: not tested for now, a few nightly builds should give indications though)
Diffstat (limited to 'test/tverify.com')
-rw-r--r-- | test/tverify.com | 78 |
1 files changed, 56 insertions, 22 deletions
diff --git a/test/tverify.com b/test/tverify.com index 021d701d79..2c5f25a97c 100644 --- a/test/tverify.com +++ b/test/tverify.com @@ -1,29 +1,63 @@ $! TVERIFY.COM $ $ __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 +$! +$ line_max = 255 ! Could be longer on modern non-VAX. +$ temp_file_name = "certs_"+ f$getjpi( "", "PID")+ ".tmp" $ exe_dir := sys$disk:[-.'__arch'.exe.apps] -$ -$ copy/concatenate [-.certs]*.pem certs.tmp -$ +$ cmd = "mcr ''exe_dir'openssl verify ""-CAfile"" ''temp_file_name'" +$ cmd_len = f$length( cmd) +$ pems = "[-.certs...]*.pem" +$! +$! Concatenate all the certificate files. +$! +$ copy /concatenate 'pems' 'temp_file_name' +$! +$! Loop through all the certificate files. +$! +$ args = "" $ old_f := -$ loop_certs: -$ verify := NO -$ more := YES -$ certs := -$ loop_certs2: -$ f = f$search("[-.certs]*.pem") -$ if f .nes. "" .and. f .nes. old_f +$ loop_file: +$ f = f$search( pems) +$ if ((f .nes. "") .and. (f .nes. old_f)) +$ then +$ old_f = f +$! +$! If this file name would over-extend the command line, then +$! run the command now. +$! +$ if (cmd_len+ f$length( args)+ 1+ f$length( f) .gt. line_max) +$ then +$ if (args .eqs. "") then goto disaster +$ 'cmd''args' +$ args = "" +$ endif +$! Add the next file to the argument list. +$ args = args+ " "+ f +$ else +$! No more files in the list +$ goto loop_file_end +$ endif +$ goto loop_file +$ loop_file_end: +$! +$! Run the command for any left-over arguments. +$! +$ if (args .nes. "") $ then -$ certs = certs + " [-.certs]" + f$parse(f,,,"NAME") + ".pem" -$ verify := YES -$ if f$length(certs) .lt. 180 then goto loop_certs2 -$ else -$ more := NO +$ 'cmd''args' $ endif -$ certs = certs - " " -$ -$ if verify then mcr 'exe_dir'openssl verify "-CAfile" certs.tmp 'certs' -$ if more then goto loop_certs -$ -$ delete certs.tmp;* +$! +$! Delete the temporary file. +$! +$ if (f$search( "''temp_file_name';*") .nes. "") then - + delete 'temp_file_name';* +$! +$ exit +$! +$ disaster: +$ write sys$output " Command line too long. Doomed." +$! |