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=testp7.pem 12fi 13 14echo testing pkcs7 conversions 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 fff.p f.p 39if [ $? != 0 ]; then exit 1; fi 40cmp fff.p ff.p1 41if [ $? != 0 ]; then exit 1; fi 42cmp fff.p ff.p3 43if [ $? != 0 ]; then exit 1; fi 44 45cmp f.p ff.p1 46if [ $? != 0 ]; then exit 1; fi 47cmp f.p ff.p3 48if [ $? != 0 ]; then exit 1; fi 49 50/bin/rm -f f.* ff.* fff.* 51exit 0 52