8 pub_key_format=$file_format
9 cert_format=$file_format
10 priv_key_option="--pkcs12"
13 if [ "z$TMPFOLDER" = "z" ] ; then
17 timestamp=`date +%Y%m%d_%H%M%S`
18 tmpfile=$TMPFOLDER/testKeys.$timestamp-$$.tmp
19 logfile=$TMPFOLDER/testKeys.$timestamp-$$.log
21 nssdbfolder=$topfolder/nssdb
23 # prepate crypto config folder
24 crypto_config=$TMPFOLDER/xmlsec-crypto-config
25 keysfile=$crypto_config/keys.xml
26 mkdir -p $crypto_config
27 rm -rf $crypto_config/*
29 valgrind_suppression="--suppressions=$topfolder/openssl.supp --suppressions=$topfolder/nss.supp"
30 valgrind_options="--leak-check=yes --show-reachable=yes --num-callers=32 -v"
33 if [ "z$crypto" != "z" -a "z$crypto" != "zdefault" ] ; then
34 xmlsec_params="$xmlsec_params --crypto $crypto"
36 xmlsec_params="$xmlsec_params --crypto-config $crypto_config"
38 if [ -n "$DEBUG_MEMORY" ] ; then
39 export VALGRIND="valgrind $valgrind_options"
41 xmlsec_params="$xmlsec_params --repeat $REPEAT"
44 if [ -n "$PERF_TEST" ] ; then
45 export xmlsec_params="$xmlsec_params --repeat $PERF_TEST"
54 if [ -f .memdump ] ; then
55 cat .memdump >> $logfile
64 if [ -n "$req_key_data" ] ; then
65 printf " Checking $req_key_data key data presense "
66 echo "$xmlsec_app check-key-data $req_key_data" >> $logfile
67 $xmlsec_app check-key-data $req_key_data >> $logfile 2>> $logfile
77 printf " Creating new key: $alg_name "
79 params="--gen-key:$key_name $alg_name"
80 if [ -f $keysfile ] ; then
81 params="$params --keys-file $keysfile"
84 echo "$xmlsec_app keys $params $xmlsec_params $keysfile" >> $logfile
85 $VALGRIND $xmlsec_app keys $params $xmlsec_params $keysfile >> $logfile 2>> $logfile
89 echo "--- testKeys started for xmlsec-$crypto library ($timestamp) ---"
90 echo "--- LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
91 echo "--- log file is $logfile"
92 echo "--- testKeys started for xmlsec-$crypto library ($timestamp) ---" >> $logfile
93 echo "--- LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $logfile
95 # remove old keys file and copy NSS DB files if needed
97 if [ "z$crypto" = "znss" ] ; then
98 cp -f $nssdbfolder/*.db $crypto_config
130 echo "--- testKeys finished ---" >> $logfile
131 echo "--- testKeys finished ---"
132 echo "--- detailed log is written to $logfile ---"