trsa.com 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. $! TRSA.COM -- Tests rsa keys
  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. $ set noon
  10. $ define/user sys$output nla0:
  11. $ mcr 'exe_dir'openssl no-rsa
  12. $ save_severity=$SEVERITY
  13. $ set on
  14. $ if save_severity
  15. $ then
  16. $ write sys$output "skipping RSA conversion test"
  17. $ exit
  18. $ endif
  19. $
  20. $ cmd := mcr 'exe_dir'openssl rsa
  21. $
  22. $ t := testrsa.pem
  23. $ if p1 .nes. "" then t = p1
  24. $
  25. $ write sys$output "testing RSA conversions"
  26. $ if f$search("fff.*") .nes "" then delete fff.*;*
  27. $ if f$search("ff.*") .nes "" then delete ff.*;*
  28. $ if f$search("f.*") .nes "" then delete f.*;*
  29. $ convert/fdl=sys$input: 't' fff.p
  30. RECORD
  31. FORMAT STREAM_LF
  32. $
  33. $ write sys$output "p -> d"
  34. $ 'cmd' -in fff.p -inform p -outform d -out f.d
  35. $ if $severity .ne. 1 then exit 3
  36. $! write sys$output "p -> t"
  37. $! 'cmd' -in fff.p -inform p -outform t -out f.t
  38. $! if $severity .ne. 1 then exit 3
  39. $ write sys$output "p -> p"
  40. $ 'cmd' -in fff.p -inform p -outform p -out f.p
  41. $ if $severity .ne. 1 then exit 3
  42. $
  43. $ write sys$output "d -> d"
  44. $ 'cmd' -in f.d -inform d -outform d -out ff.d1
  45. $ if $severity .ne. 1 then exit 3
  46. $! write sys$output "t -> d"
  47. $! 'cmd' -in f.t -inform t -outform d -out ff.d2
  48. $! if $severity .ne. 1 then exit 3
  49. $ write sys$output "p -> d"
  50. $ 'cmd' -in f.p -inform p -outform d -out ff.d3
  51. $ if $severity .ne. 1 then exit 3
  52. $
  53. $! write sys$output "d -> t"
  54. $! 'cmd' -in f.d -inform d -outform t -out ff.t1
  55. $! if $severity .ne. 1 then exit 3
  56. $! write sys$output "t -> t"
  57. $! 'cmd' -in f.t -inform t -outform t -out ff.t2
  58. $! if $severity .ne. 1 then exit 3
  59. $! write sys$output "p -> t"
  60. $! 'cmd' -in f.p -inform p -outform t -out ff.t3
  61. $! if $severity .ne. 1 then exit 3
  62. $
  63. $ write sys$output "d -> p"
  64. $ 'cmd' -in f.d -inform d -outform p -out ff.p1
  65. $ if $severity .ne. 1 then exit 3
  66. $! write sys$output "t -> p"
  67. $! 'cmd' -in f.t -inform t -outform p -out ff.p2
  68. $! if $severity .ne. 1 then exit 3
  69. $ write sys$output "p -> p"
  70. $ 'cmd' -in f.p -inform p -outform p -out ff.p3
  71. $ if $severity .ne. 1 then exit 3
  72. $
  73. $ backup/compare fff.p f.p
  74. $ if $severity .ne. 1 then exit 3
  75. $ backup/compare fff.p ff.p1
  76. $ if $severity .ne. 1 then exit 3
  77. $! backup/compare fff.p ff.p2
  78. $! if $severity .ne. 1 then exit 3
  79. $ backup/compare fff.p ff.p3
  80. $ if $severity .ne. 1 then exit 3
  81. $
  82. $! backup/compare f.t ff.t1
  83. $! if $severity .ne. 1 then exit 3
  84. $! backup/compare f.t ff.t2
  85. $! if $severity .ne. 1 then exit 3
  86. $! backup/compare f.t ff.t3
  87. $! if $severity .ne. 1 then exit 3
  88. $
  89. $ backup/compare f.p ff.p1
  90. $ if $severity .ne. 1 then exit 3
  91. $! backup/compare f.p ff.p2
  92. $! if $severity .ne. 1 then exit 3
  93. $ backup/compare f.p ff.p3
  94. $ if $severity .ne. 1 then exit 3
  95. $
  96. $ delete f.*;*,ff.*;*,fff.*;*