testca.com 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. $! TESTCA.COM
  2. $
  3. $ __arch := VAX
  4. $ if f$getsyi("cpu") .ge. 128 then -
  5. __arch = f$edit( f$getsyi( "ARCH_NAME"), "UPCASE")
  6. $ if __arch .eqs. "" then __arch := UNK
  7. $
  8. $ openssl := mcr 'exe_dir'openssl
  9. $
  10. $ SSLEAY_CONFIG="-config ""CAss.cnf"""
  11. $
  12. $ set noon
  13. $ if f$search("demoCA.dir") .nes. ""
  14. $ then
  15. $ @[-.util]deltree [.demoCA]*.*
  16. $ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;*
  17. $ delete demoCA.dir;*
  18. $ endif
  19. $ set on
  20. $ open/read sys$ca_input VMSca-response.1
  21. $ @[-.apps]CA.com -input sys$ca_input -newca
  22. $ close sys$ca_input
  23. $ if $severity .ne. 1 then exit 3
  24. $
  25. $
  26. $ SSLEAY_CONFIG="-config ""Uss.cnf"""
  27. $ @[-.apps]CA.com -newreq
  28. $ if $severity .ne. 1 then exit 3
  29. $
  30. $
  31. $ SSLEAY_CONFIG="-config [-.apps]openssl-vms.cnf"
  32. $ open/read sys$ca_input VMSca-response.2
  33. $ @[-.apps]CA.com -input sys$ca_input -sign
  34. $ close sys$ca_input
  35. $ if $severity .ne. 1 then exit 3
  36. $
  37. $
  38. $ @[-.apps]CA.com -verify newcert.pem
  39. $ if $severity .ne. 1 then exit 3
  40. $
  41. $ set noon
  42. $ @[-.util]deltree [.demoCA]*.*
  43. $ set file/prot=(S:RWED,O:RWED,G:RWED,W:RWED) demoCA.dir;*
  44. $ delete demoCA.dir;*
  45. $ if f$search("newcert.pem") .nes. "" then delete newcert.pem;*
  46. $ if f$search("newcert.pem") .nes. "" then delete newreq.pem;*
  47. $ set on
  48. $! #usage: CA -newcert|-newreq|-newca|-sign|-verify
  49. $
  50. $ exit