Commit Graph

1370 Commits

Author SHA1 Message Date
AlGreed
6b8de02072 Fixed broken JSON-PRETTY format. Added test to check severity levels 2017-03-09 18:55:04 +01:00
AlGreed
6201348827 Merge branch 'drwetter/2.9dev' into 2.9dev 2017-03-07 11:18:13 +01:00
David Cooper
f02948e24a Add spaces in show_finding()
When I view testssl.sh in KDE's text editor (kate), the code after "INFO" line in `show_finding()` isn't highlighted correctly, and the highlighting doesn't correct again until `pr_liteblueln()`. This PR fixes the highlighting issue by adding spaces between "]]" and ")". To be "safe," I also added spaces between "(" and "[[", and similarly added spaces in `is_json_format()`.
2017-03-06 14:37:52 -05:00
David Cooper
a3794d1f74 Merge branch '2.9dev_html' into html_headers_and_footers 2017-03-01 08:47:25 -05:00
David Cooper
3c22511806 Fix HTML headers and footers
This PR ensures that each HTML file produced by testssl.sh only includes a single header, at the top, and a single footer, at the end. It also tries to ensure that the short-version banner is only placed at the top of the HTML file if (1) mass testing is being performed and (2) the results of each test is being placed in a separate file.

It also moves some of the logic out of main and into `html_header()`.
2017-02-28 13:31:06 -05:00
David Cooper
68cf590366 Merge branch '2.9dev_html' of https://github.com/drwetter/testssl.sh into 2.9dev_html 2017-02-28 12:47:45 -05:00
Dirk
ca6cb0bf81 updated from #632 from dcooper16/negotiated_cipher 2017-02-28 18:33:17 +01:00
David Cooper
b793e5f83d Merge branch '2.9dev_html' into html_reserved 2017-02-27 13:27:16 -05:00
David Cooper
3e42b2fde9 Merge branch '2.9dev' into negotiated_cipher 2017-02-27 13:26:15 -05:00
Dirk
79a8a02328 adding spring boot header detection 2017-02-27 19:16:29 +01:00
Dirk
ac193a8ef0 adding spring boot header detection 2017-02-27 19:12:59 +01:00
David Cooper
0ada7b100c Handle HTML reserved characters in headers
So far I haven't seen any HTML reserved characters (&, <, >, ", ') in the strings processed by `emphasize_stuff_in_headers()`, so this PR may be unnecessary. However, this PR will ensure that any such characters will be properly escaped in the HTML output.
2017-02-27 11:49:51 -05:00
David Cooper
f53afdc149 Redo emphasize_stuff_in_headers()
This PR re-implements `emphasize_stuff_in_headers()` in the HTML branch to more closely match the version in 2.9dev.
2017-02-27 11:17:19 -05:00
David Cooper
915cadd20d Merge PR #646 into 2.9dev_html
This PR just brings 2.9dev_html up to date with 2.9dev.
2017-02-27 10:34:04 -05:00
David Cooper
e3c94d2a92 Merge branch '2.9dev' into negotiated_cipher
Conflicts:
	testssl.sh
2017-02-27 09:06:17 -05:00
Dirk
2232929bc5 Polish #646
"=~" doesn't need quotes if there's a text string one wants to match against (and shellcheck complains
about this)

pr_magenta shouldn't be used anymore as the logic what color we use should be done
some place else.
2017-02-27 13:43:23 +01:00
Dirk Wetter
f7c3139545 Merge pull request #646 from dcooper16/rfc-only
Add option to print only the RFC cipher names
2017-02-27 13:30:11 +01:00
Dirk
4727a69a62 fixed segfaults 2017-02-25 17:15:18 +01:00
Dirk
8d66786e42 Just saving my workJust saving my work ...
This branch is for getting the HTML patch from @dcooper16 into 2.9dev

Change to David's PR:
* removed HTMLHEADER. We always want that (in fact for flat JSON this is missing and needs to be added)
* not sure what this change does to --file
* changing of names  They were redundant sometimes (pr_*_term )
* some formatting for readbility

Open points:
* there's a loop and a segfault --> tm_done_best
* HTMLHEADER: --file
* the former sed statement aroung L1900 for the header was way more readable. The combined
  html+terminal version is just too much. Maybe a switch whether HTML is requested
  is better so that this can be separated.
  * Then e.g. "<span style=\"color:olive;font-weight:bold" can be kept in a variable
  * any reason we need the text length here?
* what went into main here is too much. Actuallly what I put already in there bothered
  me as too much logic and not obvious dependencies are in here. Now it's worse :-)
  Can't this be just similar to JSON or CSV -- a seperate function with hooks
  not in main()?
* minor thing: TERM_WIDTH is for HTML is maybe not the best. But that can be
  tackled later
2017-02-25 16:31:30 +01:00
Dirk
b10942a92e Merge branch 'generate_html' of https://github.com/dcooper16/testssl.sh into dcooper16-generate_html 2017-02-25 12:21:33 +01:00
Todd Swatling
12c3de7039 added missing herestring redirect (<<<) in find_openssl_binary function 2017-02-24 15:59:34 -05:00
Todd Swatling
783b909804 removed trailing spaces 2017-02-24 15:56:26 -05:00
David Cooper
1de12e4b01 Merge branch '2.9dev' into rfc-only 2017-02-24 11:07:28 -05:00
David Cooper
51fb93908b Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-24 11:07:00 -05:00
David Cooper
bd1f02d83f Merge branch '2.9dev' into negotiated_cipher 2017-02-24 10:57:14 -05:00
Dirk Wetter
e7e9a3ed66 addressing #645 before #554 has been addressed 2017-02-24 16:26:22 +01:00
Dirk Wetter
4361bb7cce housekeeping/ cleanup 2017-02-24 16:22:59 +01:00
David Cooper
8a9d3fbd6a Merge branch '2.9dev' into rfc-only 2017-02-23 11:32:16 -05:00
David Cooper
59330a93e5 Merge branch '2.9dev' into generate_html 2017-02-23 11:31:35 -05:00
David Cooper
4c7e89f01c Merge branch '2.9dev' into negotiated_cipher 2017-02-23 11:30:52 -05:00
Dirk
b4f59e91be FIX #621 2017-02-23 17:19:52 +01:00
David Cooper
6a1c519acd Add option to print only the RFC cipher names
This PR attempts to address #631. It allows four choices for the `--mapping` option. "openssl" (default), "rfc", "no-openssl", and "no-rfc".

* "openssl" is the current default

* "no-rfc" shows only the OpenSSL names (just as it currently does)

* "rfc" shows the RFC name rather than the OpenSSL name for things that are not in wide now (just as it currently does). But now, in wide mode, it shows the RFC name first (further to the left) and the OpenSSL name second.

* "rfc-only" shows only the RFC name.

If the `--mapping` option is not provided, this is the same as "openssl". If the "cipher-mapping.txt" file cannot be found, then testssl.sh runs as if "no-rfc" had been requested.
2017-02-23 09:31:41 -05:00
David Cooper
5ffd01ed9a Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-21 16:59:33 -05:00
David Cooper
7f70df32c9 Merge branch '2.9dev' into negotiated_cipher 2017-02-21 16:57:17 -05:00
Dirk Wetter
8919b419e5 Merge pull request #642 from dcooper16/wrap_long_lines
Wrap long lines in display_rdns_etc()
2017-02-21 22:51:24 +01:00
David Cooper
191d19be32 Use egrep -v to remove unwanted lines 2017-02-21 15:47:59 -05:00
David Cooper
5aaf78cff6 Fix issue #643
It seems that the head command on OS X does not accept a negative number as a value for the "-n" parameter. This PR provides an alternative method for removing the "generator:  " line without using "head."
2017-02-21 15:22:47 -05:00
David Cooper
c3d59b655f Add $CORRECT_SPACES to indentation 2017-02-21 13:46:59 -05:00
David Cooper
62db2ae6bf Wrap long lines in display_rdns_etc()
Some sites have a long list of IP addresses and some IP addresses have a long list of DNS names that map to them.

This PR changes `display_rdns_etc()` to use `out_row_aligned_max_width()` to print the other IP addresses in `$IP46ADDRs` and to print `$rDNS`.
2017-02-21 13:36:23 -05:00
David Cooper
4f73d74ee3 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-21 09:27:25 -05:00
David Cooper
a0e961e1f3 Merge branch '2.9dev' into negotiated_cipher 2017-02-21 09:24:21 -05:00
Dirk
be079acb5e - collect more TLS extensions 2017-02-21 11:16:14 +01:00
Dirk Wetter
6b90152f52 Merge pull request #639 from dcooper16/must_staple
OCSP must staple
2017-02-20 12:31:16 +01:00
Dirk Wetter
52a0d44b90 Merge pull request #637 from dcooper16/print_negotiaed_cipher
Printing Negotiated cipher
2017-02-20 11:46:24 +01:00
Dirk
bfbaba4ea7 - trying to address #640 . Better a bit pessimistic here... 2017-02-20 09:44:52 +01:00
Dirk
c284185c56 - try to address #638 2017-02-18 13:22:17 +01:00
David Cooper
4b1435f958 Make link from redirect URL
If the HTTP Status Code includes a redirect URL, then make the URL a hyper link in the HTTP output.
2017-02-17 16:40:50 -05:00
David Cooper
8c607d425e OCSP must staple
RFC 7633 introduces the TLS Features certificate extension, which contains "Features:
> The object member "Features" is a sequence of TLS extension identifiers (features, in this specification's terminology) as specified in the IANA Transport Layer Security (TLS) Extensions registry.  If these features are requested by the client in its ClientHello message, then the server MUST return a ServerHello message that satisfies this request.

The main purpose of this certificate extension is to implement "must staple." If the extension is present in a TLS server's certificate and it includes status_request, then the server MUST include a stapled OCSP response if the client requests one. (The same applies for the status_request_v2 extension.)

This PR adds a check to `certificate_info()` of whether the server supports must staple (i.e., whether its certificate includes a TLS Features extension with "status_request"). It also changes the output for "OCSP stapling" in the case that the server did not staple an OCSP response. It indicates that:
* it is a critical issue if the certificate specifies "must staple"
* it is a low severity issue if the certificate does not specify "must staple," but the certificate does include an OCSP URI.
* it is not an issue at all if the certificate does not specify "must staple" and certificate does not include an OCSP URI.
2017-02-17 15:20:37 -05:00
David Cooper
a26425af71 Printing Negotiated cipher
`run_server_preference()` prints out the server's Negotiated cipher in a different color depending on the quality of the cipher. However, there is a "FIXME" since CBC ciphers are supposed to be flagged, but it is not easy to identity all CBC ciphers from their OpenSSL names.

This PR partially addresses this. It creates a separate function for printing a cipher based on its quality. Whenever possible it determines the quality of the cipher based on the RFC name. However, if it is provided an OpenSSL name and no cipher-mapping.txt file is available, it will follow the current (imperfect) logic for determining the cipher's quality.

The function also returns a value that indicates the quality of the cipher provided, with higher numbers indicating better ciphers. This return value is used by `run_server_preference()` to determine how to populate the "severity" field when calling `fileout()`.
2017-02-17 11:20:11 -05:00
David Cooper
677a06d3aa Merge branch '2.9dev' into generate_html 2017-02-16 13:19:58 -05:00
David Cooper
c8f3dd0db0 Merge branch '2.9dev' into negotiated_cipher 2017-02-16 13:19:07 -05:00
Dirk
d2cbbaf0b1 - FIX #636
- polish
2017-02-16 19:10:59 +01:00
David Cooper
2eeeff6618 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-15 15:43:21 -05:00
David Cooper
d1ab98c5e2 Merge branch '2.9dev' into negotiated_cipher 2017-02-15 15:41:37 -05:00
Dirk Wetter
a973386c0a Merge pull request #635 from dcooper16/run_protocols_bugfix
run_protocols() bug fix
2017-02-15 19:44:53 +01:00
Dirk
c204a0b942 --proxy=auto takes now the value from https_proxy
- made DNS lookups safe (CNAME) and awk'd them almost completely ;-)
- invocation of just testssl.sh shows help again
2017-02-15 19:40:06 +01:00
David Cooper
2456c80821 Fix early newline
In the case that `tls_sockets()` is being used and the server incorrectly fails the connection rather than downgrading, testssl.sh is printing "not offered" on one line and then the error message on the next line, but all the text should appear on one line (as it does when testing TLS 1 and TLS 1.1).
2017-02-15 11:47:11 -05:00
David Cooper
efdb8c036d Merge branch '2.9dev' into run_protocols_bugfix 2017-02-15 08:45:01 -05:00
David Cooper
1cfd638345 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-15 08:44:09 -05:00
David Cooper
58f389b7cd Merge branch '2.9dev' into negotiated_cipher 2017-02-15 08:42:41 -05:00
Dirk Wetter
502601c95e Merge pull request #633 from k0ste/2.9dev_newfeature
DNS CAA: drill query support.
2017-02-15 14:01:36 +01:00
Konstantin Shalygin
cdc5e89b64
DNS CAA: drill query support. 2017-02-15 19:50:08 +07:00
David Cooper
004cbad07b run_protocols() bug fix
Since the test for TLS 1.2 in `run_protocols()` now uses `tls_sockets()` whenever `$ssl_native` is `true` (i.e., there is no longer a requirement for `$EXPERIMENTAL` to be true as well), the `$EXPERIMENTAL` flag should no longer be checked if the return value is 1.
2017-02-14 16:43:46 -05:00
David Cooper
e4aef3fdad Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-14 16:27:46 -05:00
David Cooper
2e76dff0ea Merge branch '2.9dev' into negotiated_cipher 2017-02-14 16:25:27 -05:00
Dirk
4b193119b3 - made CCS I more robust, FIX #313
- removed cats ;-) FIX #352
2017-02-14 21:56:31 +01:00
Dirk
422171a0fa - fixed bug where terminal width was not inherited in file batch mode so that terminal wdith appeared to be 80 chars
- hint when URI is missing
- PFS_CIPHERs rather locally
2017-02-14 20:40:38 +01:00
David Cooper
7cbd4ade01 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-14 14:10:22 -05:00
David Cooper
8c165fd3da Merge branch '2.9dev' into negotiated_cipher 2017-02-14 14:06:18 -05:00
Dirk
a22e4e5228 - fix heartbleed detection which sometimes case false psoitives over slow connections like sattelite links, partially addressing #352
- start revamping run)ccs_injection
- fix missing space in BEAST after protocol
2017-02-14 19:45:14 +01:00
David Cooper
48088bbceb Cleanup
Rearrange code so that in the case of just a single test, `parse_hn_port()` is not called earlier than it was previously unless it needs to be called in order to create the HTML file name.

Doing this ensures that the banner is displayed even if the `$URI` cannot be parsed (except in the case that the `$URI` needs to be parsed in order to create a file name) and that any error messages created by `parse_hn_port()` will be included in the HTML, if possible.
2017-02-14 13:44:03 -05:00
David Cooper
308b24cbe9 Let testssl.sh create HTML file name
Add option for testssl.sh to create the HTML file name. If testssl.sh creates the file name, then, in the case of mass testing, a separate HTML file is created for each test (i.e., for each line in the file provided to `--file`).
2017-02-14 13:19:12 -05:00
David Cooper
e2161aef5e Rearrange code
Just a slight rearrangement of the code in order to remove some redundancy.
2017-02-14 10:04:42 -05:00
David Cooper
76c34dd148 Negotiated cipher per proto bugfix
I have a test server that I configured to support only SSLv3 and TLSv1.2. When I set `SSLHonorCipherOrder` to `off` I get the following results:
```
     ECDHE-RSA-AES256-SHA:          SSLv3     ECDHE-RSA-AES256-GCM-SHA384:   TLSv1.2
```
The current code, when printing TLSv1.2 checks whether `${cipher[4]}` is empty, and since it is assume no previous protocol (SSLv2, SSLv3, TLSv1, TLSv1.1) was supported and so doesn't output a newline before outputting the cipher and protocol for TLSv1.2.

This PR fixes that by changing to code to look at the previous non-empty cipher (if there is one), even if that does not come from the previous protocol.
2017-02-14 09:53:38 -05:00
David Cooper
61b5539ca6 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-14 08:50:56 -05:00
David Cooper
1dc132c6a4 Option to show RFC cipher names
When a list of cipher suites is being displayed using `neat_list()`, testssl.sh shows the cipher suite's OpenSSL name and (in most cases) the RFC name as well. However, in all other cases only the OpenSSL name is shown.

This PR adds the option to have cipher suite's RFC names shown instead of the OpenSSL name, by including `--mapping rfc` in the command line. [Note: if the cipher-mapping.txt file cannot be found, then the `--mapping rfc` option is ignored and the OpenSSL names are shown.]

This PR seems to be related to issue #9, but #9 may be been referring to the output created by `neat_list()`.
2017-02-13 16:07:25 -05:00
David Cooper
e953c737d1 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-13 09:14:22 -05:00
Dirk
7d6f1eb46f polishing #628, mostly make sure we automatically align to terminal width 2017-02-13 09:06:10 +01:00
Dirk Wetter
21cd97b08a Merge pull request #628 from dcooper16/format_long_lines
Wrap long lines
2017-02-13 08:52:07 +01:00
Dirk
d2f688e925 CAA RR belongs also in JSON, see #588 2017-02-11 14:16:18 +01:00
Dirk
8dabc28280 also made sure that all old dns binaries work (SLES 11, FreeBSD 9) 2017-02-11 14:01:51 +01:00
David Cooper
376fb95d04 Follow $COLOR value in HTML output
Use the value of `$COLOR` to affect the HTML output in addition to the output to the terminal.
2017-02-10 17:08:49 -05:00
David Cooper
fea2558b20 Show gray for COLOR=1
Gray should appear for COLOR=1 or COLOR=2.

Since `pr_grey()` is basically the same as `out()` for COLOR=0, `mybanner()` should just call `pr_grey()` without checking the value of `$COLOR`.
2017-02-10 16:30:14 -05:00
David Cooper
f633ce67d6 Color change
Change `emphasize_stuff_in_headers()` to use olive and bold olive rather than brown and yellow. This matches what `aha` creates and appears similar to what is displayed in the terminal on a Mac. Also, yellow text is very difficult to read.
2017-02-10 15:05:43 -05:00
David Cooper
2652362ce0 Final fixes
Found more places where output should only go to terminal, or where it was only going to the terminal (e.g., printf) but should also be in the HTML. Also added the ability to include active URLs in the HTML output.

To Do: Handle automatic generation of HTML file name and support for parallel testing.
2017-02-10 14:47:49 -05:00
David Cooper
2b5324b8ef Fix emphasize_stuff_in_headers()
Changed `emphasize_stuff_in_headers()` so that the appropriate coloring would appear both in the terminal and in the HTML. It's slow, but it works.
2017-02-10 10:59:20 -05:00
David Cooper
a50488c44f Handle --file option
Introduced "trick" so that if the `--file` option is used, `html_header()` will only be called once before anything is printed and `html_footer()` will only be called once after all printing is complete. With this, `html_header()` now delete the output file if it exists.

Also introduced the `html_reserved()`, which is called for all text to be sent to `out_html()`. `html_reserved()` converts any HTML reserved characters (", ', &, <, >) to their corresponding entity names (&quot;, &apos;, &amp;, &lt;, &gt;).
2017-02-09 17:03:21 -05:00
David Cooper
45379ce1f9 Fix subjectAltName indendation
The PR didn't account for the indentation of the subjectAltName differing depending on whether the server has one or more than one certificate.
2017-02-09 13:29:22 -05:00
David Cooper
c92131c072 Don't collect number of bits in run_pfs()
The `bits` array is no longer needed in `run_pfs()` since the information collected is not being used.
2017-02-09 11:45:29 -05:00
David Cooper
d4455081f0 Wrap long lines
This PR addresses the issue raised in #623. This PR is based on the function `out_row_aligned_max_width()` that I proposed in #623, but the `out_row_aligned_max_width()` in this PR is a little different. It takes a fourth parameter, which is the function to use to print each word in the text string to be printed. This is used in `run_pfs()` so that the "Elliptic curves offered" can be printed using this function (some servers support 25 curves), while still having the curves printed using color-coding to indicate the quality of each curve.

I somewhat arbitrarily have each line wrap at 120 characters, but that could be changed (e.g., to `$TERM_WIDTH`).
2017-02-09 11:36:24 -05:00
David Cooper
1c5ef78913 Another update to HTML colors
For the most part I used the RGB values for xterm from https://en.wikipedia.org/wiki/ANSI_escape_code#Colors for the HTML colors, but with a few exceptions. For example, I did not use "yellow" for `pr_svrty_low()`, since that color is very difficult to read. I also used a different color for `pr_svrty_medium()` so that `pr_svrty_medium()` would appear more red than `pr_svrty_low()`.

These color choices could use more adjustment.
2017-02-08 15:16:51 -05:00
David Cooper
be6bafaec4 Merge branch '2.9dev' into generate_html
Conflicts:
	testssl.sh
2017-02-08 10:04:14 -05:00
Dirk
386aa92448 keep detected status of WSL / bash on windows in a variable, see also #620 2017-02-08 09:08:05 +01:00
Dirk
0200100750 see #620 2017-02-08 08:58:28 +01:00
Dirk Wetter
0b7e9b18b8 Merge pull request #620 from teward/2.9dev
Attempt to force system binaries for WSL
2017-02-08 08:54:20 +01:00
Dirk Wetter
0810f2a719 Merge pull request #609 from dcooper16/handle_supported_groups
Handle renaming of the Supported Elliptic Curves Extension
2017-02-08 08:11:23 +01:00
Dirk
0d993427a3 - enabling TLS 1.2 via sockets
- enabling sockets in run_protocols STARTTLS per default
- minor output polishing
2017-02-07 23:08:29 +01:00
David Cooper
2af8198f27 Change HTML colors
Rather than use the colors created by `aha` use colors that more closely match the colors that appear in the terminal.
2017-02-07 17:06:27 -05:00
Thomas Ward
6140aa8b8c Attempt to force system binaries for WSL 2017-02-07 15:59:09 -05:00
David Cooper
dc9e3bfb58 Add option to create HTML
This PR adds the option to generate HTML. The code was created as follows:

* For each output function (`out()`, `outln()`, `pr_liteblue()`, etc.) I created two functions: one that just outputs to the terminal and one that outputs to the terminal and to the HTML file (if an HTML file is to be created).

* I modified the code so that any output that should appear in the HTML file in addition to being displayed on the terminal is sent through one of the display functions: out()`, `outln()`, `pr_liteblue()`, etc.

* I created a new function `retstring()` to use in place of `out()` when a function is creating a string to be "captured" by the calling function.

* I modified the code so that no string returned by a function includes color-coding escape characters.
2017-02-07 14:25:41 -05:00
David Cooper
4fab1830cb Merge branch '2.9dev' into handle_supported_groups 2017-02-06 13:49:05 -05:00
Dirk
48e264a193 fixed regression #611 2017-02-06 17:47:17 +01:00
David Cooper
321d5e0c9d Merge branch '2.9dev' into handle_supported_groups 2017-02-06 08:47:11 -05:00
Dirk
54e0395969 Reverse #600 but leave the hook in here, ANSI code for strikethru 2017-02-06 11:06:59 +01:00
Dirk Wetter
03daa1be35 Merge pull request #608 from dcooper16/neat_list_camelliagcm
Fix neat_list() for Camellia GCM
2017-02-06 10:41:01 +01:00
Dirk
a9cddd7afb see #611 2017-02-04 15:11:03 +01:00
Dirk Wetter
e95f9a8d0a Merge pull request #611 from dcooper16/print_two_CRL_or_OCSP_URI
Fix Two CRL and/or two OCSP URLs
2017-02-04 15:06:18 +01:00
Dirk
3a21097cc5 HTTP/1.1 GET handler for #254 2017-02-04 14:13:33 +01:00
Dirk Wetter
59c3286775 Merge pull request #612 from dcooper16/update_fix_587
Update fix to 587
2017-02-04 12:14:09 +01:00
AlGreed
8457c1ce9e corrected path to common_primes_file in logjam 2017-02-04 01:38:18 +01:00
Dirk
5046b80414 first draft of LUCKY13 (128 cipher limit has to be addressed) 2017-02-03 22:36:04 +01:00
David Cooper
79bfe1103c Merge branch '2.9dev' into update_fix_587 2017-02-03 08:47:29 -05:00
David Cooper
b2de5c4ac9 Merge branch '2.9dev' into print_two_CRL_or_OCSP_URI 2017-02-03 08:46:40 -05:00
David Cooper
f273b5ed8c Merge branch '2.9dev' into handle_supported_groups 2017-02-03 08:45:40 -05:00
David Cooper
da59ea11c2 Merge branch '2.9dev' into neat_list_camelliagcm 2017-02-03 08:44:36 -05:00
Dirk
925e1061b2 - renamed pr_svrty_minor --> pr_svrty_low to reflect the level literally
- minor polishing
2017-02-03 13:03:22 +01:00
Dirk
b9232fd5d0 Fix TLS_FALLBACK_SCSV detection for non RFC compliants F5 loadbalancers. They pass now the test but get additonally penalized for their non compliance, see also https://github.com/drwetter/testssl.sh/issues/121#issuecomment-113790270 2017-02-03 11:47:21 +01:00
David Cooper
e7c7e7ba19 Update fix to 587
In the revised code that was created to address #587, nothing is printed after "OCSP URI" if there is neither an OCSP URI nor a CRL URI. Instead, "--" should be printed.

I still believe that there is an inconsistency in the reporting of the output, however. At the moment, the "Certificate Revocation List" and "OCSP URI" lines indicate it is acceptable as long as the certificate contains either a CRL URI or an OCSP URI. However, the "OCSP stapling" line reports a minor finding if an OCSP response was not included in the server's reply. Shouldn't we just assume that if the certificate doesn't include an OCSP URI, then it wouldn't be possible for the server to obtain an OCSP response to staple to its reply? If so, then it seems that no OCSP stapling should only be considered a finding if an OCSP URI is present.
2017-02-02 15:52:32 -05:00
David Cooper
e9d6ac8ad1 Fix Two CRL and/or two OCSP URLs
This PR fixes issue #601.

The fix for OCSP URLs was easy. I don't entirely understand the first `awk` command in the line to extract the CRL URLs, but I tested it on several certificates and it seems to work correctly (ensuring that the only "URI" lines in the input to the second `awk` command are from the CRL Distribution Points extension).
2017-02-02 13:04:49 -05:00
David Cooper
7a378c44dc Merge branch '2.9dev' into handle_supported_groups 2017-02-02 09:13:33 -05:00
David Cooper
898438ec17 Merge branch '2.9dev' into neat_list_camelliagcm 2017-02-02 09:12:42 -05:00
Dirk
ec7aa2481a - SWEET32. Note this is still NOT COMPLETE (ciphers!) and needs more testing 2017-02-02 14:42:06 +01:00
David Cooper
f1eb3b85de Handle renaming of the Supported Elliptic Curves Extension
RFC 4492 introduced the Supported Elliptic Curves Extension, but this extension was renamed Supported Groups in RFC 7919. Following RFC 7919 (and TLSv1.3), `parse_tls_serverhello()` refers to this extension as "supported groups/#10". Since, at the moment, OpenSSL's s_client refers to this extension as "elliptic curves/#10", the extension sometimes appears twice in the "TLS extensions" line, if it is detected by both OpenSSL (in `get_server_certificate()`) and `tls_sockets()` (in `determine_tls_extensions()`):
```
 TLS extensions (standard)    "renegotiation info/#65281" "elliptic curves/#10" "EC point formats/#11" "supported groups/#10"
```
This PR fixes the problem of the extension appearing twice in the "TLS extensions" line by replacing any instances of "elliptic curves/#10" with "supported_groups/#10" in the `$tls_extensions` line extracted from `$OPENSSL s_client`. This PR also changes "supported groups/#10" to "supported_groups/#10" in `parse_tls_serverhello()`, since the current development branch of OpenSSL uses "supported_groups" to refer to this extension (see https://github.com/openssl/openssl/pull/1825).
2017-02-01 15:43:15 -05:00
David Cooper
d93f7031ac Fix neat_list() for Camellia GCM
This PR increases the width of the "Encryption" column printed by `neat_list()` in order to allow room to print "CamelliaGCM."

This is the alternative fix to the problem that was first addressed in #524. This PR obsoletes PR #530.
2017-02-01 13:31:58 -05:00
David Cooper
392dac0e39 Just print entire line in light grey 2017-01-30 09:32:47 -05:00
David Cooper
17db208756 Merge branch '2.9dev' into unsupported_ciphers_in_litegrey 2017-01-30 09:02:15 -05:00
Dirk
a7dff83160 $NODE is fine, removing $MX_HOSTNAME, #603 2017-01-29 10:46:35 +01:00
AlGreed
f07c723d59 added mx hostname for json-pretty output 2017-01-28 18:11:39 +01:00
AlGreed
fcd208b2c9 ... 2017-01-28 08:09:02 +01:00
AlGreed
04c653646e ... 2017-01-28 07:54:58 +01:00
AlGreed
29d6cbc125 Added support of multiple servers to json-pretty format; added fileout for smtp 2017-01-28 07:17:58 +01:00
David Cooper
d47601f413 Print unsupported ciphers in light grey
This PR changes testssl.sh so that when ciphers are being listed in wide mode (i.e., using `neat_list()`) and the `--show-each` option is set, ciphers that are not available are printed in light grey, whereas ciphers that are available continue to be printed in black. This makes it easier to distinguish between ciphers that are available and those that are not (the "available/"not a/v" column remains).

This PR does not change the way that ciphers that are available are printed, but it includes a hook that would allow that to change. For example, for ciphers that are available, the name of the cipher suite could be printed in a different color depending on its quality (as is done for the "Negotiated cipher" in `run_server_preference()`). The same could be done for the "Encryption" and "Bits" columns.
2017-01-25 10:41:36 -05:00
David Cooper
1ee75689e0 Fix typo in tls_sockets()
This PR just fixes a minor bug in `tls_sockets()`, changing
```
debugme "stuck on sending: $ret"
```
to
```
debugme echo "stuck on sending: $ret"
```
2017-01-25 08:57:20 -05:00
David Cooper
db4108cec5 Merge branch '2.9dev' into cipher_order_sockets 2017-01-24 08:46:40 -05:00
Dirk
2a5d56a9d6 help aviod misunderstanding, see #594 and some reordering 2017-01-24 08:37:19 +01:00
David Cooper
156787adec Merge branch '2.9dev' into cipher_order_sockets 2017-01-23 11:22:42 -05:00
Dirk
4911aaf05b Fix #593 2017-01-23 11:33:18 +01:00
Dirk Wetter
8988411fbc Merge pull request #565 from dcooper16/run_server_preference_sockets
Use sockets in run_server_preference()
2017-01-21 19:55:37 +01:00
Dirk
f80e1ecfdb - enable CAA per default (#588)
- hex2ascii() for converting strings
- swap quoted output in -S to italic (mostly)
2017-01-21 19:43:07 +01:00
Dirk
f2303a0d79 - poodle output polishing
- minor polish of #552
2017-01-21 18:08:31 +01:00
Dirk Wetter
d448ebbc77 Merge pull request #552 from dcooper16/run_beast_sockets
run_beast() speedup + sockets
2017-01-21 18:01:55 +01:00
Dirk
2b440f15ea - polishing #570
- run_logjam() terminates if no local DH export ciphers are configured
2017-01-21 16:52:02 +01:00
Dirk Wetter
20cc3bc435 Merge pull request #570 from dcooper16/run_ssl_poodle_sockets
Use sockets for run_ssl_poodle()
2017-01-21 14:37:36 +01:00
Dirk
e083fab130 - run_logjam(): run_logjam(0 fixed error where logjam couldn't parse "ServerKeyExchange" message using SSL_NATIVE -- if TLS != 1.2 was returned
- run_logjam(): determine dh bit size and based on this mark the common primes as more or less vulnerable
- run_logjam(): renamed remaining dhe variable to dh
- further house keeping in run_logjam()
2017-01-19 14:45:19 +01:00
Dirk
e3d183e909 -output correction run_logjam
- rename dhe to dh
2017-01-18 22:05:27 +01:00
David Cooper
211ce0b3fd Merge branch '2.9dev' into run_ssl_poodle_sockets 2017-01-18 15:00:32 -05:00
David Cooper
0cdbe95302 Merge branch '2.9dev' into run_beast_sockets 2017-01-18 14:59:53 -05:00
David Cooper
a016b946fd Merge branch '2.9dev' into run_server_preference_sockets 2017-01-18 14:59:07 -05:00
David Cooper
86ac32cd0d Merge branch '2.9dev' into cipher_order_sockets 2017-01-18 14:57:59 -05:00
Dirk
05d27ff1be - FIX for the last mess submitted ;-) 2017-01-18 18:09:39 +01:00
Dirk
61b16a078a - file etc/common-primes was not edited correctly! 2017-01-18 16:38:09 +01:00
Dirk
8bf7b6b31b forgot to save work, followup to 4433345b16 , #120, #589 2017-01-18 16:23:18 +01:00
Dirk
4433345b16 - first implementation (draft) of LOGJAM common primes, see #589, #120
- output polishing of run_drown()
- polishing of run_logjam()
- decrease severity to high for LOGJAM, see CVE rating
2017-01-18 15:53:01 +01:00
David Cooper
643b80c541 Merge branch '2.9dev' into run_ssl_poodle_sockets 2017-01-17 09:07:21 -05:00
David Cooper
149c822f38 Merge branch '2.9dev' into run_beast_sockets 2017-01-17 09:05:52 -05:00
David Cooper
b8953fa31f Merge branch '2.9dev' into run_server_preference_sockets 2017-01-17 09:04:40 -05:00
David Cooper
76f1cb18d0 Merge branch '2.9dev' into cipher_order_sockets 2017-01-17 09:03:13 -05:00
Dirk
e9916dd1f4 - FIX #566
- reorder get_<DNS>_record() for better overview
- move CMDLINE__IP away from main into determine_ip_addresses() where it belongs to
2017-01-17 13:57:14 +01:00
Dirk
e7a35934ae add lf before -E 2017-01-17 12:00:18 +01:00
Dirk Wetter
5ea5ae5a53 Merge pull request #571 from dcooper16/run_freak_sockets
Use sockets for run_freak()
2017-01-17 11:41:50 +01:00
Dirk
a3a30c7fa5 - CAA RR (expertimental)
- replace some sed+grep by awk in get_mx_record()
2017-01-17 11:19:57 +01:00
Dirk
cdbdc51f5d fix #587 2017-01-16 14:06:32 +01:00
Dirk Wetter
350c2e09bb Merge pull request #576 from dcooper16/extend_logjam_phase_1
Extend logjam phase 1
2017-01-14 21:40:29 +01:00
Dirk Wetter
ad7eeddb96 Merge pull request #579 from dcooper16/run_crime_sockets
Use sockets for run_crime()
2017-01-14 13:18:22 +01:00
Dirk Wetter
354e0ed31a Merge pull request #585 from dcooper16/show_selected_curve
Show selected curve
2017-01-14 12:12:33 +01:00
David Cooper
c5dcaf476f Remove redundant setting to success to 0 2017-01-13 12:18:32 -05:00
David Cooper
91e0da3485 Detect support for encrypt-then-mac extension
In some cases, the "TLS extensions" line output for the "--server-defaults" option will not show `"encrypt-then-mac/#22"` even if the server supports this extension. The reason is that a server will only include this extension in the ServerHello message if it supports the extension and the selected cipher is a CBC cipher. So, if `determine_tls_extensions()` connects to the server with a non-CBC cipher, then it will not detect if the server supports the encrypt-then-mac extension.

It is possible that support for the extension will be detected by `get_server_certificate()`, but only if one of the calls to that function results in a CBC cipher being selected and OpenSSL 1.1.0 is being used (as prior versions did not support the encrypt-then-mac extension).

In this PR, if `determine_tls_extensions()` is called and `$TLS_EXTENSIONS` does not already contain `"encrypt-then-mac/#22"`, then an attempt will be made to connect to the server with only CBC ciphers specified in the ClientHello. If the connection is not successful (presumably because the server does not support any CBC ciphers), then a second connection attempt will be made with the "default" ciphers being specified in the ClientHello.

en.wikipedia.org is an example of a server that supports the encrypt-then-mac extension, but for which the support is not currently detected (unless OpenSSL 1.1.0 is used) since in the call to `determine_tls_extension()` a non-CBC cipher is selected.
2017-01-13 12:13:20 -05:00
David Cooper
42da64d601 Show selected curve
This PR changes `read_dhbits_from_file()` so that, when the "quiet" parameter is absent, the selected curve is shown in addition to the number of bits. This PR only affects the output of `run_client_simulation()` and the `Negotiated cipher` in `run_server_preference()`.
2017-01-13 10:28:48 -05:00
David Cooper
77dbe7ed1b Merge branch '2.9dev' into run_crime_sockets 2017-01-13 09:09:04 -05:00
David Cooper
859ea0c7d3 Merge branch '2.9dev' into run_freak_sockets 2017-01-13 09:08:02 -05:00
David Cooper
eabaa95163 Merge branch '2.9dev' into extend_logjam_phase_1 2017-01-13 09:07:12 -05:00
David Cooper
545a4543bc Merge branch '2.9dev' into run_ssl_poodle_sockets 2017-01-13 09:06:04 -05:00
David Cooper
e2dca3e845 Merge branch '2.9dev' into run_beast_sockets 2017-01-13 09:05:02 -05:00
David Cooper
1169e3daef Merge branch '2.9dev' into run_server_preference_sockets 2017-01-13 09:04:10 -05:00
David Cooper
43d495aa65 Merge branch '2.9dev' into cipher_order_sockets 2017-01-13 09:03:00 -05:00
Dirk Wetter
436326a547 Merge pull request #573 from dcooper16/run_std_cipherlists_sockets
Use sockets for run_std_cipherlists()
2017-01-13 14:44:43 +01:00
David Cooper
1a705f900f run_client_simulation() bugfix
There are two places in `run_client_simulation()` in which `$OPENSSL s_client` is called, after which there is a `debugme echo` line to display the `$OPENSSL s_client` command line when testssl.sh is being run in debug mode, and then `sclient_connect_successful $? $TMPFILE` is called to determine whether `$OPENSSL s_client` successfully established a connection.

So, `sclient_connect_successful()` is being passed the result of the `debugme()` call, which always returns 0, rather than the result of the `$OPENSSL s_client` call.

This PR fixes the problem by moving the `debugme()` line to before the call to `$OPENSSL s_client`, so that  `sclient_connect_successful()` is passed the results of the `$OPENSSL s_client` call.
2017-01-12 14:59:29 -05:00
David Cooper
c9119dd8ee Use static lists for sockets 2017-01-12 13:09:11 -05:00
David Cooper
92d1daa976 Merge branch '2.9dev' into run_crime_sockets 2017-01-09 09:06:10 -05:00
David Cooper
d011803ae8 Merge branch '2.9dev' into run_std_cipherlists_sockets 2017-01-09 09:03:18 -05:00
David Cooper
be7bb01815 Merge branch '2.9dev' into run_freak_sockets 2017-01-09 09:02:23 -05:00
David Cooper
c8d04d7bab Merge branch '2.9dev' into extend_logjam_phase_1
Conflicts:
	testssl.sh
2017-01-09 09:01:31 -05:00
David Cooper
cb362f6082 Merge branch '2.9dev' into run_ssl_poodle_sockets 2017-01-09 08:54:20 -05:00
David Cooper
d1238f201e Merge branch '2.9dev' into run_beast_sockets 2017-01-09 08:53:24 -05:00
David Cooper
cc4ab5cdec Merge branch '2.9dev' into run_server_preference_sockets 2017-01-09 08:52:26 -05:00
David Cooper
85afbbd6ed Merge branch '2.9dev' into cipher_order_sockets 2017-01-09 08:51:10 -05:00
Dirk Wetter
33ca94f6e8 Merge pull request #577 from dcooper16/run_server_defaults_bugfix
run_server_defaults() bugfix
2017-01-08 15:59:45 +01:00
Dirk Wetter
b99371c069 Merge pull request #578 from dcooper16/fix_sslv2_sockets
sslv2_sockets() bug fixes
2017-01-08 15:58:01 +01:00
David Cooper
95c75f1792 Add support for OpenSSL 1.1.0
Starting with OpenSSL 1.1.0, s_client will not offer TLS compression methods, even if OpenSSL is compiled with zlib support, unless the `-comp` flag is included in the command line.
2017-01-05 15:45:18 -05:00
David Cooper
ab9eb6044e Use sockets for run_crime()
This PR changes `run_crime()` to use `tls_sockets()` rather than failing if `$OPENSSL` lacks zlib support, unless `$SSL_NATIVE` is `true`.

At the moment, the ClientHello created by `socksend_tls_clienthello()` only specifies the NULL compression method. So, this PR adds a new parameter to `socksend_tls_clienthello()` and `tls_sockets()` to allow to caller to request that additional compression methods (DEFLATE and LZS) be specified in the ClientHello.

This PR makes another change to `run_crime()`. At the moment, if `$OPENSSL s_client` fails to connect to the server, `run_crime()` will report that the server is not vulnerable, since the output from `$OPENSSL s_client` includes the line "Compression: NONE" (see below). This PR changes that by checking whether the connection was successful, and reporting a "test failed (couldn't connect)" warning if it wasn't successful, rather than reporting "not vulnerable (OK)".

```
CONNECTED(00000003)
140338777061024:error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version:s23_clnt.c:769:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 389 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1
    Cipher    : 0000
    Session-ID: 
    Session-ID-ctx: 
    Master-Key: 
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1483645971
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)
---
```
2017-01-05 14:55:08 -05:00
Todd Swatling
557c15607a detects install dir when symlinked and realpath not present
$ ls -l /usr/local/bin/testssl
lrwxrwxrwx /usr/local/bin/testssl -> /home/user/testssl.sh/testssl.sh
2017-01-05 14:45:39 -05:00
Todd Swatling
70e6e289e1 removed trailing spaces 2017-01-05 14:20:19 -05:00
David Cooper
d66e5ec0d7 sslv2_sockets() bug fixes
This PR fixes a few bugs in `sslv2_sockets()`. The main issue is that a server may not send the entire ServerHello in a single packet. If it doesn't and the full response is being parsed (i.e., certificate and list of ciphers), then `parse_sslv2_serverhello()` will encounter errors, since it assumes that it has the entire ServerHello. This PR compares the length of the response to the length of the ServerHello as specified in the first two bytes of the response and requests more data from the server if the response appears incomplete.

This PR also modifies `parse_sslv2_serverhello()` to check for more errors. It compares the length of the response it has been provided to the specified length (`$v2_hello_length`) and returns an error if the response is shorter than `$v2_hello_length` and the full response is supposed to be parsed. It will also check whether there was an error in converting the certificate from DER to PEM format and will return an error if there was (and it will suppress the error message).
2017-01-04 10:47:36 -05:00
David Cooper
c1d072b7a8 Check for matching SSLv2 cipher
Some servers respond to an SSLv2 ClientHello with a list of all SSLv2 ciphers that the server supports rather than just a list of ciphers that it supports in common with the client (i.e., that appear in the ClientHello). This PR changes the sockets version of `std_cipherlists()` so that, if `sslv2_sockets()` is successful, it checks whether there are any ciphers in common between the ClientHello and the ServerHello before declaring that the server supports the specified cipher list.
2017-01-04 10:34:13 -05:00
David Cooper
5270747eb0 Check for matching SSLv2 cipher
Some servers respond to an SSLv2 ClientHello with a list of all SSLv2 ciphers that the server supports rather than just a list of ciphers that it supports in common with the client (i.e., that appear in the ClientHello). This PR changes the sockets version of `run_freak()` so that, if `sslv2_sockets()` is successful, it checks whether there are any ciphers in common between the ClientHello and the ServerHello before declaring that the server supports an export RSA cipher.
2017-01-04 10:31:13 -05:00
David Cooper
ad5590a444 run_server_defaults() bugfix
If `determine_tls_extensions()` does not create a temporary file (`$TEMPDIR/$NODEIP.determine_tls_extensions.txt`) then `run_server_defaults()` will display error messages when an attempt is made to copy this file or to search (grep) it. This may happen if `$OPTIMAL_PROTO` is `-ssl2` or if `determine_tls_extensions()` uses sockets and `parse_tls_serverhello()` encountered an error and did not create a temporary file (`$TEMPDIR/$NODEIP.parse_tls_serverhello.txt`). This PR fixes this by only trying to copy and search `$TEMPDIR/$NODEIP.determine_tls_extensions.txt` is `$OPTIMAL_PROTO` is not `-ssl2` and `determine_tls_extensions()` was successful (return value 0).
2017-01-04 10:19:11 -05:00
David Cooper
83472301bc Don't "echo" the prime to the terminal 2016-12-30 11:33:27 -05:00
David Cooper
62aee8f846 Remove leading "00" byte from prime, if present
The primes in https://svn.nmap.org/nmap/scripts/ssl-dh-params.nse do not include a leading "00" byte, so don't include it in `$dh_p`.
2016-12-30 11:32:41 -05:00
David Cooper
c0c041b1c2 Merge branch '2.9dev' into run_std_cipherlists_sockets 2016-12-29 16:59:58 -05:00
David Cooper
5e5199ddb5 Merge branch '2.9dev' into run_freak_sockets 2016-12-29 16:58:22 -05:00
David Cooper
3b54ac398e Merge branch '2.9dev' into run_ssl_poodle_sockets 2016-12-29 16:57:31 -05:00
David Cooper
99290ea1a5 Merge branch '2.9dev' into run_beast_sockets 2016-12-29 16:56:08 -05:00
David Cooper
a094acc155 Merge branch '2.9dev' into run_server_preference_sockets 2016-12-29 16:54:05 -05:00
David Cooper
7116d1bbdf Merge branch '2.9dev' into cipher_order_sockets 2016-12-29 16:52:50 -05:00
David Cooper
b7ff8a1ee3 Add extra check 2016-12-29 16:45:46 -05:00
David Cooper
e931ebf6b4 Merge branch '2.9dev' into extend_logjam_phase_1 2016-12-29 16:43:44 -05:00
Dirk Wetter
e8e60e368f Merge pull request #568 from dcooper16/test_just_one_sockets
test_just_one() sockets
2016-12-29 22:38:35 +01:00
David Cooper
ec3a644c4d Common primes test phase 1
In response to your request in #572, this PR provides a starting point for addressing #120. It adds code to `run_logjam()` to try connecting to the server using any cipher that uses an ephemeral DH key. If successful, it gets the server's ephemeral key (in OpenSSL's PEM format) and then extracts the prime from the key and places it in `$dh_p`. So, all that needs to be done at this point is to compare `$dh_p` against a set of "bad" primes. I'm not sure if I'll be able to work on that part soon, so if someone else has the time, that would be great.

I actually found the `-msg` option easy to use. I moved the code in `parse_tls_serverhello()` that extracts the DH ephemeral public key from the ServerKeyExchange message into a separate function. Then, if using OpenSSL with the `-msg` option, I extract the ServerKeyExchange message from `$TMPFILE` and call this new function to extract the key and convert it to PEM format. That way the new code in `run_logjam()` can use either `$OPENSSL` or `tls_sockets()`.
2016-12-29 16:31:42 -05:00
Dirk Wetter
5627211add Merge pull request #556 from dcooper16/run_pfs_sockets
run_pfs() speedup + sockets
2016-12-29 22:18:28 +01:00
Dirk
c3b300c5fb - cleanup ignore_no_or_lame()
- reorder get_install_dir in main() so that warnings are not displayed before --help
- tweak missing ~/etc msg
2016-12-29 22:02:07 +01:00
David Cooper
3884f30821 Merge branch '2.9dev' into run_std_cipherlists_sockets 2016-12-29 11:58:38 -05:00
David Cooper
912db2fc95 Merge branch '2.9dev' into run_freak_sockets 2016-12-29 11:57:43 -05:00
David Cooper
f0f3918b0f Merge branch '2.9dev' into run_ssl_poodle_sockets 2016-12-29 11:56:43 -05:00
David Cooper
9513ed4d99 Merge branch '2.9dev' into test_just_one_sockets 2016-12-29 11:55:52 -05:00
David Cooper
de61f0cbf3 Merge branch '2.9dev' into run_beast_sockets 2016-12-29 11:55:01 -05:00
David Cooper
2350eaa9f5 Merge branch '2.9dev' into run_server_preference_sockets 2016-12-29 11:54:00 -05:00
David Cooper
e18b5a4709 Merge branch '2.9dev' into run_pfs_sockets 2016-12-29 11:52:29 -05:00
David Cooper
802af274d9 Merge branch '2.9dev' into cipher_order_sockets 2016-12-29 11:51:15 -05:00
Dirk Wetter
b8e1ede08c Merge pull request #572 from dcooper16/run_logjam_sockets
Use sockets for run_logjam()
2016-12-29 15:38:54 +01:00
Dirk
c3671928ae fix for 83d2a63 2016-12-29 00:09:44 +01:00
Dirk
83d2a63e0f - Stronger warning if ~/etc is missing, also requires more explicit consent to continue
- fix lfs for -e -E if openssl has not DH/ECDH
- further minor output corrections
2016-12-28 23:47:35 +01:00
David Cooper
88f4c77078 Merge branch '2.9dev' into run_std_cipherlists_sockets 2016-12-28 11:27:22 -05:00
David Cooper
324a78a47d Merge branch '2.9dev' into run_logjam_sockets 2016-12-28 11:26:20 -05:00
David Cooper
6ed620d740 Merge branch '2.9dev' into run_freak_sockets 2016-12-28 11:25:26 -05:00
David Cooper
322703d39f Merge branch '2.9dev' into run_ssl_poodle_sockets 2016-12-28 11:24:44 -05:00
David Cooper
44c766b993 Merge branch '2.9dev' into test_just_one_sockets 2016-12-28 11:23:54 -05:00
David Cooper
88658f8b89 Merge branch '2.9dev' into run_beast_sockets 2016-12-28 11:23:05 -05:00
David Cooper
1b70bc5994 Merge branch '2.9dev' into run_server_preference_sockets 2016-12-28 11:22:18 -05:00
David Cooper
da217f2136 Merge branch '2.9dev' into run_pfs_sockets 2016-12-28 11:21:30 -05:00
David Cooper
ccebf47f56 Merge branch '2.9dev' into cipher_order_sockets 2016-12-28 11:19:32 -05:00
David Cooper
fd2e52c396 Minor bug fixes in run_protocols()
In a few places `run_protocols()` specifies the wrong TLS version as the "ID" when calling `fileout()`.
2016-12-27 14:14:20 -05:00
David Cooper
fddc8a012e Merge branch '2.9dev' into run_std_cipherlists_sockets 2016-12-23 14:32:08 -05:00
David Cooper
b88cc4af71 Merge branch '2.9dev' into run_logjam_sockets 2016-12-23 14:31:13 -05:00
David Cooper
2bdc63e47d Merge branch '2.9dev' into run_freak_sockets 2016-12-23 14:28:18 -05:00
David Cooper
6084968b7a Merge branch '2.9dev' into run_ssl_poodle_sockets 2016-12-23 14:27:18 -05:00
David Cooper
3050a4c1fc Merge branch '2.9dev' into test_just_one_sockets 2016-12-23 14:25:23 -05:00
David Cooper
ba2f07bc0b Merge branch '2.9dev' into run_beast_sockets 2016-12-23 14:24:14 -05:00
David Cooper
64bd786daf Merge branch '2.9dev' into run_server_preference_sockets 2016-12-23 14:22:47 -05:00
David Cooper
48f33fff5a Merge branch '2.9dev' into run_pfs_sockets 2016-12-23 14:21:23 -05:00
David Cooper
fba1793c5a Merge branch '2.9dev' into cipher_order_sockets 2016-12-23 14:20:16 -05:00
David Cooper
dc98371ed0 Use sockets for run_http2()
This PR changes `run_http2()` so that it uses `tls_sockets()` rather than failing, if `$OPENSSL` does not support the `-alpn` option. If `$OPENSSL` supports the `-alpn` option (or if `$SSL_NATIVE` is true), then this PR has no effect.
2016-12-23 11:02:31 -05:00
David Cooper
90812a2732 Use sockets for run_std_cipherlists()
This PR change `run_std_cipherlists()` to use sockets. As noted in isse #554, I have some questions about the definitions of the cipher lists, but I wrote the code so that the ciphers that are tested when using sockets are the same as those that are tested when using OpenSSL. For a few of the cipherlists, the sockets version tests a few additional ciphers; but these are ciphers that are not supported by OpenSSL, and whose definitions are consistent with the ciphers that OpenSSL includes.

As written, `std_cipherlists` will use sockets for testing by default, except in two cases:
* If the `$SSL_NATIVE` is true, then only OpenSSL is used, and if OpenSSL doesn't support any ciphers in the cipherlist, then the test is skipped.
* If `$FAST` is true (but `$SSL_NATIVE` is false), then OpenSSL is used whenever it supports at least one cipher from the cipherlist, and `tls_sockets()` (or `sslv2_sockets()`) is only used when OpenSSL doesn't support any ciphers from the cipherlist.
2016-12-22 15:46:01 -05:00
David Cooper
0d75bae195 Use sockets for run_logjam()
This PR changes `run_logjam()` to use sockets.
2016-12-21 14:55:01 -05:00
David Cooper
815e21e9b5 Use sockets for run_freak()
This PR changes `run_freak()` to use sockets.

I added two ciphers to `$exportrsa_cipher_list`: EXP1024-RC4-MD5 (0x00,0x60) and EXP1024-RC2-CBC-MD5 (0x00,0x61). So, the list is now as follows:
```
      0x00,0x62 - EXP1024-DES-CBC-SHA            TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA                SSLv3      Kx=RSA(1024)   Au=RSA     Enc=DES(56)                    Mac=SHA1     export    
      0x00,0x61 - EXP1024-RC2-CBC-MD5            TLS_RSA_EXPORT1024_WITH_RC2_56_MD5                 SSLv3      Kx=RSA(1024)   Au=RSA     Enc=RC2(56)                    Mac=MD5      export    
      0x00,0x64 - EXP1024-RC4-SHA                TLS_RSA_EXPORT1024_WITH_RC4_56_SHA                 SSLv3      Kx=RSA(1024)   Au=RSA     Enc=RC4(56)                    Mac=SHA1     export    
      0x00,0x60 - EXP1024-RC4-MD5                TLS_RSA_EXPORT1024_WITH_RC4_56_MD5                 SSLv3      Kx=RSA(1024)   Au=RSA     Enc=RC4(56)                    Mac=MD5      export    
      0x00,0x14 - EXP-EDH-RSA-DES-CBC-SHA        TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA              SSLv3      Kx=DH(512)     Au=RSA     Enc=DES(40)                    Mac=SHA1     export    
      0x00,0x08 - EXP-DES-CBC-SHA                TLS_RSA_EXPORT_WITH_DES40_CBC_SHA                  SSLv3      Kx=RSA(512)    Au=RSA     Enc=DES(40)                    Mac=SHA1     export    
      0x00,0x06 - EXP-RC2-CBC-MD5                TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5                 SSLv3      Kx=RSA(512)    Au=RSA     Enc=RC2(40)                    Mac=MD5      export    
 0x04,0x00,0x80 - EXP-RC2-CBC-MD5                SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5               SSLv2      Kx=RSA(512)    Au=RSA     Enc=RC2(40)                    Mac=MD5      export    
      0x00,0x0E - EXP-DH-RSA-DES-CBC-SHA         TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA               SSLv3      Kx=DH/RSA      Au=DH      Enc=DES(40)                    Mac=SHA1     export    
      0x00,0x03 - EXP-RC4-MD5                    TLS_RSA_EXPORT_WITH_RC4_40_MD5                     SSLv3      Kx=RSA(512)    Au=RSA     Enc=RC4(40)                    Mac=MD5      export    
 0x02,0x00,0x80 - EXP-RC4-MD5                    SSL_CK_RC4_128_EXPORT40_WITH_MD5                   SSLv2      Kx=RSA(512)    Au=RSA     Enc=RC4(40)                    Mac=MD5      export
```
2016-12-21 13:16:10 -05:00
David Cooper
f450bc66cd Use sockets for run_ssl_poodle()
This PR changes `run_ssl_poodle()` to use sockets. This PR is particularly useful when $OPENSSL is OpenSSL 1.1.0, since OpenSS 1.1.0 does not support SSLv3 by default. But, it is also useful if $OPENSSL supports some, but not all, of the CBC ciphers.

As with `run_beast()`, there is a small change to `$cbc_cipher_list`. The following two ciphers were added:
```
          0x00,0x0B - EXP-DH-DSS-DES-CBC-SHA  SSLv3 Kx=DH/DSS   Au=DH   Enc=DES(40)   Mac=SHA1 export
          0x00,0x0E - EXP-DH-RSA-DES-CBC-SHA  SSLv3 Kx=DH/RSA   Au=DH   Enc=DES(40)   Mac=SHA1 export
```
The ciphers that were removed are all SSLv2 ciphers:
```
     0x07,0x00,0xC0 - DES-CBC3-MD5            SSLv2 Kx=RSA      Au=RSA  Enc=3DES(168) Mac=MD5 
     0x06,0x00,0x40 - DES-CBC-MD5             SSLv2 Kx=RSA      Au=RSA  Enc=DES(56)   Mac=MD5 
     0x04,0x00,0x80 - EXP-RC2-CBC-MD5         SSLv2 Kx=RSA(512) Au=RSA  Enc=RC2(40)   Mac=MD5  export
     0x05,0x00,0x80 - IDEA-CBC-MD5            SSLv2 Kx=RSA      Au=RSA  Enc=IDEA(128) Mac=MD5 
     0x03,0x00,0x80 - RC2-CBC-MD5             SSLv2 Kx=RSA      Au=RSA  Enc=RC2(128)  Mac=MD5
```
(EXP-RC2-CBC-MD5 is both an SSLv2 and an SSLv3 cipher. Previously it was listed twice in `$cbc_cipher_list`, now it appears once.)
2016-12-21 10:36:09 -05:00
David Cooper
b04bb8d82a Merge branch '2.9dev' into test_just_one_sockets 2016-12-21 09:07:13 -05:00
David Cooper
09aad7489d Merge branch '2.9dev' into run_beast_sockets 2016-12-21 09:06:21 -05:00
David Cooper
a387566fb7 Merge branch '2.9dev' into run_server_preference_sockets 2016-12-21 09:05:17 -05:00
David Cooper
eaf5671b17 Merge branch '2.9dev' into run_pfs_sockets
Conflicts:
	testssl.sh
2016-12-21 09:04:11 -05:00
David Cooper
9d44bb6abd Merge branch '2.9dev' into cipher_order_sockets 2016-12-21 09:01:47 -05:00