2
0

tpkcs7 955 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/sh
  2. cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7'
  3. if [ "$1"x != "x" ]; then
  4. t=$1
  5. else
  6. t=testp7.pem
  7. fi
  8. echo testing pkcs7 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 -> p"
  14. $cmd -in fff.p -inform p -outform p >f.p
  15. if [ $? != 0 ]; then exit 1; fi
  16. echo "d -> d"
  17. $cmd -in f.d -inform d -outform d >ff.d1
  18. if [ $? != 0 ]; then exit 1; fi
  19. echo "p -> d"
  20. $cmd -in f.p -inform p -outform d >ff.d3
  21. if [ $? != 0 ]; then exit 1; fi
  22. echo "d -> p"
  23. $cmd -in f.d -inform d -outform p >ff.p1
  24. if [ $? != 0 ]; then exit 1; fi
  25. echo "p -> p"
  26. $cmd -in f.p -inform p -outform p >ff.p3
  27. if [ $? != 0 ]; then exit 1; fi
  28. cmp fff.p f.p
  29. if [ $? != 0 ]; then exit 1; fi
  30. cmp fff.p ff.p1
  31. if [ $? != 0 ]; then exit 1; fi
  32. cmp fff.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