testca.com 1.2 KB

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