Commit Graph

3478 Commits

Author SHA1 Message Date
f7c9030364 Fix sub_cipherlists()
This commit fixes a bug in sub_cipherlists() when using sockets to test whether a server supports a set of ciphers with SSLv2. Code that is supposed to extract the list of SSLv2 ciphers to test for is incorrectly reading from the list of non-SSLv2 ciphers.
2021-11-22 12:29:51 -05:00
11325ff04e Merge pull request #2041 from dcooper16/ossl31_30
Support OpenSSL 3.0.1-dev and 3.1.0-dev
2021-11-11 17:02:23 +01:00
bc2ea32c32 Support OpenSSL 3.0.1-dev and 3.1.0-dev
Same as #2040, but for the 3.0 branch.
2021-11-10 09:16:46 -05:00
d43fa50022 Merge pull request #2027 from dcooper16/improve_cipher_pref_check_30
Improve cipher_pref_check() in 3.0
2021-10-27 21:03:19 +02:00
1e4dd4d1bf Improve cipher_pref_check()
Some servers are configured to prioritize ChaCha ciphers if those ciphers are preferred by the client, even if the server is generally configured to use the server's cipher preferences rather than the client's. As a result of this, if a ChaCha cipher appears in the ClientHello before a non-ChaCha cipher, the server may select the ChaCha cipher even if the server is configured to prefer the non-ChaCha cipher.

In a few cases, e.g., cloudflare.com for TLS 1.2, this affects the ordering of the ciphers presented by cipher_pref_check(). This PR fixes the problem by having cipher_pref_check() (and check_tls12_pref()) always place any ChaCha ciphers at the end of the cipher list in the ClientHello. This ensures that cipher_pref_check() presents the ciphers in the server's preference order.
2021-10-27 12:48:11 -04:00
aaf7248028 Merge pull request #2021 from drwetter/improve_precheck_curves_3.0
Improvement for testing curves with several openssl / libressl versions (3.0)
2021-10-26 12:00:06 +02:00
1b2903e7ac Improvement for testing curves with several openssl / libressl versions
As noted in #2016 the detection of curves in find_openssl_binary()
was not yet perfect.

This commit removes another connect call. Also it corrects the port statement
for LibreSSL-like pre-checks as port 0 generally seems to me better suited.
Inline documentation was added.

It worked so far with OpenSSL 1.0.2, 1.1.1 and 3.0 and LibreSSL 3.4.

This is for 3.0. Similar commit (a11bd1585e)
was for 3.1dev, see PR #2020 .
2021-10-24 22:01:08 +02:00
25a8579a5a Update ISSUE_TEMPLATE.md 2021-10-21 10:53:36 +02:00
0ac95be1fc Merge pull request #2018 from drwetter/cab_is4browsers_3.0
Add browser requirement for the entropy of cert serial (3.0)
2021-10-21 09:50:21 +02:00
a580c20434 Add browser requirement for the entropy of cert serial
see also https://github.com/drwetter/testssl.sh/issues/2013#issuecomment-947834789
2021-10-20 19:41:43 +02:00
3e68dbd8ac Merge pull request #2012 from drwetter/windows_dns_fix_3.0
Addressing lame DNS responses on WSL (3.0)
2021-10-20 08:59:20 +02:00
a3e589e331 Merge pull request #2015 from drwetter/fix_len_certserialnum_3.0
Check cert serial len + fix output when too big (3.0)
2021-10-20 08:58:25 +02:00
36f6093ca9 Check cert serial len + fix output when too big (3.0)
Same as #2014, this is for 3.0 though.

OpenSSL shows certificate serial numbers >35 with a LF (0A). Testssl.sh
just output that which makes JSON invalid and displays the LF in the terminal
too.

This PR fixes that (#2010) by adding text filters so that the
serial number is not a multiline string.

Also this PR introduces a new function: a size check of the cert serial.
Below 8 bytes the CAB Forum's lower limit is hit which says the entropy
from a CSPRNG should be at least 64 bits. It is assumed that below 8 bytes
length this requirement isn't possible to meet (needs to be clarified with
Shannon, 8 bytes seems to low to me).
The high threshold is according to RFC 5280, Section-4.1.2.2 .

See also #2013.

The output has changed, so that on the terminal the serial has one line,
SHA1 and SHA256 each one line. The new json key is "cert_serialNumberLen".
2021-10-19 20:27:43 +02:00
6c555f478b Addressing lame DNS responses on WSL (3.0)
This commit provides a global variable to the RFC 6761 use of "invalid."
which WSL clients don't seem to handle very well, see #1738, #1812.
"invalid."  is used as a target to find out in a couple of pre-checks what
is supported by the openssl version.

This PR reduces the number of ``openssl s_client -connect`` by a huge factor.
For the remaining invocations the OS used is being determined and if WSL is
assumed (the check is probably not 100% accurate) it uses ``127.0.0.1:0`` instead.
In (unfortunately only a few) pre-tests the response was immediate.

Also it is possible to use another target if needed by

     NXCONNECT=<mytargethere>:<myport> ./testssl.sh <URL>

This is for 3.0. For 3.1dev see #1988 .
2021-10-18 20:09:16 +02:00
136b9416f5 Merge pull request #2006 from drwetter/fix_1992_certificateIssuerName_3.0
Fix invalid JSON when certificate issuer contains non-ASCII chars (3.0)
2021-10-03 21:05:11 +02:00
2e821b9f62 Fix invalid JSON when certificate issuer contains non-ASCII chars (3.0)
Changed printf %s to printf %b which cause now to output UTF-8 correctly.

See #1992.
2021-10-03 18:31:06 +02:00
c3d2cf75b4 Merge pull request #2003 from drwetter/drwetter-patch-1
Fix typo / spelling error
v3.0.6
2021-10-02 22:32:44 +02:00
9f8ed56534 Fix typo / spelling error 2021-10-02 22:31:14 +02:00
c1210e98a5 Merge pull request #1948 from drwetter/bump_version_3.0.6
Bump version to 3.0.6
2021-10-02 22:21:53 +02:00
1732e9c919 Merge branch '3.0' into bump_version_3.0.6 2021-10-02 22:21:36 +02:00
b68147150a Merge pull request #2000 from mig5/fix-letsencrypt-remove-dst-root-x3-ca-cert-3.0-fixed
Remove the expired DST Root CA X3 cert from all trust stores, and ensure Mozilla's is up to date (fixes ISRG X1 alternate path) - 3.0 branch
2021-10-02 08:37:03 +02:00
49784b663d Remove the expired DST Root CA X3 cert from all trust stores, and ensure Mozilla's is up to date (fixes ISRG X1 alternate path) 2021-10-02 08:24:46 +10:00
6c874cccee Merge pull request #1989 from drwetter/fix_1982-3.0__kali.cnf
Fix #1982: Newer openssl.cnf break openssl detection (3.0)
2021-09-15 12:41:56 +02:00
8a53039de6 Fix #1982: Newer openssl.cnf break openssl detection (3.0)
Newer configuration files from openssl may include statements
which aren't compatible with our supplied old openssl version.
This commit adds an autodetection of such a file and uses a
openssl.cnf provided by this project then.

The openssl.cnf is from a Debian Jessie package.

See also #1987
2021-09-15 11:25:10 +02:00
24ba9e6efa Merge pull request #1986 from DimitriPapadopoulos/3.0
Typos found by codespell
2021-09-14 14:49:37 +02:00
ca1043bda5 Typos found by codespell
Run codespell in CI
2021-09-14 14:10:33 +02:00
19760b2775 Merge pull request #1980 from drwetter/fix_1978_3.0
Fix minor inconsistency in description of cipher categories (3.0)
2021-09-10 08:10:00 +02:00
a239ac7a6a Fix GHA (starttls nntp)
using another IP
2021-09-09 23:21:08 +02:00
7be262f287 Fix minor inconsistency in description of cipher categories
A longer while back the section ~ "Testing standard ciphers" was
renamed to "Testing cipher categories". However the internal help
didn't reflect that.

This fixes that, including an addtion to the documentation.

Note: the help still lists "-s --std, --standard" as a cmd line
switch.
2021-09-09 21:50:03 +02:00
99be55650a Merge pull request #1977 from ap-wtioit/3.0-fix_dig_r_check
Fix dig -r check to only run if dig is available
2021-09-06 10:30:47 +02:00
f7b8f93fd0 Fix dig -r check to only run if dig is available 2021-09-06 10:24:51 +02:00
516cd43dd3 Merge pull request #1973 from drwetter/fix_dig-r_3.0
Fix cases where dig -r wasn't working (3.0)
2021-09-01 19:33:43 +02:00
80cbdf2748 Fix cases where dig -r wasn't working (3.0)
Similar to #1972.

* the ignore ~/.digrc option from dig is now parsed from the builtin help
* there was a potential DNS call which is now avoided
* the +noidnout check is now parsed from the builtin help
* the OPENSSL_CONF="" in check_resolver_bins() was moved a few lines higher to avoid other errors in the terminal
* redo check for noidnout by also using the help function of dig

See also #1949
2021-09-01 18:51:03 +02:00
30a2f47e3d Merge pull request #1971 from dcooper16/fix_1961_3.0
Fix #1961 in 3.0 branch
2021-08-30 19:56:34 +02:00
00ffcb8c00 Fix #1961 in 3.0 branch
This commit is the same as #1962, but for the 3.0 branch.
2021-08-30 13:52:00 -04:00
8d1e964788 Merge pull request #1969 from jauderho/3.0
Add GH Action to build Docker images (3.0 branch)
2021-08-27 09:32:33 +02:00
86543ecab5 Cleanup 2021-08-09 11:59:19 +00:00
b04745d960 Use github.repository instead 2021-08-09 11:53:48 +00:00
63722babe9 Add missing file 2021-08-09 11:45:33 +00:00
1fcac8791a Use GH Action to build Docker images 2021-08-09 11:44:05 +00:00
ea3f089b79 Merge pull request #1967 from jauderho/3.0_gha_build_status
Update Readme.md
2021-08-09 12:50:58 +02:00
c00c49bc44 Update Readme.md 2021-08-09 10:48:32 +00:00
8b5f25a113 Merge pull request #1959 from dcooper16/use_all+_3.0
Use all+ in calls to tls_sockets() in 3.0
2021-08-07 16:07:22 +02:00
578d173319 Merge pull request #1957 from drwetter/fix_1956
Redirect debugme() outputs to stderr
2021-08-07 13:55:31 +02:00
ff5b321d38 Use all+ in calls to tls_sockets() in 3.0
get_server_certificate() includes a few calls to tls_sockets() in which the response will be TLS 1.3 and in which the response will be useless if it cannot be decrypted (since the goal is to obtain the server's certificate). So, these calls to tls_sockets() should specify "all+" rather than "all".
2021-08-04 14:31:42 -04:00
65d6c27551 Redirect debugme() outputs to stderr
... to address #1956 and other places.
2021-08-04 19:33:01 +02:00
91523be194 Merge pull request #1949 from drwetter/digrc_3.0
Ignore $HOME/.digrc (3.0)
2021-08-01 20:59:58 +02:00
556208815a Merge remote-tracking branch 'origin/3.0' into digrc_3.0 2021-08-01 20:20:24 +02:00
a52b3b847d Merge pull request #1954 from drwetter/legacy_stuff
Legacy removals + housekeeping
2021-08-01 20:18:39 +02:00
16c18789cd Legacy removals + housekeeping
* remove relics (CVS)
* add diff to HTML CI run
2021-08-01 18:25:13 +02:00