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