2
0

tsid 1.9 KB

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