3 # verify all of the certs in specified directory as intermediates. They must
4 # verify against the system roots.
7 echo "Usage: intermedSourceTest directory [q(uiet)] [t(rustSettings)]"
8 echo A good directory would be ..
/..
/..
/security_certificates
/certs
/
12 set BUILD_DIR
=$LOCAL_BUILD_DIR
13 set CERTS_DIR
=$argv[1]
16 set TRUST_SETTINGS_ARG
=
25 set TRUST_SETTINGS_ARG
= -g
29 echo Usage
: intermedSourceTest directory
37 set CERTCRL
=$BUILD_DIR/certcrl
38 set CERTS_FROM_DB
=$BUILD_DIR/certsFromDb
39 foreach targ
($CERTCRL $CERTS_FROM_DB)
41 echo === $targ is missing. Try building clxutil.
46 set SYSTEM_CERTS
=/System
/Library
/Keychains
/SystemCACertificates.keychain
48 echo starting intermedSourceTest
53 # -s use system anchors
54 # -a allow certs unverified by CRLs
55 # -n no network fetch of CRLs
56 # -N no network fetch of certs
57 # -f leaf cert is a CA
58 # -d SYSTEM_CERTS -- use additional certs from there
60 # -g use Trust Settings
64 if ( -f "$certFile" ) then
66 echo testing
$certFile....
68 $CERTCRL -c "$certFile" -s -a -f -L -n -N -d $SYSTEM_CERTS $TRUST_SETTINGS_ARG
71 echo "Note: $certFile is expired"
74 echo "++++++++ Verification error on $certFile ($ERR)"
75 $CERTCRL -c "$certFile" -s -a -f -v -n -N -d $SYSTEM_CERTS $TRUST_SETTINGS_ARG
82 echo "...intermedSourceTest complete"