Improve emphasize_stuff_in_headers() by matching more than one digit at a time.
The primary benefit of this change is in the HTML, since it does not result in each digit being wrapped by <span style="color:#8a7237;">...</span>
testssl.sh shouldn't issue command line warnings about the target not being a server name (or the use of "--fast" or "--ssl-native") when the command line includes the "--local" option.
This commit adds missing declarations for local variables, so that they are not mistakenly treated as globals. It also changes one global variable (single_cipher) to uppercase and deletes two lines in run_cipher_match() that were not doing anything.
run_freak() and run_logjam() were using the color functions $magenta and $off (from set_color_functions()) in the sting $addtl_warning. This worked okay for the terminal output, but not for the HTML output or fileout().
This commit fixes run_freak() and run_logjam() by using pr_warning() for the terminal and HTML output and plaintext for fileout().
This commit also deletes the unused color functions from set_color_functions() and adds a note discouraging the use of the color functions that are still defined there.
Rewrite so that the function does not make use of $yellow, $brown, or $off. This avoids the need to repeat all of the headers for terminal and HTML output, and it also allows for case insensitive matching.
This commit fixes Shellcheck issue SC2076 by not quoting the right-hand-side of "=~" expressions. In the case of lines 22812 and 22939, this commit fixes a bug as the right-hand-side needs to be evaluated as a regular expression.
* Run perl -c on every t/*.t file as a fast pre-check before prove.
* Add Perl::Critic (a curated policy set) and perltidy --check for the Perl test code — the repo lints its bash with shellcheck but has zero linting for its Perl.
* Add Test::NoWarnings (and/or Test::Fatal) to the test harness so warnings/exceptions in the code under test fail the build.
Not yet sure about using the hash / SHA-pinning. To be reconsidered later
As reported in #3128, there are a few instances in which `jsonID` is used, but is not declared as a `local` variable. This commit fixes that problem.
In addition, for consistency, it changes `run_sweet32()` to use `$jsonID` rather than the hard coded string "SWEET32".