tpkcs7 790 B

123456789101112131415161718192021222324252627282930313233343536
  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 || exit 1
  12. echo "p -> p"
  13. $cmd -in p7-fff.p -inform p -outform p >p7-f.p || exit 1
  14. echo "d -> d"
  15. $cmd -in p7-f.d -inform d -outform d >p7-ff.d1 || exit 1
  16. echo "p -> d"
  17. $cmd -in p7-f.p -inform p -outform d >p7-ff.d3 || exit 1
  18. echo "d -> p"
  19. $cmd -in p7-f.d -inform d -outform p >p7-ff.p1 || exit 1
  20. echo "p -> p"
  21. $cmd -in p7-f.p -inform p -outform p >p7-ff.p3 || exit 1
  22. cmp p7-fff.p p7-f.p || exit 1
  23. cmp p7-fff.p p7-ff.p1 || exit 1
  24. cmp p7-fff.p p7-ff.p3 || exit 1
  25. cmp p7-f.p p7-ff.p1 || exit 1
  26. cmp p7-f.p p7-ff.p3 || exit 1
  27. /bin/rm -f p7-f.* p7-ff.* p7-fff.*
  28. exit 0