tsid 824 B

123456789101112131415161718192021222324252627282930313233343536
  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 || exit 1
  12. echo "p -> p"
  13. $cmd -in sid-fff.p -inform p -outform p >sid-f.p || exit 1
  14. echo "d -> d"
  15. $cmd -in sid-f.d -inform d -outform d >sid-ff.d1 || exit 1
  16. echo "p -> d"
  17. $cmd -in sid-f.p -inform p -outform d >sid-ff.d3 || exit 1
  18. echo "d -> p"
  19. $cmd -in sid-f.d -inform d -outform p >sid-ff.p1 || exit 1
  20. echo "p -> p"
  21. $cmd -in sid-f.p -inform p -outform p >sid-ff.p3 || exit 1
  22. cmp sid-fff.p sid-f.p || exit 1
  23. cmp sid-fff.p sid-ff.p1 || exit 1
  24. cmp sid-fff.p sid-ff.p3 || exit 1
  25. cmp sid-f.p sid-ff.p1 || exit 1
  26. cmp sid-f.p sid-ff.p3 || exit 1
  27. /bin/rm -f sid-f.* sid-ff.* sid-fff.*
  28. exit 0