3 # Run import/export tests.
5 # Run this from SecurityTests/clxutils/importExport. The
6 # kcImport and kcExport programs must exist in the location
7 # specified by the LOCAL_BUILD_DIR env var.
9 if ( ! -e setupCommon
) then
10 echo === You
do not seem to be
in the clxutils
/importExport directory.
11 echo === Try running this
script from there.
19 # echo importExport test running as `whoami`
20 # echo importExport test using HOME $HOME
21 # echo importExport test using keychain $KEYCHAIN at path $KEYCHAIN_PATH
23 # user specified variables
32 # Verify existence of a few crucial things before we start.
34 if( ( ! -e $KCIMPORT ) || \
35 ( ! -e $KCEXPORT ) || \
36 ( ! -e $RSATOOL) ) then
37 echo === You
do not seem to have all of the required executables.
38 echo === Please build all of cspxutils and clxutils.
39 echo === See the README files
in those directories
for info.
67 echo Usage
: importExport \
[q\
(uiet\
)\
] \
[n\
(oACL\
)\
] \
[i\
(nitOnly\
)\
] \
[N\
(oClean\
)\
]
72 if ($QUIET == NO
) then
73 echo === Creating empty
$KEYCHAIN...
===
75 set cmd
="$RM -f $KEYCHAIN_PATH"
76 if ($QUIET == NO
) then
82 # We have to use full path here because certtool doesn't follow the rules
83 # w.r.t. root's keychain directory
85 set cmd
="$CERTTOOL y k=$KEYCHAIN_PATH c p=$KEYCHAIN_PWD"
89 $cmd > /dev
/null
|| exit(1)
91 if($INIT_ONLY == YES
) then
92 echo ...init complete. Ready
for standalone tests.
96 .
/importExportRawKey
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
97 .
/importExportECDSA_P12
$QUIET_ARG $NOCLEAN_ARG || exit(1)
98 .
/impExpOpensslEcdsa
$QUIET_ARG $NOCLEAN_ARG || exit(1)
99 .
/importExportPkcs7
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
100 .
/importExportPkcs8
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
101 .
/importExportPkcs12
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
102 .
/importExportOpensslWrap
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
103 .
/importExportAgg
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
104 .
/importExportOpenssh
$QUIET_ARG $NOACL_ARG $NOCLEAN_ARG || exit(1)
107 if ($NOCLEAN == NO
) then
108 set cmd
="$SECURITY delete-keychain $KEYCHAIN_PATH"
109 if ($QUIET == NO
) then
115 if ($QUIET == NO
) then
116 echo "##### Import/Export Test complete #####"