tpkcs7 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 pkcs7'
  9. if [ "$1"x != "x" ]; then
  10. t=$1
  11. else
  12. t=testp7.pem
  13. fi
  14. echo testing pkcs7 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 -> p"
  20. $cmd -in fff.p -inform p -outform p >f.p
  21. if [ $? != 0 ]; then exit 1; fi
  22. echo "d -> d"
  23. $cmd -in f.d -inform d -outform d >ff.d1
  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 -> p"
  29. $cmd -in f.d -inform d -outform p >ff.p1
  30. if [ $? != 0 ]; then exit 1; fi
  31. echo "p -> p"
  32. $cmd -in f.p -inform p -outform p >ff.p3
  33. if [ $? != 0 ]; then exit 1; fi
  34. cmp fff.p f.p
  35. if [ $? != 0 ]; then exit 1; fi
  36. cmp fff.p ff.p1
  37. if [ $? != 0 ]; then exit 1; fi
  38. cmp fff.p ff.p3
  39. if [ $? != 0 ]; then exit 1; fi
  40. cmp f.p ff.p1
  41. if [ $? != 0 ]; then exit 1; fi
  42. cmp f.p ff.p3
  43. if [ $? != 0 ]; then exit 1; fi
  44. /bin/rm -f f.* ff.* fff.*
  45. exit 0