tpkcs7 1.0 KB

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 p7-fff.p
  10. echo "p -> d"
  11. $cmd -in p7-fff.p -inform p -outform d >p7-f.d
  12. if [ $? != 0 ]; then exit 1; fi
  13. echo "p -> p"
  14. $cmd -in p7-fff.p -inform p -outform p >p7-f.p
  15. if [ $? != 0 ]; then exit 1; fi
  16. echo "d -> d"
  17. $cmd -in p7-f.d -inform d -outform d >p7-ff.d1
  18. if [ $? != 0 ]; then exit 1; fi
  19. echo "p -> d"
  20. $cmd -in p7-f.p -inform p -outform d >p7-ff.d3
  21. if [ $? != 0 ]; then exit 1; fi
  22. echo "d -> p"
  23. $cmd -in p7-f.d -inform d -outform p >p7-ff.p1
  24. if [ $? != 0 ]; then exit 1; fi
  25. echo "p -> p"
  26. $cmd -in p7-f.p -inform p -outform p >p7-ff.p3
  27. if [ $? != 0 ]; then exit 1; fi
  28. cmp p7-fff.p p7-f.p
  29. if [ $? != 0 ]; then exit 1; fi
  30. cmp p7-fff.p p7-ff.p1
  31. if [ $? != 0 ]; then exit 1; fi
  32. cmp p7-fff.p p7-ff.p3
  33. if [ $? != 0 ]; then exit 1; fi
  34. cmp p7-f.p p7-ff.p1
  35. if [ $? != 0 ]; then exit 1; fi
  36. cmp p7-f.p p7-ff.p3
  37. if [ $? != 0 ]; then exit 1; fi
  38. /bin/rm -f p7-f.* p7-ff.* p7-fff.*
  39. exit 0