tsid 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/bin/sh
  2. if test "$OSTYPE" = msdosdjgpp; then
  3. PATH=../apps\;$PATH
  4. else
  5. PATH=../apps:$PATH
  6. fi
  7. export PATH
  8. cmd='../apps/openssl sess_id'
  9. if [ "$1"x != "x" ]; then
  10. t=$1
  11. else
  12. t=testsid.pem
  13. fi
  14. echo testing session-id conversions
  15. cp $t fff.p
  16. echo "p -> d"
  17. $cmd -in fff.p -inform p -outform d >f.d
  18. if [ $? != 0 ]; then exit 1; fi
  19. #echo "p -> t"
  20. #$cmd -in fff.p -inform p -outform t >f.t
  21. #if [ $? != 0 ]; then exit 1; fi
  22. echo "p -> p"
  23. $cmd -in fff.p -inform p -outform p >f.p
  24. if [ $? != 0 ]; then exit 1; fi
  25. echo "d -> d"
  26. $cmd -in f.d -inform d -outform d >ff.d1
  27. if [ $? != 0 ]; then exit 1; fi
  28. #echo "t -> d"
  29. #$cmd -in f.t -inform t -outform d >ff.d2
  30. #if [ $? != 0 ]; then exit 1; fi
  31. echo "p -> d"
  32. $cmd -in f.p -inform p -outform d >ff.d3
  33. if [ $? != 0 ]; then exit 1; fi
  34. #echo "d -> t"
  35. #$cmd -in f.d -inform d -outform t >ff.t1
  36. #if [ $? != 0 ]; then exit 1; fi
  37. #echo "t -> t"
  38. #$cmd -in f.t -inform t -outform t >ff.t2
  39. #if [ $? != 0 ]; then exit 1; fi
  40. #echo "p -> t"
  41. #$cmd -in f.p -inform p -outform t >ff.t3
  42. #if [ $? != 0 ]; then exit 1; fi
  43. echo "d -> p"
  44. $cmd -in f.d -inform d -outform p >ff.p1
  45. if [ $? != 0 ]; then exit 1; fi
  46. #echo "t -> p"
  47. #$cmd -in f.t -inform t -outform p >ff.p2
  48. #if [ $? != 0 ]; then exit 1; fi
  49. echo "p -> p"
  50. $cmd -in f.p -inform p -outform p >ff.p3
  51. if [ $? != 0 ]; then exit 1; fi
  52. cmp fff.p f.p
  53. if [ $? != 0 ]; then exit 1; fi
  54. cmp fff.p ff.p1
  55. if [ $? != 0 ]; then exit 1; fi
  56. #cmp fff.p ff.p2
  57. #if [ $? != 0 ]; then exit 1; fi
  58. cmp fff.p ff.p3
  59. if [ $? != 0 ]; then exit 1; fi
  60. #cmp f.t ff.t1
  61. #if [ $? != 0 ]; then exit 1; fi
  62. #cmp f.t ff.t2
  63. #if [ $? != 0 ]; then exit 1; fi
  64. #cmp f.t ff.t3
  65. #if [ $? != 0 ]; then exit 1; fi
  66. cmp f.p ff.p1
  67. if [ $? != 0 ]; then exit 1; fi
  68. #cmp f.p ff.p2
  69. #if [ $? != 0 ]; then exit 1; fi
  70. cmp f.p ff.p3
  71. if [ $? != 0 ]; then exit 1; fi
  72. /bin/rm -f f.* ff.* fff.*
  73. exit 0