mirror of
				https://github.com/drwetter/testssl.sh.git
				synced 2025-10-31 05:45:26 +01:00 
			
		
		
		
	Modified LFs
This commit is contained in:
		| @@ -17,7 +17,7 @@ my $error_regexp5='(syntax error|unexpected token)'; | ||||
| # my $good_regexp='free software.*USAGE w/o ANY WARRANTY.*OWN RISK.*Using.*ciphers.*built(.*)platform'; | ||||
| my $good_regexp='free software([\s\S]*)USAGE w/o ANY WARRANTY([\s\S]*)OWN RISK([\s\S]*)Using([\s\S]*)ciphers([\s\S]*)built([\s\S]*)platform'; | ||||
|  | ||||
| printf "\n%s\n", "Testing whether just calling \"./testssl.sh\" produces no error ..."; | ||||
| printf "\n%s\n", "Testing whether just calling \"./testssl.sh --banner\" produces no error ..."; | ||||
| $fileout = `timeout 10 bash ./testssl.sh --banner 2>&1`; | ||||
| my $retval=$?; | ||||
|  | ||||
|   | ||||
| @@ -3,7 +3,7 @@ | ||||
| use strict; | ||||
| use Test::More tests => 1; | ||||
|  | ||||
|  | ||||
| printf "\n%s\n", "Testing whether CA certificates are newer than \"~/etc/ca_hashes.txt\" ..."; | ||||
| my $newer_bundles=`find etc/*.pem -newer etc/ca_hashes.txt`; | ||||
| is($newer_bundles,"","List of CA bundles newer then etc/ca_hashes.txt should be empty. If not run utils/create_ca_hashes.sh");  | ||||
| done_testing; | ||||
| is($newer_bundles,"","List of CA bundles newer then etc/ca_hashes.txt should be empty. If not run utils/create_ca_hashes.sh"); | ||||
| done_testing; | ||||
|   | ||||
| @@ -21,8 +21,10 @@ die "Unable to open $prg" unless -f $prg; | ||||
|  | ||||
| my $uri="cloudflare.com"; | ||||
|  | ||||
| printf "\n%s", "Unit testing JSON output ..."; | ||||
|  | ||||
| #1 | ||||
| printf "\n%s\n", "Unit testing plain JSON output --> $uri ..."; | ||||
| printf "%s\n", ".. plain JSON output --> $uri "; | ||||
| $out = `./testssl.sh $check2run --jsonfile tmp.json $uri`; | ||||
| $json = json('tmp.json'); | ||||
| unlink 'tmp.json'; | ||||
| @@ -31,7 +33,7 @@ is(@errors,0,"no errors"); | ||||
| $tests++; | ||||
|  | ||||
| #2 | ||||
| printf "\n%s\n", "Unit testing pretty JSON output --> $uri ..."; | ||||
| printf "%s\n", ".. pretty JSON output --> $uri "; | ||||
| $out = `./testssl.sh $check2run --jsonfile-pretty tmp.json $uri`; | ||||
| $json = json('tmp.json'); | ||||
| unlink 'tmp.json'; | ||||
| @@ -43,7 +45,7 @@ $tests++; | ||||
| #3 | ||||
| # This testss.sh run deliberately does NOT work as travis-ci.org blocks port 25 egress. | ||||
| # but the output should be fine. The idea is to have a unit test for a failed connection. | ||||
| printf "\n%s\n", "Checking plain JSON output for a failed run '--mx $uri' ..."; | ||||
| printf "%s\n", ".. plain JSON output for a failed run '--mx $uri' ..."; | ||||
| $out = `./testssl.sh --ssl-native --openssl-timeout=10 $check2run --jsonfile tmp.json --mx $uri`; | ||||
| $json = json('tmp.json'); | ||||
| unlink 'tmp.json'; | ||||
| @@ -53,7 +55,7 @@ $tests++; | ||||
|  | ||||
| #4 | ||||
| # Same as above but with pretty JSON | ||||
| printf "\n%s\n", "Checking pretty JSON output for a failed run '--mx $uri' ..."; | ||||
| printf "%s\n", ".. pretty JSON output for a failed run '--mx $uri' ..."; | ||||
| $out = `./testssl.sh --ssl-native --openssl-timeout=10 $check2run --jsonfile-pretty tmp.json --mx $uri`; | ||||
| $json = json('tmp.json'); | ||||
| unlink 'tmp.json'; | ||||
| @@ -63,7 +65,7 @@ $tests++; | ||||
|  | ||||
| #5 | ||||
| my $uri = "smtp-relay.gmail.com:587"; | ||||
| printf "\n%s\n", " Unit testing plain JSON output --> $uri ..."; | ||||
| printf "%s\n", " .. plain JSON output --> $uri ..."; | ||||
| $out = `./testssl.sh  --jsonfile tmp.json $check2run -t smtp $uri`; | ||||
| $json = json('tmp.json'); | ||||
| unlink 'tmp.json'; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dirk Wetter
					Dirk Wetter