From 5c8db1c2ad48eb87515abaf9edd925e126ed5700 Mon Sep 17 00:00:00 2001 From: JanHoefelmeyer Date: Mon, 31 Jul 2023 13:04:08 +0200 Subject: [PATCH] Add new way to test checker to tesChecker.sh, create example checker toml config file --- docs/scripts/checker_test.toml | 7 +++++++ docs/scripts/testChecker.sh | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 docs/scripts/checker_test.toml diff --git a/docs/scripts/checker_test.toml b/docs/scripts/checker_test.toml new file mode 100644 index 0000000..d83afb3 --- /dev/null +++ b/docs/scripts/checker_test.toml @@ -0,0 +1,7 @@ +format = "json" +insecure = true +client_cert = "./../devca1/testclient1.crt" +client_key = "./../devca1/testclient1-key.pem" +verbose = true +rate = 15 +years = 29 diff --git a/docs/scripts/testChecker.sh b/docs/scripts/testChecker.sh index 37c128b..1d637b0 100755 --- a/docs/scripts/testChecker.sh +++ b/docs/scripts/testChecker.sh @@ -10,9 +10,16 @@ set -e # to exit if a command in the script fails -echo '==== run checker (twice)' +echo '==== run checker' cd ~/csaf_distribution +#echo 'version (checker)' +#./bin-linux-amd64/csaf_checker --version + +echo 'run checker with authorization using a toml-config-file and display results' +./bin-linux-amd64/csaf_checker localhost --config="./docs/scripts/checker_test.toml" + +echo 'run checker with authorization using command line parameters and display results' ./bin-linux-amd64/csaf_checker -f html -o ../checker-results.html --insecure \ --client-cert ~/devca1/testclient1.crt \ --client-key ~/devca1/testclient1-key.pem \ @@ -20,5 +27,6 @@ cd ~/csaf_distribution cat ../checker-results.html +echo 'run checker without authorization' ./bin-linux-amd64/csaf_checker -o ../checker-results-no-clientcert.json \ --insecure --verbose localhost