drwetter / testssl.sh

Testing TLS/SSL encryption anywhere on any port
https://testssl.sh
GNU General Public License v2.0
7.99k stars 1.03k forks source link

[BUG] Invalid JSON due to scanResult infos #2599

Open secinto opened 2 days ago

secinto commented 2 days ago

Before you open an issue please check which version you are running and whether it is the latest in stable / dev branch

I am running version (git log | head -1 if running from the git repo. Otherwise testssl.sh -v | grep from)

bb34248a75dec82dc5dd44f357a90c0809ed4a78

Before you open an issue please whether this is a known problem by searching the issues

Is related to / couldn't find anything

https://github.com/drwetter/testssl.sh/issues/2138

Command line / docker command to reproduce

Which was your command line? In addition the target of your scan would be helpful. If you don't want to disclose it publicly: grep SWCONTACT testssl.sh.

testssl.sh -oJ /checkfix/projects/xxxx.eu/work/ --assume-http --warnings off -6 https://share.xxxx.eu:443

Expected behavior

A clear and concise description of what you would expect to happen.

That it generates a valid JSON (containing the warnings and infos but in a correct manner). Instead the output looks like

          "version"     : "3.2rc3 ",
          "openssl"     : "OpenSSL 1.0.2-bad from Sep  1 14:03:44 2022",
          "startTime"   : "1730828381",
          "scanResult"  : [
                            {
                                "id"           : "optimal_proto",
                                "severity"     : "INFO",
                                "finding"      : "share.xxxx.eu:443 appears to support TLS 1.3 ONLY, switching from /checkfix/tools/testssl.sh/bin/openssl.Linux.x86_64 to /usr/bin/openssl automagically"
                           }          "clientProblem2" : [
                            {
                                "id"           : "engine_problem",
                                "severity"     : "WARN",
                                "finding"      : "No engine or GOST support via engine with your /usr/bin/openssl"
                           }
          ],
          {
                    "targetHost"      : "share.xxxx.eu",
                    "ip"              : "89.XXX.XXX.XXX",
                    "port"            : "443",
                    "rDNS"            : "web2.xxxx.eu.",
                    "service"         : "HTTP",

Your system (please complete the following information):

Additional context

Add any other context about the problem goes here.

drwetter commented 2 hours ago

Thanks for filing the issue.

However it worked for me with the latest and greatest:

image image

1) Can you try again please with the latest and greatest?

2) not sure where clientProblem2 all of a sudden comes from. I guess you copied it 1:1 but I rather would expected clientProblem1 first.

3) also: where is the problem with the JSON format in your case?