tpkcs7d 899 字节
Newer Older
1 2
#!/bin/sh

3
cmd='../util/shlib_wrap.sh ../apps/openssl pkcs7'
4 5 6 7 8 9 10

if [ "$1"x != "x" ]; then
	t=$1
else
	t=pkcs7-1.pem
fi

B
Ben Laurie 已提交
11
echo "testing pkcs7 conversions (2)"
B
Ben Laurie 已提交
12
cp $t p7d-fff.p
13 14

echo "p -> d"
B
Ben Laurie 已提交
15
$cmd -in p7d-fff.p -inform p -outform d >p7d-f.d
16 17
if [ $? != 0 ]; then exit 1; fi
echo "p -> p"
B
Ben Laurie 已提交
18
$cmd -in p7d-fff.p -inform p -outform p >p7d-f.p
19 20 21
if [ $? != 0 ]; then exit 1; fi

echo "d -> d"
B
Ben Laurie 已提交
22
$cmd -in p7d-f.d -inform d -outform d >p7d-ff.d1
23 24
if [ $? != 0 ]; then exit 1; fi
echo "p -> d"
B
Ben Laurie 已提交
25
$cmd -in p7d-f.p -inform p -outform d >p7d-ff.d3
26 27 28
if [ $? != 0 ]; then exit 1; fi

echo "d -> p"
B
Ben Laurie 已提交
29
$cmd -in p7d-f.d -inform d -outform p >p7d-ff.p1
30 31
if [ $? != 0 ]; then exit 1; fi
echo "p -> p"
B
Ben Laurie 已提交
32
$cmd -in p7d-f.p -inform p -outform p >p7d-ff.p3
33 34
if [ $? != 0 ]; then exit 1; fi

B
Ben Laurie 已提交
35
cmp p7d-f.p p7d-ff.p1
36
if [ $? != 0 ]; then exit 1; fi
B
Ben Laurie 已提交
37
cmp p7d-f.p p7d-ff.p3
38 39
if [ $? != 0 ]; then exit 1; fi

B
Ben Laurie 已提交
40
/bin/rm -f p7d-f.* p7d-ff.* p7d-fff.*
41
exit 0