source: tests/scripts/checkcerts.sh @ 100f6da

Last change on this file since 100f6da was 100f6da, checked in by zzz <zzz@…>, 9 years ago

simple test script

  • Property mode set to 100755
File size: 541 bytes
Line 
1#
2# Run 'certtool -i' on all certificate files
3# Returns nonzero on failure
4#
5# zzz 2011-08
6# public domain
7#
8
9cd `dirname $0`/../../installer/resources/certificates
10
11for i in *
12do
13        echo "Checking $i ..."
14        EXPIRES=`certtool -i < $i | grep 'Not After'`
15        if [ $? -ne 0 ]
16        then
17                echo "********* FAILED CHECK FOR $i *************"
18                FAIL=1
19        fi
20        echo $EXPIRES
21        # TODO - parse and fail if it expires soon
22done
23
24if [ "$FAIL" != "" ]
25then
26        echo "******** At least one file failed check *********"
27else
28        echo "All files passed"
29fi
30exit $FAIL
Note: See TracBrowser for help on using the repository browser.