tx509 843 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. cmd='../util/shlib_wrap.sh ../apps/openssl x509'
  3. if [ "$1"x != "x" ]; then
  4. t=$1
  5. else
  6. t=testx509.pem
  7. fi
  8. echo testing X509 conversions
  9. cp $t x509-fff.p
  10. echo "p -> d"
  11. $cmd -in x509-fff.p -inform p -outform d >x509-f.d || exit 1
  12. echo "p -> p"
  13. $cmd -in x509-fff.p -inform p -outform p >x509-f.p || exit 1
  14. echo "d -> d"
  15. $cmd -in x509-f.d -inform d -outform d >x509-ff.d1 || exit 1
  16. echo "p -> d"
  17. $cmd -in x509-f.p -inform p -outform d >x509-ff.d3 || exit 1
  18. echo "d -> p"
  19. $cmd -in x509-f.d -inform d -outform p >x509-ff.p1 || exit 1
  20. echo "p -> p"
  21. $cmd -in x509-f.p -inform p -outform p >x509-ff.p3 || exit 1
  22. cmp x509-fff.p x509-f.p || exit 1
  23. cmp x509-fff.p x509-ff.p1 || exit 1
  24. cmp x509-fff.p x509-ff.p3 || exit 1
  25. cmp x509-f.p x509-ff.p1 || exit 1
  26. cmp x509-f.p x509-ff.p3 || exit 1
  27. /bin/rm -f x509-f.* x509-ff.* x509-fff.*
  28. exit 0