1
0
mirror of https://github.com/drwetter/testssl.sh.git synced 2025-07-22 13:41:45 +02:00
Commit Graph

4822 Commits

Author SHA1 Message Date
a348839f60 Merge pull request from testssl/add_comment_get_server_cert
Comment the first lines get_server_certificate()
2025-03-25 21:56:32 +01:00
040ef1e0c9 Comment the first lines get_server_certificate()
See https://github.com/testssl/testssl.sh/issues/2707#issuecomment-2741053487
2025-03-25 17:22:10 +01:00
5359befc60 Merge pull request from testssl/sanitze_http_header_better
Sanitze HTTP header early and better
2025-03-20 15:44:28 +01:00
a17bb42a37 Sanitze HTTP header early and better
On MacOS `run_http_header()` hiccuped when in any place of the web site unprintable chars were returned, see https://github.com/testssl/testssl.sh/issues/2708#issuecomment-2738347784 .

This PR fixes that by moving the sanitization to a separate function and run it earlier before any processing of the returned content (header plus body) takes place.

Output was:

```
'HTTP Status Code           awk: towc: multibyte conversion failure on: '� disabilitato");

 input record number 36, file /tmp/testssl.FHu8E0/AAA.BBB.CCC.DDD.http_header.txt
 source line number 1
'wk: towc: multibyte conversion failure on: '� disabilitato");

 input record number 36, file /tmp/testssl.FHu8E0/AAA.BBB.CCC.DDD.http_header.txt
 source line number 1
  200 OK
```
2025-03-20 13:34:46 +01:00
692b9c9260 Merge pull request from testssl/fix_2708_TLS_FALLBACK_SCSV
Set POODLE var when exiting run_ssl_poodle()
2025-03-20 10:45:57 +01:00
70dacdf9fa Merge pull request from testssl/nameopt_utf8_2705
Fix LibreSSL parsing (-nameopt utf8)
2025-03-19 23:41:47 +01:00
e4bbd6b517 Set POODLE var when exiting run_ssl_poodle()
... so that run_tls_fallback_scsv() doesn't exit with a warning.

This fixes  .
2025-03-19 23:30:06 +01:00
8d8f83ace5 Fix LibreSSL parsing (-nameopt utf8)
When parsing the intermediate cerificates there was a parser problem when using
LibreSSL and not OpenSSL.

This PR fixes the issue  and addresses the problem by using the -nameopt multiline command
of LibreSSL/OpenSSL .
2025-03-19 22:36:37 +01:00
a43261fc6f Merge pull request from dcooper16/ocsp_check_rev_ossl_ver
OpenSSL version check in check_revocation_ocsp()
2025-03-18 13:04:23 +01:00
ebeb3e7b9d OpenSSL version check in check_revocation_ocsp()
The current code for setting $host_header in check_revocation_ocsp() will not work for LibreSSL 3.* or for upcoming versions of OpenSSL (version 4 or greater). The check will also not work correctly if $OPENSSL2 is used and $OPENSSL2 is not /usr/bin/openssl. This commit fixes these issues.
2025-03-17 08:53:19 -07:00
0c64e09203 Merge pull request from testssl/dependabot/github_actions/docker/login-action-3.4.0
Bump docker/login-action from 3.3.0 to 3.4.0
2025-03-17 10:26:57 +01:00
997646570e Bump docker/login-action from 3.3.0 to 3.4.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-17 01:00:40 +00:00
87d57bbf2f Merge pull request from testssl/unitttest_revocation
Unit test revocation
2025-03-15 21:38:57 +01:00
52476b8a46 Fix finger confusion ;-) 2025-03-15 17:27:28 +01:00
c7e095305f Add unit test for certificate revocation
One positive, one negative

This should detect failures in the future like in , 
and  .
2025-03-15 17:24:22 +01:00
2090bdc849 Merge pull request from testssl/fixDockerOcspCall
Fix --phone-out + ocsp, also in docker container
2025-03-15 17:11:52 +01:00
633503cd17 Fix complaint wrt Lowercase "as" 2025-03-15 16:02:32 +01:00
430c5c8d09 Fix --phone-out + ocsp, also in docker container
Previously in 4f1a91f92e there was a
double header sent to the server to check whether the certificate
was revoked.

This PR addresses that and fixes  .
2025-03-15 15:58:28 +01:00
098aa4ad8b Merge pull request from dcooper16/fix_ossl_version_check
Fix OpenSSL version check
2025-03-15 09:22:26 +01:00
ad8684d324 Fix OpenSSL version check
Before version 3.0.0, OpenSSL versions includes letters (e.g., 1.1.1w). Such version numbers confuse [[ ${OSSL_VER//./} -ge 210 ]]. Since this check is only needed for LibreSSL, this commit adds a conditional so that the check is only performed for LibreSSL.
2025-03-14 14:06:17 -07:00
73be4f7381 Merge pull request from testssl/fix_segfault_error4
Fix segfault with error 4 in check_revocation_ocsp() when using --phone-out
2025-03-14 19:19:38 +01:00
4f1a91f92e Fix segfault with error 4 in check_revocation_ocsp() when using --phone-out
As `--phone-out` sometimes doesn't work with our binary we switch transparently/automagically
to the vendor support openssl binary -- if available.

This fixes at least  where the issue has been explained/debugged in detail.
See also  and .
2025-03-14 17:06:42 +01:00
c53f4a3e44 Merge pull request from testssl/speedup_curvetests
Speed up startup checks for supported curves and more
2025-03-13 10:59:42 +01:00
31a09ec593 Merge pull request from testssl/more_extension_numbers
Add a few extension numbers in the server hello
2025-03-12 10:29:15 +01:00
cab5bd7b13 Merge pull request from dcooper16/changes_update
Update CHANGELOG.md and CREDITS.md
2025-03-12 10:27:31 +01:00
ec1d28ea24 Update CHANGELOG.md and CREDITS.md
This commit adds information about , , and  to the change log.
2025-03-11 12:48:48 -07:00
1e63bd296d Merge pull request from testssl/drwetter-patch-1
Update pull_request_template.md
2025-03-11 16:25:19 +01:00
011bcc7223 Update pull_request_template.md 2025-03-11 16:21:24 +01:00
bad917f193 Update pull_request_template.md 2025-03-11 16:20:25 +01:00
8b00ab4c47 Add a few extension numbers in the server hello
Issue  showed a server which listed an unknown extension number from
RFC 8446. THis PR adds this number and a few (later) ones.

It just lists them when detected in `parse_tls_serverhello()`

See also https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml
2025-03-11 15:57:25 +01:00
830af44953 Merge pull request from dcooper16/mlkem
Support draft-connolly-tls-mlkem-key-agreement
2025-03-11 15:33:22 +01:00
70e1c4d693 Merge pull request from dcooper16/sort_tls_extns
Sort TLS extensions
2025-03-11 15:20:36 +01:00
6ed6db500b Merge pull request from dcooper16/ossl4_compat
OpenSSL 4 compatibility
2025-03-11 15:16:45 +01:00
ac83b79680 Merge pull request from dcooper16/ossl35_compat
OpenSSL 3.5 compatibility
2025-03-11 15:13:44 +01:00
410b3acf5c OpenSSL 4 compatibility
According to https://openssl-library.org/roadmap/index.html, OpenSSL 4 is scheduled to be released in April 2026. This commit modifies code that checks $OPENSSL version numbers so that versions 4 and above will be recognized.
2025-03-10 15:58:40 -07:00
75b78bc21a Sort TLS extensions
This commit modifies testssl.sh so that run_server_defaults() prints the server's supported TLS extensions sorted by extension number rather than listing them in the order in which they were found.

In order to simplify the sorting of the extensions, this commit changes $TLS_EXTENSIONS from a string to an array. In February 2017 comments were added (925e1061b2) saying that it would be $TLS_EXTENSIONS were an array. So, this commit addresses those comments. However, it is possible that the reason for those comments no longer apply.
2025-03-10 15:38:24 -07:00
683f028164 Support draft-connolly-tls-mlkem-key-agreement
This commit adds support for the three code points in draft-connolly-tls-mlkem-key-agreement.
2025-03-06 11:42:00 -08:00
6a333d17b7 OpenSSL 3.5 compatibility
With the current master branch of OpenSSL (3.5.0-dev), the output that is provided by s_client has changed in the case of a cipher suite that uses an ephemeral key. Rather than preceding the ephemeral key information with "Server Temp Key: ", it is now preceded by either "Peer Temp Key:" or "Negotiated TLS1.3 group:". This commit modifies the lines that extract ephemeral key information from OpenSSL responses to accept any of these strings.
2025-03-06 10:33:04 -08:00
f34b81ed8f Merge pull request from testssl/drwetter-patch-1
Update pull_request_template.md
2025-03-06 11:16:01 +01:00
b25038e248 Update pull_request_template.md 2025-03-06 11:14:54 +01:00
4a8377a396 Conflicts resolved 2025-03-06 11:01:00 +01:00
08d8039813 Merge pull request from testssl/date_not_available
Fix regex for openssl banner
2025-03-05 22:20:42 +01:00
7bb04e020e Fix regex for openssl banner
,,, and also update the warning when runing in SSL native mode to check the ciphers
before and include OpenSSL also
2025-03-05 17:52:34 +01:00
f03440bc28 Speed up startup checks for supported curves and more
In order to avoid delays due to lookups of the hostname "invalid." we
just avoid to use "invalid." whenever possible. :-)

Therefore we just do a test before whether `$OPENSSL s_client 2>&1 </dev/null`
does a connect, except when a WSL system is discovered. If that succeeds
we omit the part `-connect invalid.` to check whether the curve is supported.
In some quick testing this in fact improved the startup time.

This seemed to work under Linux with several openssl and one LibreSSL binary.
More testing would be required, especially e.g. under WSL / WSL2.

Also in `sclient_supported()` the `$OPENSSL s_client` statement was changed
in a similar fashion. That worked so far but would need to be observed more
closely.
2025-03-05 17:22:01 +01:00
9807bc327a Merge pull request from testssl/banner_change
Banner change
2025-03-05 16:28:29 +01:00
e6cfe8c3b0 Resolve merge conflict by incorporating both suggestions 2025-03-05 15:35:18 +01:00
e2ee8b24b4 fix typo in comment 2025-03-05 15:06:41 +01:00
5ffcd086eb Add missing local vars 2025-03-05 15:02:15 +01:00
3152cdf864 Banner change + minor fix for curve detection
In order to tell openssl binaries better apart the short banner below the
hash tag signs contain now also the date. That is the short version of the
build date unless it is not supplied which is the case of opensuse. Then
the name contains the date and it's taken from there.

The start and end banner lines have the same length now.

"sieve" was added in a comment and the sequence where sieve appears in
a pattern was trying to match other occurences (i.e. after nntp)

While testing the banners it appeared under Linux that a) the vendor
supplied openssl sometimes hangs during startup when determining the
supported curves using -connect b) a pattern was missing to detect
whether the curve was not supported which falsely labeled all supplied curves
as supported when using /usr/bin/openssl . The pattern for the latter
was added (b). For a) there needs to be a follow up PR to avoid the
long delays.
2025-03-05 14:41:12 +01:00
f555fb050e Merge pull request from dcooper16/fix_typo
Fix typo
2025-03-05 09:13:12 +01:00