blob: 6d4e87e8e73404fc205e4668464c9921ea1087b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/bash
TITLE=$1
EECERT=$2
RESULT=$3
./build-chain certs $EECERT > chain.pem
certtool -e < chain.pem > output.txt
rm -f chain.pem
if grep -q 'Verification output:' output.txt; then
if grep 'Verification output' output.txt | grep -q -v 'Verification output: Verified.'; then
if test "$RESULT" = "0"; then
echo "<font color=red>Unexpected reject</font>"
else
echo "<font color=green>Reject</font>"
fi
else
if test "$RESULT" = "1"; then
echo "<font color=red>Unexpected success</font>"
else
echo "<font color=green>Success</font>"
fi
fi
fi
rm -f output.txt
|