tpkcs7d.com 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. $! TPKCS7.COM -- Tests pkcs7 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. $!
  8. $ if (p2 .eqs. "64") then __arch = __arch+ "_64"
  9. $!
  10. $ exe_dir = "sys$disk:[-.''__arch'.exe.apps]"
  11. $
  12. $ cmd = "mcr ''exe_dir'openssl pkcs7"
  13. $
  14. $ t = "pkcs7-1.pem"
  15. $ if p1 .nes. "" then t = p1
  16. $
  17. $ write sys$output "testing PKCS7 conversions (2)"
  18. $ if f$search("fff.*") .nes "" then delete fff.*;*
  19. $ if f$search("ff.*") .nes "" then delete ff.*;*
  20. $ if f$search("f.*") .nes "" then delete f.*;*
  21. $ convert/fdl=sys$input: 't' fff.p
  22. RECORD
  23. FORMAT STREAM_LF
  24. $
  25. $ write sys$output "p -> d"
  26. $ 'cmd' -in fff.p -inform p -outform d -out f.d
  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 "p -> d"
  36. $ 'cmd' -in f.p -inform p -outform d -out ff.d3
  37. $ if $severity .ne. 1 then exit 3
  38. $
  39. $
  40. $ write sys$output "d -> p"
  41. $ 'cmd' -in f.d -inform d -outform p -out ff.p1
  42. $ if $severity .ne. 1 then exit 3
  43. $ write sys$output "p -> p"
  44. $ 'cmd' -in f.p -inform p -outform p -out ff.p3
  45. $ if $severity .ne. 1 then exit 3
  46. $
  47. $ backup/compare f.p ff.p1
  48. $ if $severity .ne. 1 then exit 3
  49. $ backup/compare f.p ff.p3
  50. $ if $severity .ne. 1 then exit 3
  51. $
  52. $ delete f.*;*,ff.*;*,fff.*;*