Commit Graph

2844 Commits

Author SHA1 Message Date
a85073bf0d Fix checks for whether X25519 and X448 are supported
In some cases OpenSSL returns an "unsupported" message rather than a "not found" message if X25519 and X448 are not supported. This commit changes the check for whether X5519 and X448 are supported for checking for either response.
2025-01-21 09:10:33 -08:00
11d7979f41 Support draft-kwiatkowski-tls-ecdhe-mlkem and draft-tls-westerbaan-xyber768d00
This commit adds support for the three code points in draft-kwiatkowski-tls-ecdhe-mlkem and the code point 0x6399 from draft-tls-westerbaan-xyber768d00. The group 0x6399 uses a pre-standard version of Kyber and is considered obsolete.
2025-01-21 09:00:21 -08:00
355b9d2dcc add fix to sockets and move test after original one 2025-01-20 17:27:31 +01:00
95b6258f82 Fix #2614
Currently `compare_server_name_to_cert()` only indicates whether the server's host name matches a wildcard name in the certificate. So, it does not indicate if the certificate includes a wildcard name that does not match the server's host name. As a result, if a certificate includes the names "api.sub.example.tld" and "*.api.sub.example.tld," then a wildcard certificate warning will be issued for host names such as www.api.sub.example.tld, but not for api.sub.example.tld.

This commit changes `compare_server_name_to_cert()` to indicate whether the certificate is a wildcard certificate in addition to providing information about how the certificate matches the server's host name. Functions that use this function's response are then changed to extract the information they need (matching or wildcard) from the return value.
2025-01-17 05:43:39 -08:00
2ae28d7f64 fix curves findings in TLS1.2 and prior versions 2025-01-17 12:03:34 +01:00
8000885371 Add more security headers
... and deprecate "X-Content-Security-Policy" and "X-WebKit-CSP"
2025-01-16 21:18:47 +01:00
8e184b886e Fix #2615
The server mentioned in #2615 has a bug, which results in it sending a handshake_failure alert rather than a successful connection if the signature_algorithms extension lists RSA+MD5 before one of the signature algorithms that it supports.

This commit works around this issue by reversing the order in which it lists the signature algorithms in the signature_algorithms extension, thus (generally) listing stronger options first.

This change should not affect the testing, except that it will result in the order of the supported signature algorithms being reversed in the output, if the server respects the client's preferences.
2025-01-16 06:55:54 -08:00
5f4ca15e57 Merge branch '3.2' into links 2025-01-06 15:41:16 +01:00
b708026151 Change orga from drwetter --> testssl
... to avoid redirects on the client side and to make repo migration better visible.

Also amend 'Status' and 'Contributing' in Readme.md. bluesky added, albeit mastodon
seems more interactive. Clarify twitter account is not in use anymore.
2025-01-06 15:34:45 +01:00
6c17b66418 CI fix : Cleanup
testssl.sh worked as expected.
Under the hood, broken pipes are expected as part of the fast loop exit
strategy that relies as little as possible on timeout detection.
But under the CI, testssl.sh output is garbled by the subshells stderr
outputs, catched for some reason by 'prove -v'.
Simply redirecting the stderr output of the offending command to
/dev/null fixes the problem.
2024-12-09 14:19:56 +01:00
88856ecad5 2nd try 2024-12-09 12:00:16 +01:00
f39408086b Merge branch '3.2' into client-renego-refactoring 2024-12-09 11:03:42 +01:00
e4e3afbbe8 Tentative to fix CI tests 2024-12-09 10:46:45 +01:00
701c606eac Merge pull request #2597 from Tazmaniac/quick-fix-2590
Quick fix for #2590
2024-11-27 11:39:25 +01:00
26a3a8fd51 Fix #2599
This commit fixes #2599 by not wrapping fileout() messages in a "clientProblem" wrapper if TLS13_ONLY is set. The TLS13_ONLY flag being set is an indicator that fileout_banner() has already been called.
2024-11-26 09:13:11 -08:00
991c1fefb2 One tab fix 2024-11-07 12:25:50 +01:00
1aaab67e81 Multiple IP fix and simple not vulnerable printing case recover
- Recover the "not vulnerable" case (no mitigation) printing, cosmetic
  fix.
- With the removing of all s_client invocation other than the main loop
  one, fix the init of the ERRFILE and TMPFILE: no need to append, no
  need to remove, inconditionally zap the content before the loop.
2024-11-05 12:59:01 +01:00
7625422976 Spell fix 2024-11-04 21:02:03 +01:00
5773303f23 Correct incomplete commit 2024-11-04 20:59:45 +01:00
d8b439e48c Address a theorically still possible non HTTP case 2024-11-04 20:53:07 +01:00
09719a322b Remove the last 1s euristic
In the wait loop, I was relying on a 1s sleep to eliminate a possible
late zero return value server close on the last attempt.
- do globaly one more harmless "for" iteration
  and remove the sleep 1 for faster and more robust result
- correct the non HTTP case iteration value
- adjust the timeout to the conservative 6s in the non HTTP case,
  for HTTP case it become 33s
- improve comments
2024-11-04 20:25:31 +01:00
dab177fda9 Big client renego cleanup / refactoring
All cases could be handled by the single openssl s_client invocation
loop:
- dispatch and adjust comments to not loose them
- remove the first s_client invocation: stuck connections are allready
  handled by the main loop
- remove the second s_client invocation: normal case and server closed
  connections are allready handled by the main loop. The loop take care
  of the race between server connection close and s_client terminating
  too by doing another loop run, not closing STDIN.
- special non HTTP case equivalent to ssl_reneg_attempts=2
- specialcase only the HTTP result printing to not change the output

- openssl-timeout option clashe badly with the main loop logic:
  Introduce $OPENSSL_NOTIMEOUT
2024-11-04 17:27:18 +01:00
601dddd388 Quick fix for #2590
Proper fix need another refactoring/cleanup of the renego test.
2024-11-04 11:38:18 +01:00
245ad2ae4a Merge pull request #2592 from dcooper16/integrity_only_ciphersuites
Support RFC 9150 cipher suites
2024-10-29 00:35:34 +01:00
e17b1c17bb Support RFC 9150 cipher suites
This commit adds support for the two cipher suites in RFC 9150, TLS_SHA256_SHA256 and TLS_SHA384_SHA384. These are authentication and integrity-only cipher suites.
2024-10-28 15:07:22 -07:00
3c54474061 Support LibreSSL 4.0.0
LibreSSL 4.0.0 was recently released. This commit modified the version check in determine_trust() so that there isn't an incorrect warning suggesting that LibreSSL 4.0.0 "<= 1.0.2 might be too unreliable to determine trust."
2024-10-25 12:24:06 -07:00
1f37a8406f Accept stapled OCSP responses that use SHA-256 in CertID
This commit modifies check_revocation_ocsp() to check the revocation status of a certificate in a stapled OCSP response whether the response uses SHA-1 or SHA-256 in CertID.
2024-10-16 10:49:40 -07:00
0abca6f067 Mute socat killing & improve STARTTLS grading explanation
Fixes #2582 .
2024-10-15 10:56:29 +02:00
33fd749af8 Fix json/csv output when STARTTLS problem is passed back
In rare cases testssl.sh writes in the terminal output "likely not offered" but
misses the "likely" in the json/csv output.

This fixes #2575 by adding that word and amending the return value 4 with
a comment.
2024-10-14 16:15:18 +02:00
fa5664f434 Polish comment + grade cap reason for STARTTLS 2024-10-14 14:17:02 +02:00
7c0ccb3da7 Fix HTML output in #2568 2024-10-14 13:08:45 +02:00
6c771f7902 Merge branch '3.1dev' of https://github.com/magnuslarsen/testssl.sh into magnuslarsen-3.1dev 2024-10-14 13:03:46 +02:00
6110843fd0 The F5 cookie decoder doesn't detect IPs in the 10.x.x.x space for non-encrypted cookies.
This fixes the regex pattern, see also

https://github.com/drwetter/F5-BIGIP-Decoder/pull/4/files
2024-10-09 15:47:50 +02:00
69bdbeb982 feat(rating): line-wrapping comments for grade_cap_reasons 2024-09-18 09:08:07 +02:00
b5427e3006 Bump version to 3.2rc4 2024-09-08 16:32:19 +02:00
04c5ee391d "only" was important here 2024-09-08 13:19:16 +02:00
4ce91d7d61 Explain OSSL_SHORTCUT better, "automagically" is the word we wanted to use 2024-09-08 12:27:51 +02:00
be3e7651bb Merge pull request #2564 from drwetter/starttls_phrasing
Phrasing of reason for STARTTLS grading improved
2024-09-07 17:08:50 +02:00
3b85f53d52 added an accidently erased char 2024-09-07 16:15:03 +02:00
a1c67c0794 proper English 2024-09-07 16:03:53 +02:00
f9edaa7fe1 Phrasing of STARTTLS grading improved
... a a comment added in the desciption.

Unfortunately I couldn't get the line wrapping working.
2024-09-07 15:51:12 +02:00
3d2bd5020c fix spellcheck 2024-09-06 13:00:27 +02:00
12bc15adc3 misc
- remove 1xLF in UI
- fix obsolete statment for OPENSSL2
2024-09-06 12:53:00 +02:00
becd310390 Address open UI problems for TLS 1.3 only hosts
While in 3.2 there was only a hint how to deal with TLS 1.3 only hosts, a restart
with --openssl=/usr/bin/openssl or setting of OSSL_SHORTCUT-true was required.

This PR changes the behavior: if an openssl version can be found in /usr/bin/openssl
(or SUPPLIED via OPENSSL2=/home/version/ofopenssl testssl <cmdline>) which
supports TLS 1.3 it switches automatically and informs the user that it has done so.
   This message is asynchonous and is implemented with a new function check_msg()
and a global OPEN_MSG, so that we maintain the formatting. Otherwise it would have
appeared between rDNS and service detection. Now it's nicely after service detection.
2024-09-06 12:47:03 +02:00
a20fd796e8 Merge pull request #2552 from drwetter/fix_2466
Trailing space after value in header is fine
2024-09-03 20:51:18 +02:00
031c2a55ec Merge pull request #2553 from drwetter/noCtrlCharInHeader
Remove crtl chars from HTTP header
2024-09-03 20:50:18 +02:00
2b36b33112 Remove crtl chars from HTTP header
... which fixes #2337
2024-09-03 19:24:46 +02:00
30a33e9a6e Trailing space after value in header is fine
This fixes #2466.
2024-09-03 19:10:29 +02:00
dbb8fc8013 Fix CI 2024-09-03 18:28:56 +02:00
5a1fd2623f Improve banner (3.2)
... for readability and bugs to be filed (fixes #2506)

This PR defines a short string for the OpenSSL banner as some suppliers have made them (unnecessarily) long so that it won't fit nice in the banner anymore.

The banner also now omits the built line from openssl as for the user it is normally not important.
2024-09-03 15:40:55 +02:00