Commit Graph

2617 Commits

Author SHA1 Message Date
Emmanuel Fusté
4cc02a63ef One more spell fix... 2024-01-19 17:09:44 +01:00
Emmanuel Fusté
02a3c2cc14 Fixed regression in printing results
And improve it with the effective number of renego before disconnection
as it is now tracked.
2024-01-19 16:22:50 +01:00
Dirk Wetter
ad04a90b2a
Merge pull request #2459 from Tazmaniac/client-renego-fix
Secure Client-Initiated Renegotiation : fixes/enhancements
2024-01-18 18:37:58 +01:00
Emmanuel Fusté
67c362c89a One more spell fix 2024-01-15 10:07:09 +01:00
Emmanuel Fusté
de364b0c84 Introduce SSL_REGEG_WAIT and reduce wait to 0.25s
Reduce wait between reneg test to 0.25s. Still robust and accelerates
the test as now we do up to 10 renego tests.

With the global loop timeout, the backoff identification seem unneeded.
But if we switch to 0.25s, we no longuer trigger the global timeout so
it is still valuable.
Adjust write out messages as bash do not support floating point number
arithmetic.
2024-01-12 11:30:35 +01:00
Emmanuel Fusté
9b79e3917a Bump SSL_RENEG_ATTEMPTS=10 for Stormshield
Stormshield allows 9x and then blocks. So then 10x should be tested.
Example: https://ems.ocapiat.fr
2024-01-11 18:34:47 +01:00
Emmanuel Fusté
b793f54c3e Add timeout for the client initiated renego loop
Some site hang/block the connection after some renego reties
Example: https://feedback.amadeus.com

Hand written timeout logic because:
- we want to get the result of the command in case of normal exit
- we want to have working log fd redirection
- we want to known the timeout condition
2024-01-11 18:30:44 +01:00
Emmanuel Fusté
d30d8e09f2 tab/space corrections and "grep -ac" in place of "grep -a | wc -l" 2024-01-10 18:31:41 +01:00
Dirk Wetter
810e870d16
Merge pull request #2454 from Odinmylord/3.2
Make cert_keysize output consistent
2024-01-10 12:21:42 +01:00
Odinmylord
e404cf8bdb add utf8 support to intermediate cert names 2024-01-03 14:27:11 +01:00
Odinmylord
f4b1bb28a0 Update certificate_info function to include key algorithm in error messages 2024-01-02 14:06:18 +01:00
Dirk Wetter
3f9cc7b6a5
Merge pull request #1871 from dcooper16/quit_on_cmd_line_errors
Quit testssl.sh on all command line errors
2023-12-24 15:34:00 +01:00
Dirk Wetter
bbf770ac7f
Merge pull request #2447 from Odinmylord/3.2
Add Brainpool signature algorithms to output
2023-12-24 14:00:42 +01:00
Dirk Wetter
c5265e33b7 fix wrong temp file var 2023-12-23 13:13:16 +01:00
Dirk Wetter
3b5f2022b3 fix typo 2023-12-23 13:03:57 +01:00
Dirk Wetter
8e517e0a70 Bail out if user error bc of umask
If a user chose a broken umask testssl.sh will start but emits
subsequent errors.

This patch adds two sanity checks whether it is allowed to create
and read files in the temp directory.

Fixes #2449
2023-12-23 12:58:05 +01:00
Odinmylord
90272f1d12 Add Brainpool signature algorithms to output 2023-12-13 14:23:28 +01:00
Emmanuel Fusté
2c84a525cc Fix mitigation detection with debug level 0 2023-12-07 18:58:58 +01:00
Emmanuel Fusté
52c6ac7fec Spell fix. 2023-11-28 15:22:01 +01:00
Emmanuel Fusté
429db592e2 Crudely detect exponential backoff as a mitigation 2023-11-28 14:41:25 +01:00
Dirk
81ba1fe818 Implement warning for wildcard match
fixes #2122
2023-11-10 15:37:13 +01:00
David Cooper
e867e53ff9 Quit testssl.sh on all command line errors
As suggested in #1844, this commit changes testssl.sh so that the parent process quits immediately if there is an error in the command line for one of the child processes.

Currently, a signal is sent to the parent process to quit if the child process encounters an error and calls help(), but sometimes parse_cmd_line() just prints an error message and calls fatal() rather than help(), in which case the parent process does not stop. This commit addresses the issue by creating a new function, fatal_cmd_line(), which is almost the same as fatal(), but additionally sends a signal to the parent indicating that the parent should stop. This commit also changes calls to fatal() to calls to fatal_cmd_line() if json_header(), csv_header(), html_header(), or prepare_logging() encounter a problem. The same is done if prettyprint_local() with the command-line option provided for it.

There may be other places in which it would be appropriate to call fatal_cmd_line() rather than fatal() (e.g., in parse_hn_port() or check_proxy()), but those changes are not made in this commit.
2023-11-01 11:55:06 -07:00
Dirk
cbb32d375b Fix output: PROXY string vs $PROXY variable
See also #2428.
2023-10-30 21:39:30 +01:00
Dirk
a9103fdfee Put the redirection into the right spot 2023-10-30 15:27:37 +01:00
Dirk
92b28c5f1c Fix weird bash globbing #2429
What was problematic was the error message when the certificate
stores were missing. This fixes it by redirecting the error
message to /dev/null so that if the sub function detects the missing
file it returns with an error by the program and not by executing
"basename"
2023-10-30 15:11:10 +01:00
Dirk
b21c5ee780 Add IP protocol to debug msg 2023-10-11 15:22:46 +02:00
Dirk Wetter
f50a958fa9
Merge pull request #2417 from vsbs-david/local_hostname_drill
Added drill command to get_a[aaa]_record() for local hostname
2023-10-11 15:19:44 +02:00
vsbs-david
3f7428083e
Used debugme function 2023-10-11 09:26:43 +02:00
vsbs-david
cbefcf0feb
Fixed redirect stderr to /dev/null, added debug echo for mDNS resolution failure, fixed some spelling 2023-10-10 13:55:34 +02:00
vsbs-david
b8f770dbe3
Added drill command to get_a[aaa]_record() for local hostname 2023-10-10 09:05:48 +02:00
Dirk Wetter
bdeda3ab1c Bump version number 2023-10-09 22:51:44 +02:00
Geert Hendrickx
e09e2c519c Fix SMTP detection.
Extended regex was missing -E.
2023-10-07 14:15:40 +02:00
Geert Hendrickx
16e6826225 Improve detection for POP3 and IMAP. 2023-10-07 13:56:39 +02:00
Dirk Wetter
65da627820 better English 2023-10-03 15:56:18 +02:00
Dirk Wetter
d46301e9f7 Deprecate --ssl-native 2023-10-03 15:51:58 +02:00
Dirk Wetter
2acffa5a3f fix spellcheck issues 2023-10-03 15:06:46 +02:00
David Cooper
06e7205687 Support OpenSSL with no TLSv1
RFC 8996, Deprecating TLS 1.0 and TLS 1.1, states that TLS clients MUST NOT send a TLS 1.0 or TLS 1.1 ClientHello and MUST respond to a TLS 1.0 or TLS 1.1 ServerHello with a "protocol_version" alert.

At the moment, all versions of OpenSSL support TLS 1.0, TLS 1.1, and TLS 1.2. However, TLS 1.0 and TLS 1.1 are disabled in LibreSSL 3.8.1 and it is possible to compile OpenSSL without support for these protocols (using the configure options no-tls1, no-tls1_1, and no-tls1_2). This commit adds support for versions of $OPENSSL that do not support TLS 1.0 or TLS 1.1.
2023-09-07 07:26:48 -07:00
Dirk Wetter
765b5855cc
Merge pull request #2386 from drwetter/strict_parsing_HSTS
Strict parser for HSTS
2023-08-28 19:55:57 +02:00
Dirk
01ab3acde5 Strict parser for HSTS
As suggested in #2381 this parses strictly the value for mag-age
in the HSTS header line. While it is implemented only in run_hsts()
it could be extracted to a separate functioni in the future and used
elsewhere too.

The improvement is more strict and catches e.g. '==' signs and issues
a warning. See https://www.rfc-editor.org/rfc/rfc6797#section-6.1.1 .

Also it is picky regarding quotes now which are only allowed enclosing
the value.
2023-08-28 18:33:41 +02:00
Dirk Wetter
c55207d45c
Merge pull request #2385 from drwetter/hide_fast
Hide --fast option in help() and issue a warning when it's used
2023-08-28 18:26:36 +02:00
Dirk
0fcddff1cd Warn when using --fast
... in the terminal only for now.
2023-08-28 16:08:04 +02:00
Dirk
d19675136a Deprecating $FAST / --fast
As this option shows inconsistencies / wrong results and a fix would require
too much work at this moment this option is being hidden from the help. It
wasn't in the ~/doc .

See #849 , #2382, #1732 etc.
2023-08-28 15:53:02 +02:00
Dirk
79577a84eb Introducing variable OPENSSL2_HAS_TLS_1_3
If we run with supplied binary AND /usr/bin/openssl supports TLS 1.3
we now have a variable OPENSSL2_HAS_TLS_1_3 which is set to true.

It can be used for subsequent changes where we need TLS 1.3 for or
where it would be better to use TLS 1.3.
2023-08-28 15:42:17 +02:00
Geert Hendrickx
38a09d342c
Fix another grep-3.8 warning on needlessly escaped exclamation mark.
See also #2241 and #2242.
2023-08-28 13:55:46 +02:00
Dirk
858f00304c tiny clarification in debug mode 2023-06-02 16:57:47 +02:00
Dirk
6e2b9ae1c6 Make clear where the parsing error comes from: SSL or TLS 2023-06-02 16:43:27 +02:00
teki69
eb76fd08cb
Adds a warning when downloaded CRL is PEM format 2023-05-23 11:37:03 +02:00
teki69
ebcb5554a8
Fix CRL conversion issue when already in PEM format
If downloaded CRL file is already in PEM format, openssl command will fail as it is always trying to convert from a DER-encoded CRL. 
This commit is for adding a test of the CRL format prior to running the openssl crl conversion. 

Note: as the openssl verify command then assumes that a .pem tmpfile has been generated by the conversion, there would be an issue when the conversion was not needed (i.e. CRL already PEM-encoded) as that .pem would be missing; therefore I also added a copy of the .crl file to a .crl.pem file before the optional conversion.
2023-05-22 17:10:25 +02:00
Dirk Wetter
9b8dc3a07e Fix misleading output
... when instructed to do no DNS queries at all
2023-05-16 09:05:04 +02:00
mum-viadee
22a4f52774 Clarify comment, redone 2023-05-15 15:20:54 +02:00