3 # Build trust settings needed for test script trustSettings.scr;
4 # import those trust settings into current user domain;
5 # run trustSettings.scr;
6 # import empty trust settings back into user domain;
8 # This requires user interaction to authenticate the trust settings import.
10 if ( $#argv != 0 ) then
11 echo "Usage: buildAndTest"
15 set RESTORE_SETTINGS
=YES
16 set SAVED_SETTINGS
=/tmp
/savedSettings.plist
18 echo "Saving existing Trust Settings, if any."
19 security trust
-settings-export $SAVED_SETTINGS
21 set RESTORE_SETTINGS
=NO
24 .
/makeTrustSettings
|| exit(1)
25 echo Importing Trust Settings. This requires user authentication.
26 security trust
-settings-import $LOCAL_BUILD_DIR/userTrustSettings.plist
|| exit(1)
28 certcrl
-S trustSettings.scr
|| exit(1)
30 if($RESTORE_SETTINGS == YES
) then
31 echo Restoring original Trust Settings. This requires user authentication.
32 security trust
-settings-import $SAVED_SETTINGS || exit(1)
35 echo Importing Empty Trust Settings. This requires user authentication.
36 security trust
-settings-import emptyTrustSettings.plist
|| exit(1)