184 Commits

Author SHA1 Message Date
Dirk Wetter
56c1e58567 Mask IP addresses, change host, compression
... for t/32_isHTML_valid.t .

Github.com seems to be most reliable from the ones tested so far.

bahn.de has one IP to the outside however Session resumption seems
to come from different hosts behind that IP. Bad choice for this
test.
2025-07-28 15:03:51 +02:00
Dirk Wetter
faa190354e Pick different host + openssl
* host is bahn.de
* debug message said Your ./bin/openssl.Linux.x86_64 doesn't support X25519 --> use /usr/bin/openssl
* skip debug msg check for Mac
2025-07-23 14:45:34 +02:00
Dirk Wetter
b7584ea93a correct comment, update vulnerablites to include IDS friendly ones 2025-07-23 14:43:41 +02:00
Dirk Wetter
2c871f9ffa Pick another host for unit tests
heise.de seems too often run into to timeouts when doing
this unit test. Thus it is being changed to web.de, hoping
it works better.
2025-07-21 11:49:03 +02:00
Dirk Wetter
a4953d6e22 Redo PR for Opossum
Fixes #2833

This does a check for the opossum vulnerability, see https://opossum-attack.com/ .

It uses a separate function to send the payload and retrieve the result via `http_header_printf()`.  It doesn't use curl or wget. The latter wouldn't work anyway as according to the manpage as the HTTP header which needs to be sent must not contain LFs.  This function was introduced because `http_get_header()` -- which was renamed to `http_head()` -- could use wget if curl is not available. On the way to this PR `http_head()` was improved, so that timeouts were used for curl and wget for better maturity.

`http_header_printf()` now uses bach sockets , strips the URI so that a plaintext request is made. This will be done in the background because not every host will answer.

Done also:
- handling when PROXY is requested (try anyway directly as the payload is not "proxyable")
- print a message when no HTTP service is present
- try hard to use plaintext HTTP when auth is required for HTTPS and service HTTP would not be defined otherwise
- manpages
- help

Also when pwnedkeys are checked a not pwned certificate is labled not neutral but OK=green.
2025-07-12 20:59:50 +02:00
Dirk
1f9aa8008d For Mac: use homebrew's openssl
... so that we have a comparison between OpenSSL and LibreSSL. Otherwise this test would be completely futile for MacOS.
Also change the displayed text.

See #2832 (which was for 3.2)
2025-07-10 13:19:46 +02:00
Dirk Wetter
d74c1bbaee add QUIC line for testssl.sh server 2025-07-03 22:34:43 +02:00
Dirk Wetter
8a665e9dce Fix 52_ocsp_revoked (OCSP --> CRL) 2025-07-03 16:56:28 +02:00
Dirk Wetter
61947405e0 Fix missing issuer CN
This fixes a problem which was introduced @ 8d8f83ace507db6a699acb4901d1329f31731a04.
It caused for some hosts not to parse / display the issuer CN correctly.

Also it adds some code in testssl.sh and in a unit test to detect
this earlier. In general an output string FIXME will now cause a
unit test to fail. This can + should be used at other places too!

Fixes #2789
2025-06-10 22:54:11 +02:00
Dirk Wetter
ba360bae7e remove extra quote sign 2025-05-28 10:21:10 +02:00
Dirk Wetter
7183bb1206 Add changed headers at target ...
... so that runners pass
2025-05-27 22:48:04 +02:00
Dirk Wetter
1fb3a2224f Ensure that stderr is caught / $prg=testssl.sh
As suggested in #2780 this PR redirects all stderr on a perl level
to stdout so that we should see all errors which we miss because
we can't redirect (>/dev/null in check) or we haven't redirected yet.

Also old checks are imporved, so that $prg is used as in newer
checks.
2025-05-27 10:54:25 +02:00
Dirk Wetter
d0143b181b Handle space problem 2025-05-20 10:48:54 +02:00
Dirk Wetter
a685fc252d Take shorter OPenSSL cipher name into account
AEAD-CHACHA20-POLY1305-SHA256    vs.
TLS_CHACHA20_POLY1305_SHA256
2025-05-19 13:52:03 +02:00
Dirk Wetter
c109cafa17 Merge branch '3.2' into mac_runner 2025-05-16 18:16:58 +02:00
Dirk Wetter
4db9cb5afe Unify ECDH bitlength 2025-05-14 14:07:07 +02:00
Dirk Wetter
5e888ff7ee rename TLS 1.3 ciphers when using LibreSSL 2025-05-14 10:28:59 +02:00
Dirk Wetter
18c4428cf4 elSif 2025-05-09 08:53:17 +02:00
Dirk Wetter
42f738572b fix spelling error 2025-05-08 23:10:24 +02:00
Dirk Wetter
5f471c76ee Numbering the checks 2025-05-08 23:08:59 +02:00
Dirk Wetter
042b0c160a Naming checks, exempt two checks for MacOS 2025-05-08 23:06:51 +02:00
Dirk Wetter
ac49e2e12b Remove engine problem line
as it may contain the openssl path
2025-05-08 19:15:56 +02:00
Dirk
2557d2151b Add line 2025-05-08 18:49:51 +02:00
Dirk Wetter
a9d469d12a renumber tests properly 2025-05-08 14:44:33 +02:00
Dirk Wetter
17acd2a256 Better phrasing 2025-05-08 14:30:13 +02:00
Dirk Wetter
916d607e5b Number each check 2025-05-08 14:18:30 +02:00
Dirk Wetter
f9e9443cac Number each check / make it work under MacOS 2025-05-08 14:17:01 +02:00
Dirk Wetter
05818928a0 Number each check / make it work under MacOS 2025-05-08 14:13:01 +02:00
Dirk
f09f742ee3 fix gh action
Not sure why this has been triggered though.

 #   Failed test 'Check whether CSV output matches baseline file from testssl.sh'
 #   at t/61_diff_testsslsh.t line 57.
 #
 # %s
 # @@ -1,5 +1,4 @@
 #  "id","fqdn/ip","port","severity","finding","cve","cwe"
 # -"engine_problem","/","443","WARN","No engine or GOST support via engine with your ./bin/openssl.Linux.x86_64","",""
 #  "service","testssl.sh/81.169.166.184","443","INFO","HTTP","",""
 #  "pre_128cipher","testssl.sh/81.169.166.184","443","INFO","No 128 cipher limit bug","",""
 #  "SSLv2","testssl.sh/81.169.166.184","443","OK","not offered","",""
 # Looks like you failed 1 test of 1.
 t/61_diff_testsslsh.t ..............
2025-05-05 20:11:12 +02:00
Dirk
ebb7cf558e Update handshake 2025-04-16 21:48:30 +02:00
David Cooper
3a8038636d OpenSSL 3.5.0 client simulation
Add OpenSSL 3.5.0 to etc/client-simulation.txt.
2025-04-08 15:26:41 -07:00
Dirk
c7e095305f Add unit test for certificate revocation
One positive, one negative

This should detect failures in the future like in #2667, #2516
and #1275 .
2025-03-15 17:24:22 +01:00
Dirk Wetter
d93549e327 fix match expr 2025-01-27 20:08:11 +01:00
Dirk Wetter
cdf5cf7b97 remove + @ beginning of line 2025-01-27 17:20:39 +01:00
Dirk Wetter
ef13122f4f fix typo 2025-01-27 16:39:02 +01:00
Dirk Wetter
b984ae5ea2 minor stuff 2025-01-27 16:37:04 +01:00
Dirk Wetter
8e39d161a8 cleaner code 2025-01-27 16:36:42 +01:00
Dirk Wetter
0640eb9004 Several CI fixes
- don't output stdin on terminal
- adapt to different google.com ip addresses
- cleaner code
2025-01-27 16:33:58 +01:00
Dirk
ce8984706e Finalize unit test
* pattern search + replace for tls_sockets() vs. openssl
* better error handling for invocations with perl functions system + die
2025-01-24 20:36:59 +01:00
Dirk
cbaa813a40 Merge branch '3.2' into diffing_openssls 2025-01-24 19:47:40 +01:00
Dirk Wetter
0042b6313e s/drwetter/testssl
For the remaining occurences. Except dockerhub which needs to be solved.
2025-01-24 11:15:55 +01:00
Dirk
d7da22d598 Finalize check
* use system with @args so that we can query the return value
* code style improved for readability
* diff shows the filtered difference
* ok instead of cmp_ok to show not the whole content of vars
2025-01-22 23:33:35 +01:00
Dirk
12036fb6c8 Update baseline scan + add/deprecate security headers 2025-01-22 19:54:34 +01:00
Dirk
ba58458909 Restrict tests to those which use openssl 2025-01-22 18:37:48 +01:00
Dirk
37d987684e remove comment sign from testing 2025-01-22 18:25:54 +01:00
Dirk
a499233df2 Add unittest for diffrent openssl versions
This adds a unit test to compare a run against google with the supplied openssl
version vs /usr/bin/openssl .

This would fix #2626.

It looks like there are still points to clarify
* NPN output is different (bug)
* Newer openssl version claims it's ECDH 253 instead of ECDH 256.
* Newer openssl version claims for 130x cipher it's ECDH 253, via sockets it´s ECDH/MLKEM. This seems a bug (@dcooper)

A todo is also restricing the unit test to the one where openssl is being used. E.g. the ROBOT check and more aren't done with openssl. So there's no value checking this here.
2025-01-22 18:12:53 +01:00
Dirk
e0e742379c see previous commit 2024-10-14 17:15:43 +02:00
Dirk
ae77349f3a see previous commit 2024-10-14 17:11:55 +02:00
Dirk
dbb8fc8013 Fix CI 2024-09-03 18:28:56 +02:00
Dirk
2067ac8123 Fall back to heise.de
.. to scan.

It worked in a few examples locally. Other hosts I tried so far weren't
available anymore (like scanme.nmap.org). In order to reduce the burden
we scan now only during PRs.
2023-07-31 16:34:56 +02:00