]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/certcrl/testSubjects/trustSettings/buildAndTest
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / clxutils / certcrl / testSubjects / trustSettings / buildAndTest
1 #! /bin/csh -f
2 #
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;
7
8 # This requires user interaction to authenticate the trust settings import.
9 #
10 if ( $#argv != 0 ) then
11 echo "Usage: buildAndTest"
12 exit(1)
13 endif
14
15 set RESTORE_SETTINGS=YES
16 set SAVED_SETTINGS=/tmp/savedSettings.plist
17
18 echo "Saving existing Trust Settings, if any."
19 security trust-settings-export $SAVED_SETTINGS
20 if($status != 0) then
21 set RESTORE_SETTINGS=NO
22 endif
23
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)
27
28 certcrl -S trustSettings.scr || exit(1)
29
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)
33 rm $SAVED_SETTINGS
34 else
35 echo Importing Empty Trust Settings. This requires user authentication.
36 security trust-settings-import emptyTrustSettings.plist || exit(1)
37 endif
38 echo == Fine ==
39