Testing TLS/SSL encryption anywhere on any port. https://testssl.sh/
Go to file
David Cooper 1311fe595b Massing testing with command line error
There is a bug in testssl.sh that occurs if mass testing is being performed, there is an error in the command line for one of the child tests, and either a single HTML file or a single JSON file is being created.

If mass testing is being performed and `parse_cmd_line()` detects an error in the command line for one of the child tests, then it will call `help()`, which will exit the program, resulting in `cleanup ()` being called. `cleanup ()` will call `html_footer()` and `fileout_footer()`. Since `html_header()` and `json_header()` have not yet been called, `$HTMLHEADER` and `$JSONHEADER` will both be `true, and so `html_footer()` and `fileout_footer()` will output HTML and JSON footers, even though no headers have been output.

This PR fixes the problem by having `help()` set `$HTMLHEADER` and `$JSONHEADER` to `false` so that no HTML or JSON footers are created.

A related problem is that if a single JSON file is being created, the parent process will insert a separator (a comma) into the JSON file between the outputs of each child process. However, if there is an error in one of the child process's command lines, then this child process will not produce any JSON output and so the JSON file will have two consecutive separators (commas), which is invalid according to http://jsonlint.com.

This PR provides a partial fix for the problem for parallel mass testing by checking whether a child process has created a non-empty JSON output before adding a separator to the JSON file. It leaves two unresolved problems:

* It does not fix the problem at all for `run_mass_testing()`, where the separator is added before the test with the command line error is run.

* It does not fix the problem for parallel mass testing for the case in which the first child test has a command line error.
2017-05-22 16:57:15 -04:00
bin Update Readme.md 2016-09-27 00:08:01 +02:00
etc Delete mapping.txt 2017-05-22 11:38:23 +02:00
t Delete 11_hpkp.t 2017-05-04 10:29:06 +02:00
utils changed to Linux 2017-05-15 20:53:09 +02:00
.gitignore update 2016-11-07 21:05:21 +01:00
.travis.yml Be more verbose in your error testing 2016-06-29 00:15:32 +02:00
CHANGELOG.stable-releases.txt Rename old.CHANGELOG.txt to CHANGELOG.stable-releases.txt 2015-09-03 15:15:36 +02:00
CREDITS.md update to also reflect dcooper16's work 2017-05-17 18:56:07 +02:00
LICENSE Initial commit 2014-07-01 13:55:26 +02:00
Readme.md update to also reflect dcooper16's work 2017-05-17 18:56:07 +02:00
openssl-rfc.mappping.html typo 2016-02-06 16:18:46 +01:00
testssl.sh Massing testing with command line error 2017-05-22 16:57:15 -04:00

Readme.md

Intro

Build Status Gitter

testssl.sh is a free command line tool which checks a server's service on any port for the support of TLS/SSL ciphers, protocols as well as some cryptographic flaws.

Key features

  • Clear output: you can tell easily whether anything is good or bad
  • Ease of installation: It works for Linux, Darwin, FreeBSD, NetBSD and MSYS2/Cygwin out of the box: no need to install or configure something, no gems, CPAN, pip or the like.
  • Flexibility: You can test any SSL/TLS enabled and STARTTLS service, not only webservers at port 443
  • Toolbox: Several command line options help you to run YOUR test and configure YOUR output
  • Reliability: features are tested thoroughly
  • Verbosity: If a particular check cannot be performed because of a missing capability on your client side, you'll get a warning
  • Privacy: It's only you who sees the result, not a third party
  • Freedom: It's 100% open source. You can look at the code, see what's going on and you can change it.
  • Heck, even the development is open (github)

Status

Here in the 2.9dev branch you find the development version of the software -- with new features and maybe some bugs. For the stable version and a more thorough description of the command line options please see testssl.sh or https://github.com/drwetter/testssl.sh/wiki/Usage-Documentation.

Compatibility

testssl.sh is working on every Linux/BSD distribution out of the box. In 2.9dev most of the limitations of disabled features from the openssl client are gone due to bash-socket-based checks. testssl.sh also works on otherunixoid system out of the box, supposed they have /bin/bash and standard tools like sed and awk installed. System V needs to have GNU versions of grep and sed installed. MacOS X and Windows (using MSYS2 or cygwin) work too. OpenSSL version >= 1 is a must. OpenSSL version >= 1.0.2 is needed for better LOGJAM checks and to display bit strengths for key exchanges.

Update notification here or @ twitter.

Features implemented in 2.9dev

  • Support of supplying timeout value for openssl connect -- useful for batch/mass scanning
  • TLS 1.2 protocol check via socket
  • Further tests via TLS sockets and improvements (handshake parsing, completeness, robustness)
  • Finding more TLS extensions via sockets
  • Using bash sockets where ever possible
  • TLS Supported Groups Registry (RFC 7919), key shares extension
  • Non-flat JSON support
  • File output (CSV, JSON flat, JSON non-flat) supports a minimum severity level (only above supplied level there will be output)
  • Native HTML support instead going through 'aha'
  • Testing 359 default ciphers (testssl.sh -e/-E) with a mixture of sockets and openssl. Same speed as with openssl only but addtional ciphers such as post-quantum ciphers, new CHAHA20/POLY1305, CamelliaGCM etc.
  • LUCKY13 and SWEET32 checks
  • Ticketbleed check
  • LOGJAM: now checking also for known DH parameters
  • Check for CAA RR
  • Check for OCSP must staple
  • Check for session resumption (Ticket, ID)
  • Better formatting of output (indentation)
  • Choice showing the RFC naming scheme only
  • Parallel mass testing

Further features planned in 2.9dev

https://github.com/drwetter/testssl.sh/issues?q=is%3Aopen+is%3Aissue+milestone%3A2.9dev

Contributions

Contributions, feedback, bug reports are welcome! For contributions please note: One patch per feature -- bug fix/improvement. Please test your changes thouroughly as reliability is important for this project.

There's a coding guideline.

Please file bug reports @ https://github.com/drwetter/testssl.sh/issues.

Documentation

For a start see the wiki. Help is needed here.

Bug reports

Please file bugs in the issue tracker. Do not forget to provide detailed information, see https://github.com/drwetter/testssl.sh/wiki/Bug-reporting. Nobody can read your thoughts -- yet. And only agencies your screen ;-)


External/related projects

Please address questions not specifically to the code of testssl.sh to the respective projects

Cool web frontend

mass scanner w parallel scans and elastic searching the results

Ready-to-go docker images are available at:

Brew package