tx509.com 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. $! TX509.COM -- Tests x509 certificates
  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. $ exe_dir := sys$disk:[-.'__arch'.exe.apps]
  8. $
  9. $ cmd := mcr 'exe_dir'openssl x509
  10. $
  11. $ t := testx509.pem
  12. $ if p1 .nes. "" then t = p1
  13. $
  14. $ write sys$output "testing X509 conversions"
  15. $ if f$search("fff.*") .nes "" then delete fff.*;*
  16. $ if f$search("ff.*") .nes "" then delete ff.*;*
  17. $ if f$search("f.*") .nes "" then delete f.*;*
  18. $ convert/fdl=sys$input: 't' fff.p
  19. RECORD
  20. FORMAT STREAM_LF
  21. $
  22. $ write sys$output "p -> d"
  23. $ 'cmd' -in fff.p -inform p -outform d -out f.d
  24. $ if $severity .ne. 1 then exit 3
  25. $ write sys$output "p -> n"
  26. $ 'cmd' -in fff.p -inform p -outform n -out f.n
  27. $ if $severity .ne. 1 then exit 3
  28. $ write sys$output "p -> p"
  29. $ 'cmd' -in fff.p -inform p -outform p -out f.p
  30. $ if $severity .ne. 1 then exit 3
  31. $
  32. $ write sys$output "d -> d"
  33. $ 'cmd' -in f.d -inform d -outform d -out ff.d1
  34. $ if $severity .ne. 1 then exit 3
  35. $ write sys$output "n -> d"
  36. $ 'cmd' -in f.n -inform n -outform d -out ff.d2
  37. $ if $severity .ne. 1 then exit 3
  38. $ write sys$output "p -> d"
  39. $ 'cmd' -in f.p -inform p -outform d -out ff.d3
  40. $ if $severity .ne. 1 then exit 3
  41. $
  42. $ write sys$output "d -> n"
  43. $ 'cmd' -in f.d -inform d -outform n -out ff.n1
  44. $ if $severity .ne. 1 then exit 3
  45. $ write sys$output "n -> n"
  46. $ 'cmd' -in f.n -inform n -outform n -out ff.n2
  47. $ if $severity .ne. 1 then exit 3
  48. $ write sys$output "p -> n"
  49. $ 'cmd' -in f.p -inform p -outform n -out ff.n3
  50. $ if $severity .ne. 1 then exit 3
  51. $
  52. $ write sys$output "d -> p"
  53. $ 'cmd' -in f.d -inform d -outform p -out ff.p1
  54. $ if $severity .ne. 1 then exit 3
  55. $ write sys$output "n -> p"
  56. $ 'cmd' -in f.n -inform n -outform p -out ff.p2
  57. $ if $severity .ne. 1 then exit 3
  58. $ write sys$output "p -> p"
  59. $ 'cmd' -in f.p -inform p -outform p -out ff.p3
  60. $ if $severity .ne. 1 then exit 3
  61. $
  62. $ backup/compare fff.p f.p
  63. $ if $severity .ne. 1 then exit 3
  64. $ backup/compare fff.p ff.p1
  65. $ if $severity .ne. 1 then exit 3
  66. $ backup/compare fff.p ff.p2
  67. $ if $severity .ne. 1 then exit 3
  68. $ backup/compare fff.p ff.p3
  69. $ if $severity .ne. 1 then exit 3
  70. $
  71. $ backup/compare f.n ff.n1
  72. $ if $severity .ne. 1 then exit 3
  73. $ backup/compare f.n ff.n2
  74. $ if $severity .ne. 1 then exit 3
  75. $ backup/compare f.n ff.n3
  76. $ if $severity .ne. 1 then exit 3
  77. $
  78. $ backup/compare f.p ff.p1
  79. $ if $severity .ne. 1 then exit 3
  80. $ backup/compare f.p ff.p2
  81. $ if $severity .ne. 1 then exit 3
  82. $ backup/compare f.p ff.p3
  83. $ if $severity .ne. 1 then exit 3
  84. $
  85. $ delete f.*;*,ff.*;*,fff.*;*