tpkcs7d 902 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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=pkcs7-1.pem
  13. fi
  14. echo "testing pkcs7 conversions (2)"
  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 f.p ff.p1
  35. if [ $? != 0 ]; then exit 1; fi
  36. cmp f.p ff.p3
  37. if [ $? != 0 ]; then exit 1; fi
  38. /bin/rm -f f.* ff.* fff.*
  39. exit 0