From 0c20b21fc2635716a4018f823c17cfb37cca9253 Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 26 Nov 2020 13:02:10 +0100 Subject: [PATCH 1/3] Better order, "command not found added" --- t/{20_baseline_ipv4_http.t => 10_baseline_ipv4_http.t} | 0 ...line_ipv6_http.t.DISABLED => 11_baseline_ipv6_http.t.DISABLED} | 0 t/{25_baseline_starttls.t => 21_baseline_starttls.t} | 0 t/{07_isJSON_valid.t => 31_isJSON_valid.t} | 0 t/{08_isHTML_valid.t => 32_isHTML_valid.t} | 0 ...JSON_severitylevel_valid.t => 33_isJSON_severitylevel_valid.t} | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename t/{20_baseline_ipv4_http.t => 10_baseline_ipv4_http.t} (100%) rename t/{21_baseline_ipv6_http.t.DISABLED => 11_baseline_ipv6_http.t.DISABLED} (100%) rename t/{25_baseline_starttls.t => 21_baseline_starttls.t} (100%) rename t/{07_isJSON_valid.t => 31_isJSON_valid.t} (100%) rename t/{08_isHTML_valid.t => 32_isHTML_valid.t} (100%) rename t/{09_isJSON_severitylevel_valid.t => 33_isJSON_severitylevel_valid.t} (100%) diff --git a/t/20_baseline_ipv4_http.t b/t/10_baseline_ipv4_http.t similarity index 100% rename from t/20_baseline_ipv4_http.t rename to t/10_baseline_ipv4_http.t diff --git a/t/21_baseline_ipv6_http.t.DISABLED b/t/11_baseline_ipv6_http.t.DISABLED similarity index 100% rename from t/21_baseline_ipv6_http.t.DISABLED rename to t/11_baseline_ipv6_http.t.DISABLED diff --git a/t/25_baseline_starttls.t b/t/21_baseline_starttls.t similarity index 100% rename from t/25_baseline_starttls.t rename to t/21_baseline_starttls.t diff --git a/t/07_isJSON_valid.t b/t/31_isJSON_valid.t similarity index 100% rename from t/07_isJSON_valid.t rename to t/31_isJSON_valid.t diff --git a/t/08_isHTML_valid.t b/t/32_isHTML_valid.t similarity index 100% rename from t/08_isHTML_valid.t rename to t/32_isHTML_valid.t diff --git a/t/09_isJSON_severitylevel_valid.t b/t/33_isJSON_severitylevel_valid.t similarity index 100% rename from t/09_isJSON_severitylevel_valid.t rename to t/33_isJSON_severitylevel_valid.t From 191efddaeef7c191c795360879e3e572268ce4a5 Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 26 Nov 2020 13:07:49 +0100 Subject: [PATCH 2/3] document changes from previous commits --- t/Readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/Readme.md b/t/Readme.md index 56ba9c5..234c313 100644 --- a/t/Readme.md +++ b/t/Readme.md @@ -1,8 +1,8 @@ ### Naming scheme * 00-05: Does the bare testssl.sh work at all? -* 06-09: Does the reporting work at all? -* 20-39: Do scans work fine (client side)? +* 10-29: Do scans work fine (client side)? +* 30-39: Does reporting work? * 50-69: Are the results what I expect (server side)? Please help to write Travis/CI tests! Documentation can be found [here](https://perldoc.perl.org/Test/More.html). From 49d321cfbbcc94ce4adf870d56be8946d29cd35c Mon Sep 17 00:00:00 2001 From: Dirk Date: Thu, 26 Nov 2020 13:41:44 +0100 Subject: [PATCH 3/3] Add "command not found" --- t/10_baseline_ipv4_http.t | 4 ++-- t/11_baseline_ipv6_http.t.DISABLED | 4 ++-- t/21_baseline_starttls.t | 4 ++-- t/23_client_simulation.t | 4 ++-- t/31_isJSON_valid.t | 4 ++-- t/Readme.md | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/t/10_baseline_ipv4_http.t b/t/10_baseline_ipv4_http.t index 575a262..06d61ad 100755 --- a/t/10_baseline_ipv4_http.t +++ b/t/10_baseline_ipv4_http.t @@ -20,8 +20,8 @@ my $uri="google.com"; my $socket_out=""; my $openssl_out=""; # Blacklists we use to trigger an error: -my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal'; -my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem'; +my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found'; +my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found'; my $json_regex_bl='(id".*:\s"scanProblem"|severity".*:\s"FATAL"|"Scan interrupted")'; my $socket_json=""; diff --git a/t/11_baseline_ipv6_http.t.DISABLED b/t/11_baseline_ipv6_http.t.DISABLED index 2043f50..e8253f8 100755 --- a/t/11_baseline_ipv6_http.t.DISABLED +++ b/t/11_baseline_ipv6_http.t.DISABLED @@ -20,8 +20,8 @@ my $uri=""; my $socket_out=""; my $openssl_out=""; # Blacklists we use to trigger an error: -my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal'; -my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem'; +my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found'; +my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found'; # my $socket_json=""; # my $openssl_json=""; diff --git a/t/21_baseline_starttls.t b/t/21_baseline_starttls.t index efb795e..3182df8 100755 --- a/t/21_baseline_starttls.t +++ b/t/21_baseline_starttls.t @@ -23,8 +23,8 @@ my $uri=""; my $socket_out=""; my $openssl_out=""; # Blacklists we use to trigger an error: -my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal'; -my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem'; +my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found'; +my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found'; # my $socket_json=""; # my $openssl_json=""; diff --git a/t/23_client_simulation.t b/t/23_client_simulation.t index 60ab990..897df5d 100755 --- a/t/23_client_simulation.t +++ b/t/23_client_simulation.t @@ -18,8 +18,8 @@ my $uri=""; my $socket_out=""; my $openssl_out=""; # Blacklists we use to trigger an error: -my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal'; -my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem'; +my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found'; +my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found'; # my $socket_json=""; # my $openssl_json=""; diff --git a/t/31_isJSON_valid.t b/t/31_isJSON_valid.t index 26814b8..695da0c 100755 --- a/t/31_isJSON_valid.t +++ b/t/31_isJSON_valid.t @@ -14,8 +14,8 @@ my $uri=""; my $json=""; my $out=""; # Blacklists we use to trigger an error: -my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal'; -my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem'; +my $socket_regex_bl='(e|E)rror|\.\/testssl\.sh: line |(f|F)atal|(c|C)ommand not found'; +my $openssl_regex_bl='(e|E)rror|(f|F)atal|\.\/testssl\.sh: line |Oops|s_client connect problem|(c|C)ommand not found'; die "Unable to open $prg" unless -f $prg; diff --git a/t/Readme.md b/t/Readme.md index 234c313..272372b 100644 --- a/t/Readme.md +++ b/t/Readme.md @@ -6,5 +6,5 @@ * 50-69: Are the results what I expect (server side)? Please help to write Travis/CI tests! Documentation can be found [here](https://perldoc.perl.org/Test/More.html). -You can consult the existing code here. Feel free to use `20_baseline_ipv4_http.t` or `23_client_simulation.t` as a +You can consult the existing code here. Feel free to use `10_baseline_ipv4_http.t` or `23_client_simulation.t` as a template.