tpkcs7 965 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. PATH=../apps:$PATH
  3. export PATH
  4. cmd='../apps/openssl pkcs7'
  5. if [ "$1"x != "x" ]; then
  6. t=$1
  7. else
  8. t=testp7.pem
  9. fi
  10. echo testing pkcs7 conversions
  11. cp $t fff.p
  12. echo "p -> d"
  13. $cmd -in fff.p -inform p -outform d >f.d
  14. if [ $? != 0 ]; then exit 1; fi
  15. echo "p -> p"
  16. $cmd -in fff.p -inform p -outform p >f.p
  17. if [ $? != 0 ]; then exit 1; fi
  18. echo "d -> d"
  19. $cmd -in f.d -inform d -outform d >ff.d1
  20. if [ $? != 0 ]; then exit 1; fi
  21. echo "p -> d"
  22. $cmd -in f.p -inform p -outform d >ff.d3
  23. if [ $? != 0 ]; then exit 1; fi
  24. echo "d -> p"
  25. $cmd -in f.d -inform d -outform p >ff.p1
  26. if [ $? != 0 ]; then exit 1; fi
  27. echo "p -> p"
  28. $cmd -in f.p -inform p -outform p >ff.p3
  29. if [ $? != 0 ]; then exit 1; fi
  30. cmp fff.p f.p
  31. if [ $? != 0 ]; then exit 1; fi
  32. cmp fff.p ff.p1
  33. if [ $? != 0 ]; then exit 1; fi
  34. cmp fff.p ff.p3
  35. if [ $? != 0 ]; then exit 1; fi
  36. cmp f.p ff.p1
  37. if [ $? != 0 ]; then exit 1; fi
  38. cmp f.p ff.p3
  39. if [ $? != 0 ]; then exit 1; fi
  40. /bin/rm -f f.* ff.* fff.*
  41. exit 0