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