summaryrefslogtreecommitdiffstats
path: root/t/11_baseline_ipv6_http.t.DISABLED
diff options
context:
space:
mode:
Diffstat (limited to 't/11_baseline_ipv6_http.t.DISABLED')
-rwxr-xr-xt/11_baseline_ipv6_http.t.DISABLED61
1 files changed, 61 insertions, 0 deletions
diff --git a/t/11_baseline_ipv6_http.t.DISABLED b/t/11_baseline_ipv6_http.t.DISABLED
new file mode 100755
index 0000000..affa18a
--- /dev/null
+++ b/t/11_baseline_ipv6_http.t.DISABLED
@@ -0,0 +1,61 @@
+#!/usr/bin/env perl
+
+# disabled as IPv6 is not supported by Travis, see https://github.com/drwetter/testssl.sh/issues/1177
+
+# Just a functional test, whether there are any problems on the client side
+# Probably we could also inspect the JSON for any problems for
+# "id" : "scanProblem"
+# "finding" : "Scan interrupted"
+
+use strict;
+use Test::More;
+use Data::Dumper;
+# use JSON;
+# if we need JSON we need to comment this and the lines below in
+
+my $tests = 0;
+my $prg="./testssl.sh";
+my $check2run ="-p -s -P --fs -S -h -U -q --ip=one --color 0";
+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|(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="";
+# $check2run="--jsonfile tmp.json $check2run";
+
+die "Unable to open $prg" unless -f $prg;
+
+$uri="testssl.net";
+
+# unlink "tmp.json";
+printf "\n%s\n", "Baseline unit test IPv6 via sockets --> $uri ...";
+$socket_out = `./testssl.sh $check2run -6 $uri 2>&1`;
+# $socket_json = json('tmp.json');
+unlike($socket_out, qr/$socket_regex_bl/, "");
+$tests++;
+
+# unlink "tmp.json";
+printf "\n%s\n", "Baseline unit test IPv6 via OpenSSL --> $uri ...";
+$openssl_out = `./testssl.sh --ssl-native $check2run -6 $uri 2>&1`;
+# $openssl_json = json('tmp.json');
+# With Google only we encounter an error as they return a 0 char with openssl, so we white list this pattern here:
+$openssl_out =~ s/testssl.*warning: command substitution: ignored null byte in input\n//g;
+unlike($openssl_out, qr/$openssl_regex_bl/, "");
+$tests++;
+
+
+done_testing($tests);
+unlink "tmp.json";
+
+
+
+sub json($) {
+ my $file = shift;
+ $file = `cat $file`;
+ unlink $file;
+ return from_json($file);
+}