summaryrefslogtreecommitdiff
path: root/tests/testKeys.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testKeys.sh')
-rwxr-xr-xtests/testKeys.sh69
1 files changed, 69 insertions, 0 deletions
diff --git a/tests/testKeys.sh b/tests/testKeys.sh
new file mode 100755
index 00000000..1bf7dc23
--- /dev/null
+++ b/tests/testKeys.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# This script needs to be called from testrun.sh script
+#
+
+##########################################################################
+##########################################################################
+##########################################################################
+echo "--- testKeys started for xmlsec-$crypto library ($timestamp) ---"
+echo "--- LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
+echo "--- log file is $logfile"
+echo "--- testKeys started for xmlsec-$crypto library ($timestamp) ---" >> $logfile
+echo "--- LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $logfile
+
+# cleanup crypto config folder
+mkdir -p $crypto_config
+rm -rf $crypto_config/*
+
+# remove old keys file and copy NSS DB files if needed
+rm -rf $keysfile
+if [ "z$crypto" = "znss" ] ; then
+ cp -f $nssdbfolder/*.db $crypto_config
+fi
+
+##########################################################################
+##########################################################################
+##########################################################################
+echo "--------- Positive Testing ----------"
+execKeysTest $res_success \
+ "hmac" \
+ "test-hmac-sha1" \
+ "hmac-192"
+
+execKeysTest $res_success \
+ "rsa " \
+ "test-rsa " \
+ "rsa-1024"
+
+execKeysTest $res_success \
+ "dsa " \
+ "test-dsa " \
+ "dsa-1024"
+
+execKeysTest $res_success \
+ "des " \
+ "test-des " \
+ "des-192 "
+
+execKeysTest $res_success \
+ "aes " \
+ "test-aes128 " \
+ "aes-128 "
+
+execKeysTest $res_success \
+ "aes " \
+ "test-aes192 " \
+ "aes-192 "
+
+execKeysTest $res_success \
+ "aes " \
+ "test-aes256 " \
+ "aes-256 "
+
+##########################################################################
+##########################################################################
+##########################################################################
+echo "--- testKeys finished ---" >> $logfile
+echo "--- testKeys finished ---"
+echo "--- detailed log is written to $logfile ---"