2
0

tsid 1.7 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 fff.p
  10. echo "p -> d"
  11. $cmd -in fff.p -inform p -outform d >f.d
  12. if [ $? != 0 ]; then exit 1; fi
  13. #echo "p -> t"
  14. #$cmd -in fff.p -inform p -outform t >f.t
  15. #if [ $? != 0 ]; then exit 1; fi
  16. echo "p -> p"
  17. $cmd -in fff.p -inform p -outform p >f.p
  18. if [ $? != 0 ]; then exit 1; fi
  19. echo "d -> d"
  20. $cmd -in f.d -inform d -outform d >ff.d1
  21. if [ $? != 0 ]; then exit 1; fi
  22. #echo "t -> d"
  23. #$cmd -in f.t -inform t -outform d >ff.d2
  24. #if [ $? != 0 ]; then exit 1; fi
  25. echo "p -> d"
  26. $cmd -in f.p -inform p -outform d >ff.d3
  27. if [ $? != 0 ]; then exit 1; fi
  28. #echo "d -> t"
  29. #$cmd -in f.d -inform d -outform t >ff.t1
  30. #if [ $? != 0 ]; then exit 1; fi
  31. #echo "t -> t"
  32. #$cmd -in f.t -inform t -outform t >ff.t2
  33. #if [ $? != 0 ]; then exit 1; fi
  34. #echo "p -> t"
  35. #$cmd -in f.p -inform p -outform t >ff.t3
  36. #if [ $? != 0 ]; then exit 1; fi
  37. echo "d -> p"
  38. $cmd -in f.d -inform d -outform p >ff.p1
  39. if [ $? != 0 ]; then exit 1; fi
  40. #echo "t -> p"
  41. #$cmd -in f.t -inform t -outform p >ff.p2
  42. #if [ $? != 0 ]; then exit 1; fi
  43. echo "p -> p"
  44. $cmd -in f.p -inform p -outform p >ff.p3
  45. if [ $? != 0 ]; then exit 1; fi
  46. cmp fff.p f.p
  47. if [ $? != 0 ]; then exit 1; fi
  48. cmp fff.p ff.p1
  49. if [ $? != 0 ]; then exit 1; fi
  50. #cmp fff.p ff.p2
  51. #if [ $? != 0 ]; then exit 1; fi
  52. cmp fff.p ff.p3
  53. if [ $? != 0 ]; then exit 1; fi
  54. #cmp f.t ff.t1
  55. #if [ $? != 0 ]; then exit 1; fi
  56. #cmp f.t ff.t2
  57. #if [ $? != 0 ]; then exit 1; fi
  58. #cmp f.t ff.t3
  59. #if [ $? != 0 ]; then exit 1; fi
  60. cmp f.p ff.p1
  61. if [ $? != 0 ]; then exit 1; fi
  62. #cmp f.p ff.p2
  63. #if [ $? != 0 ]; then exit 1; fi
  64. cmp f.p ff.p3
  65. if [ $? != 0 ]; then exit 1; fi
  66. /bin/rm -f f.* ff.* fff.*
  67. exit 0