Commit Graph

5340 Commits

Author SHA1 Message Date
Dirk
b573a4f786 Fix DN conversion when reading certificate issuer
This fixes #3003 .

The conversion to proper UTF-8 should have taken place by just using
`-nameopt RFC2253`, see manpage openssl-namedisplay-options(1ssl).

As @dcooper16 suggested removing esc_msb should help. This may look
counterintuitive but works.
2026-04-20 18:09:36 +02:00
Dirk Wetter
d2d684e31b Merge pull request #3029 from testssl/fix_fix_2809
Address missing extended_master secret extension properly
2026-04-20 17:49:24 +02:00
Dirk
cff949bb90 Address missing extended_master secret extension properly
This PR "fixes feature" #2809 which was formerly not properly implemented in #2982,
see comment https://github.com/testssl/testssl.sh/issues/2806#issuecomment-4164847538.

Now TLS 1.3.-only servers won't get penalized when the master secret extension
is missing.
2026-04-20 16:31:44 +02:00
Dirk Wetter
7c47d8a8eb Merge pull request #3023 from dcooper16/identity_ossl_tls13_ciphers
Identify TLS 1.3 ciphers by OpenSSL name
2026-04-17 11:59:10 +02:00
Dirk Wetter
24eb5dec8a Merge pull request #3024 from dcooper16/missing_groups
Add missing TLS 1.3 Brainpool groups
2026-04-15 11:41:14 +02:00
David Cooper
74a60d25ea Identity TLS 1.3 ciphers by OpenSSL name
This commit changes the way that TLS 1.3 ciphers are identified by the OpenSSL names. To the degree possible, rather than checking for prefixes that have historically been used in various versions of OpenSSL and LibreSSL, the cipher name being checked against the known list of TLS 1.3 cipher suites that $OPENSSL supports.

In the few places in which the cipher suite name to be checked may not be supported by $OPENSSL, a check for the prefix "TLS_" is also used.
2026-04-14 14:46:48 -07:00
David Cooper
4b3a133a50 Add missing TLS 1.3 Brainpool groups
This commit adds recognition of the TLS 1.3 Brainpool groups when parsing the supported_groups extension in the server's extensions.
2026-04-13 12:58:31 -07:00
Dirk Wetter
57cca5c2a0 Merge pull request #3020 from dcooper16/use_sigalgs
Use OpenSSL with -sigalgs option to obtain server's certificate
2026-04-13 09:36:47 +02:00
Dirk Wetter
93ae5d78f4 Merge pull request #3021 from dcooper16/missing_sigschemes
Add missing TLS signature schemes
2026-04-13 09:34:20 +02:00
David Cooper
000a5c40cf Add missing TLS signature schemes
This commit fixes a few places where new signature schemes were not added:

1) It adds ECDSA with the Brainpool curves for TLS 1.3 (0x081a, 0x081b, and 0x081c) to get_server_certificate(), certificate_transparency(), and prepare_tls_clienthello().

2) It adds rsa_pss_pss (0x0809, 0x080a, 0x080b) to certificate_transparency().

3) It adds the signature schemes for EdDSA (0x0807, 0x0808) and ML-DSA (0x0904, 0x0905, 0x0906) to certificate_transparency().
2026-04-12 11:27:00 -07:00
David Cooper
087ddd141e Use OpenSSL with -sigalgs option to obtain server's certificate
When $OPENSSL s_client supports the "-sigalgs" option, get_server_certificate() uses $OPENSSL rather than tls_sockets() to obtain the server's certificate, but only for certificates with RSA and ECDSA public keys.

With OpenSSL 3.5 and newer the list command can be used to get a list of supported TLS signature algorithms.

With this commit, if OpenSSL 3.5 or newer is being used, the list of supported TLS signature algorithms is obtained and get_server_certificate() uses $OPENSSL s_client rather than tls_sockets() whenever $OPENSSL supports the relevant signature scheme.

In addition to making the code a bit faster, this may be helpful if a server has a certificate with an SM2 public key and it only supports curveSM2 for key exchange, since tls_sockets() can not decrypt server responses if curveSM2 is used.
2026-04-12 11:26:12 -07:00
Dirk Wetter
e3ec72a359 Merge pull request #3018 from dcooper16/ossl4_ocsp
OpenSSL 4 compatibility for stapled OCSP responses
2026-04-12 13:24:01 +02:00
David Cooper
a0b1f13b84 OpenSSL 4 compatibility for stapled OCSP responses
It seems that OpenSSL 4.0.0 allows for the possibility that a server's response to the status request extension may include more than one OCSP response (presumably one for each certificate in the certification path).

As a result, the line indicating that the server does not provide status information was changed from "OCSP response: no response sent" to "OCSP responses: no responses sent". If a response was included, "OCSP responses:" is followed by an indication of the number of responses included.

This commit addresses the change from "response" to "responses".

I do not know of any servers that provide more than one OCSP response, so I have not tried to make any changes to handle more than one response.
2026-04-11 15:26:10 -07:00
Dirk Wetter
b14ed4def5 Merge pull request #3017 from dcooper16/tls_data
Clean up etc/tls_data.txt
2026-04-11 11:22:17 +02:00
David
e1cbc252cc Clean up etc/tls_data.txt.
This commit cleans up the initialization of TLS13_KEY_SHARES and TLS13_PUBLIC_KEY_SHARES in etc/tls_data.txt. With this commit, each index in the array that is to be initialized is prefixed with "[0xXX]=". This allows all of the current placeholders to be deleted.
2026-04-10 17:09:28 -07:00
Dirk Wetter
012a296184 Merge pull request #3015 from testssl/dcooper16-1
Add draft-yang-tls-hybrid-sm2-mlkem
2026-04-09 11:53:23 +02:00
Dirk Wetter
e370aabb33 Update CREDITS.md 2026-04-09 11:52:50 +02:00
Dirk Wetter
48b29194b9 Add draft-yang-tls-hybrid-sm2-mlkem 2026-04-09 11:43:02 +02:00
Dirk Wetter
adff28d50c Merge pull request #3014 from dcooper16/rfc8998
Add support for RFC 8998 and draft-yang-tls-hybrid-sm2-mlkem
2026-04-09 11:29:08 +02:00
David Cooper
3be7a854cb Add support for RFC 8998 and draft-yang-tls-hybrid-sm2-mlkem
The commit adds support for RFC 8998 and draft-yang-tls-hybrid-sm2-mlkem. This includes support for the TLS_SM4_GCM_SM3 and TLS_SM4_CCM_SM3 cipher suites, the key exchange groups curveSM2 and curveSM2MLKEM768, and SM2 public keys and signatures.

While this commit adds support to tls_sockets() to decrypt server responses encrypted under SM4 GCM or CCM, OpenSSL does not support performing key derivation using curveSM2. So, tls_sockets() can not decrypt server responses if the key exchange was performed using curveSM2 or curveSM2MLKEM768.
2026-04-07 13:50:53 -07:00
Dirk Wetter
3f9eb84778 Merge pull request #3012 from testssl/fix_3009_date-detection
Make sure date -r hits a dir readable
2026-04-07 16:00:04 +02:00
Dirk Wetter
ec95862790 Make sure date -r hits a dir readable
When checking early for date flavors, there might be an edge case when
a directory with a referred file (for the date command) isn't readable
which might cause testssl.sh to not detect the date flavor correctly.

This fixes that by cd'ing to / in a subshell which should be cd'able
and readable under every platform.
2026-04-07 10:27:46 +02:00
Dirk Wetter
802061f492 Merge pull request #3010 from testssl/patch-1
Fix typo
2026-04-07 09:48:37 +02:00
Dirk Wetter
693a7c1682 Fix typo 2026-04-07 09:47:36 +02:00
Dirk Wetter
5958f063f6 Merge pull request #3005 from dcooper16/ossl4
OpenSSL 4 compatibility
2026-03-25 09:49:42 +01:00
David Cooper
3c22ac2bde OpenSSL 4 compatibility
This commit addresses two issues created by changes in certificate printing in OpenSSL 4 (based on testing with OpenSSL 4.0.0-alpha1).

With OpenSSL 4, the public key type for ML-DSA keys is now shown with a string (e.g., ML-DSA-44) rather than an OID. The first change in this commit ensures that the public key size is set correctly in this case.

Second, different information is printed about the size of elliptic curve public keys. All previous versions of OpenSSL (and LibreSSL) just provided the size of the public key:

    Public-Key: (256 bit)

OpenSSL 4.0.0-alpha includes additional information:

    Public-Key: (256 bit field, 128 bit security level)

The second change in this commit removes this additional information.
2026-03-23 13:56:59 -07:00
Dirk Wetter
9c086b2e15 Merge pull request #3002 from testssl/dependabot/github_actions/docker/build-push-action-7
Bump docker/build-push-action from 6 to 7
2026-03-12 11:02:37 +01:00
Dirk Wetter
3142e73b99 Merge pull request #3001 from testssl/dependabot/github_actions/docker/setup-buildx-action-4
Bump docker/setup-buildx-action from 3 to 4
2026-03-12 11:02:13 +01:00
Dirk Wetter
a24990ef90 Merge pull request #3000 from testssl/dependabot/github_actions/docker/metadata-action-6
Bump docker/metadata-action from 5 to 6
2026-03-12 11:01:45 +01:00
Dirk Wetter
63a07e38e1 Merge pull request #2999 from testssl/dependabot/github_actions/docker/setup-qemu-action-4
Bump docker/setup-qemu-action from 3 to 4
2026-03-12 11:01:01 +01:00
Dirk Wetter
a7f16fd189 Merge pull request #2998 from testssl/dependabot/github_actions/docker/login-action-4
Bump docker/login-action from 3 to 4
2026-03-12 11:00:30 +01:00
dependabot[bot]
c4b429e467 Bump docker/build-push-action from 6 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 00:22:46 +00:00
dependabot[bot]
ccf0bfe9f2 Bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 00:22:42 +00:00
dependabot[bot]
8ced01c172 Bump docker/metadata-action from 5 to 6
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 00:22:22 +00:00
dependabot[bot]
79f1a35b7a Bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 00:22:19 +00:00
dependabot[bot]
539af80ead Bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 00:22:16 +00:00
Dirk Wetter
87ecc1c9f2 Merge pull request #2997 from testssl/drwetter-patch-1
don't use 3.0 docker images anymore
2026-02-19 10:53:34 +01:00
Dirk Wetter
81fb5f967f don't use 3.0 anymore 2026-02-19 10:52:31 +01:00
Dirk Wetter
552e10ce8a Merge pull request #2995 from testssl/drwetter-patch-1
Amend IPv6 with host networking
2026-02-18 10:32:48 +01:00
Dirk Wetter
8aca6f0665 Amend IPv6 with host networking 2026-02-18 10:31:24 +01:00
Dirk Wetter
aef8616e5b Merge pull request #2992 from testssl/back2thedev
Change banner back to 3.3dev
2026-02-18 10:25:29 +01:00
Dirk Wetter
4086cb593e Merge pull request #2994 from testssl/drwetter-patch-1
Docker + IPv6
2026-02-18 10:01:48 +01:00
Dirk Wetter
6cc8c857a8 Docker + IPv6 2026-02-18 10:00:57 +01:00
Dirk
094c61caea Change banner back to 3.3dev 2026-02-13 14:25:58 +01:00
Dirk Wetter
cdc892e323 Merge pull request #2991 from testssl/3.3snap1
Add "dev" to the version banner to clarify
v3.3dev-snapshot-2602
2026-02-13 13:46:54 +01:00
Dirk
c895a5c268 Add "dev" to the version banner to clarify
And modify the banner accordingly depending on whether it's a
snapshot release or not.
2026-02-13 11:18:13 +01:00
Dirk Wetter
a9fc8a17c5 Merge pull request #2989 from testssl/3.3snap1
Prepare for a snapshot release
2026-02-13 08:36:20 +01:00
Dirk
c600b2cb38 Prepare for a snapshot release
- "3.3" still signals it's not oldstable
- "snapshot-YYMM" speaks for itself
2026-02-12 23:15:07 +01:00
Dirk Wetter
18a1264223 Merge pull request #2985 from testssl/fix_2983_robot_timeout
Finalize renaming MAX_WAITSOCK --> ROBOT_TIMEOUT
2026-02-11 21:36:17 +01:00
Dirk
ee316ef7ee Google has KEMs wjhich openssl doesn't show 2026-02-11 20:06:24 +01:00