]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/importExport/setupCommon
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / clxutils / importExport / setupCommon
1 #
2 # common setup for all import/export test scripts.
3 #
4
5 #
6 # safely look for this required env var
7 #
8 setenv | /usr/bin/grep LOCAL_BUILD_DIR > /dev/null
9 if($status != 0) then
10 echo Please set env var LOCAL_BUILD_DIR.
11 exit(1)
12 endif
13 set BUILD_DIR=$LOCAL_BUILD_DIR
14
15 #
16 # hard coded executables
17 # first the ones built by cspxutils and clxutils...
18 #
19 set KCIMPORT=$BUILD_DIR/kcImport
20 set KCEXPORT=$BUILD_DIR/kcExport
21 set RSATOOL=$BUILD_DIR/rsatool
22 set DBTOOL=$BUILD_DIR/dbTool
23 set DBVERIFY=$BUILD_DIR/dbVerifyKey
24 set PEMTOOL=$BUILD_DIR/pemtool
25 set KEY_FROM_CERT=$BUILD_DIR/keyFromCert
26 #
27 # now standard system tools...
28 #
29 set CERTTOOL=/usr/bin/certtool
30 set SECURITY=/usr/bin/security
31 set CERTTOOL=/usr/bin/certtool
32 set OPENSSL=/usr/bin/openssl
33 set RM=/bin/rm
34 set CMP=/usr/bin/cmp
35
36 # one keychain name used by all tests...
37 set KEYCHAIN=importExport.keychain
38
39 #
40 # and one path, which varies depending on whether we are root
41 # Note since root behaves differently depending on whether we actually logged in
42 # as root, or is running via e.g. cron, we force the issue of "where are root's
43 # keychains kept" by specifying a full path for the keychain for root in any case.
44 #
45 set USERNAME=`whoami`
46 if($USERNAME == root) then
47 set KEYCHAIN_PATH=/Library/Keychains/$KEYCHAIN
48 set KEYCHAIN=$KEYCHAIN_PATH
49 else
50 set KEYCHAIN_PATH=$HOME/Library/Keychains/$KEYCHAIN
51 endif
52
53 #
54 # our keychain's password
55 #
56 set KEYCHAIN_PWD=password
57
58 # this command cleans out $KEYCHAIN_PATH, leaving it empty
59 set CLEANKC="$DBTOOL $KEYCHAIN_PATH D R q"
60