Commit Graph

486 Commits

Author SHA1 Message Date
David Cooper
07a8bd3143 Support version negotiation test
The new test in PR #346 sends a TLSv1.4 ClientHello, so socksend_tls_clienthello() needs to include the signature algorithms extension if $tls_low_byte >= 3 rather than only if it is equal to 3.
2016-05-11 09:24:07 -04:00
Dirk Wetter
4eefe0df8b Merge pull request #314 from thomaspatzke/master
logfile, jsonfile and csvfile parameters work without =
2016-05-11 00:14:24 +02:00
David Cooper
92c2b60d9b Signature Algorithms extension for TLSv1.2 only
Changed to only include the signature algorithms extension for TLSv1.2, since RFC 5246 says:

   Note: this extension is not meaningful for TLS versions prior to 1.2.
   Clients MUST NOT offer it if they are offering prior versions.
   However, even if clients do offer it, the rules specified in [TLSEXT]
   require servers to ignore extensions they do not understand.

Inclusion of the extension for TLS 1.1 didn't seem to cause any harm, but it seems better to follow the RFC and not include it for TLSv1.0 or TLSv1.1.
2016-05-05 17:08:40 -04:00
David Cooper
120a5c86ef Add padding extension
RFC 7685 notes that there is at least one TLS implementation that hangs if the client sends a ClientHello with a TLSCiphertext.length between 256 and 511 bytes, and so the padding extension was defined in order to get around this bug. (OpenSSL s_client includes this extension when the -bugs option is used.) So, I changed socksend_tls_clienthello() to include the padding extension if the CLientHello would have a length between 256 and 511 bytes, making the padding extension just large enough to make the ClientHello 512 bytes.

I also fixed a typo (a missing "0x") in the check for whether any ECC ciphers are included in the Client Hello.
2016-05-03 16:48:42 -04:00
Dirk Wetter
269a9e8c60 - fix LF in JSON/CSV output
- fix EV detection
2016-04-21 18:44:57 +02:00
David Cooper
cf84d69171 Fix some typos
Note: I deleted line 207, "HAS_SSL2=false", since it was a repeat of line 203.
2016-04-21 12:04:33 -04:00
Dirk
c62177044b - FIX #336 2016-04-20 18:53:04 +02:00
David Cooper
7e506e5c5a More extensions in socksend_tls_clienthello()
This PR adds the signature algorithms, heartbeat, session ticket, and next protocol extensions to the client hello message created by socksend_tls_clienthello() for TLS 1.0 and above. It also adds the supported elliptic curves and ec points format extensions if the client hello message includes any ECC cipher suites.

I tested this version against several servers with $EXPERIMENTAL set to true and get the same results as with the current code with $EXPERIMENTAL set to false.
2016-04-13 15:39:12 -04:00
Dirk Wetter
199708f94c Merge pull request #335 from dcooper16/run_cipher_per_proto_speedup
run_cipher_per_proto speedup
2016-04-08 22:11:59 +02:00
David Cooper
bbb8af804e Fix typo in neat_list()
The last line of neat_list currently uses $HEXC as the parameter to show_rfc_style(), but it should use $hexcode. At the moment using $HEXC instead of $hexcode makes no difference, since hexcode="$1" and in all calls to neat_list() the first parameter is $HEXC. However, this bug could create problems in the future since neat_list() will misbehave if the value of the first parameter (hexcode) isn't the same as $HEXC.
2016-04-08 14:49:44 -04:00
David Cooper
bbcc869dec run_cipher_per_proto speedup
This PR makes basically the same changes to run_cipher_per_proto() as I previously made to run_allciphers(). The main difference is that in this function, round 0 consists of a single call to "$OPENSSL s_client" with "-cipher" including all of the locally supported ciphers. The reason for the difference is that in run_allciphers() its saves time to assume the server supports at least one cipher suite. In the case of run_cipher_per_proto(), however, it is likely that the server will not support some protocols at all, so its usually faster to start with a single call to "$OPENSSL s_client" that tests whether the server supports the protocol at all.
2016-03-31 09:38:20 -04:00
Dirk
16927f523f - NOT OK ==> NOT ok
- FIX #332 (--show-each w/o --wide)
- polishing PR #329
2016-03-30 23:28:31 +02:00
Dirk
bed1a602f1 - small hint for new chacha/poly ciphers 2016-03-29 21:56:31 +02:00
David Cooper
eac2df6d81 run_allciphers() speedup
The run_allciphers() function currently works by calling "$OPENSSL s_client" once for each cipher suite supported by $OPENSSL. In the case of "OpenSSL 1.0.2-chacha (1.0.2e-dev)" that means 195 calls to  "$OPENSSL s_client" even though servers tend to only support a small fraction of these cipher suites.

This PR produces the same output as the current run_allciphers() with fewer calls to "$OPENSSL s_client", which results in the function running faster (usually much faster). The basic idea behind the revised function is to test cipher suites in blocks. If $OPENSSL supports 195 cipher suites, then it group these cipher suites into 4 blocks of 64 (with the final block being smaller). It makes one call to "$OPENSSL s_client" with cipher suites 1-64, and if it fails, then it knows that none of these 64 cipher suites are supported by the server and it doesn't need to perform any more tests on these 64 cipher suites. If it succeeds, then it breaks the 64 cipher suites into 4 blocks of 16 and calls "$OPENSSL s_client" with each of those blocks. The blocks of 16 that are successful are broken into blocks of 4, and for each of the successful blocks of 4 the individual cipher suites are tested.

For testssl.sh and www.google.com the number of calls to "$OPENSSL s_client" is reduced from 195 to 88. For github.com the number of calls is reduced to 56!

I haven't made any changes to run_cipher_per_proto yet, but if this PR is accepted I can make the same changes in that function.

Thanks,

David
2016-03-25 10:00:50 -04:00
Dirk
dd30b8225e - FIX #324 (thx, @dawsonpaul 2016-03-21 23:03:42 +01:00
Dirk Wetter
b5b158d5b2 - BREACH missed a LF 2016-03-19 18:15:38 +01:00
Dirk
ab7f66533c - FIX #323
- add  MicrosoftSharePointTeamServices in header detection
2016-03-19 17:20:36 +01:00
Dirk Wetter
942359c8c1 - FIX #318
- minor code housekeeping
- increased amount of buffer read for sockets, real fix follows. #313
2016-03-12 17:08:43 +01:00
Thomas Patzke
7cc41a1a92 logfile, jsonfile and csvfile parameters work without = (as documented in help) 2016-03-08 22:25:00 +01:00
Dirk
483139f0a4 - show censy link by default 2016-03-05 21:35:30 +01:00
Dirk Wetter
28a6199109 - several code housekeepings
* SHOW_EACH_C has now the correct logic
  * pr_litemagenta ==> pr_warning
  * fileout WARN according to pr_warning then changed appropiately
  * some global vars in "" to avoid unneccessary shell expansion
  * HAS_SSL2/HAS_SSL3 now works more reliably
  * warning added in cipher order if ssl2/ssl3 is not supported by openssl
2016-03-05 21:07:49 +01:00
Dave Cottlehuber
9e77f38318 fix certificate_info() test 2016-03-03 21:47:36 +01:00
Dirk Wetter
1ead2e65bc - experimental label for DROWN 2016-03-03 20:04:20 +01:00
Dirk Wetter
6367693ccf - first check for DROWN #305 2016-03-03 19:50:44 +01:00
Dirk Wetter
752e6cdf56 - one outstanding openssl CVE issue wrt SSLv2
- first skeleton for DROWN #305
2016-03-03 11:56:25 +01:00
Thomas Martens
38477b4383 renamed pr_brown to pr_svrty_medium 2016-03-01 20:42:34 +01:00
Thomas Martens
dbfa66e6c7 renamed pr_yellow to pr_svrty_minor 2016-03-01 20:41:03 +01:00
Thomas Martens
ff9f1632e4 renamed pr_green to pr_done_best 2016-03-01 20:39:30 +01:00
Thomas Martens
2686f8cdb4 renamed pr_litegreen to pr_done_good 2016-03-01 20:36:41 +01:00
Thomas Martens
207e4e5ce4 renamed pr_red to pr_svrty_critical 2016-03-01 20:31:26 +01:00
Thomas Martens
cad924e707 renamed pr_litered to pr_svrty_high 2016-03-01 20:25:41 +01:00
John Carver
87218b6b1a Merge branch 'master' into uppercase-severity-codes 2016-02-23 10:34:32 -06:00
Dirk
20cee1e788 - fix: relative redirect led to fp (https) 2016-02-22 10:44:43 +01:00
Dirk
c70a13d014 - fix #296 (no recent regression as assumed) 2016-02-20 21:46:17 +01:00
Dirk
583584e095 - FIX #297
- FIX #243
- reformmated BEAST a bit (was screwed up in ! WIDE mode if too many ciphers
2016-02-20 14:10:04 +01:00
Dirk
71b4c03202 - fix key problem hpkp 2016-02-20 11:07:47 +01:00
John Carver
4be1539a4d lowercase ok when used with NOT in (NOT ok) 2016-02-18 11:49:47 -06:00
John Carver
291edce0c3 uppercase server sets a cipher order (OK) 2016-02-18 11:41:17 -06:00
John Carver
6858026412 uppercase INFO when outputting status_code 2016-02-18 11:15:31 -06:00
b1gb1t
2ee021d337 Correction of line 3607: new line (\n) corrupted the json format 2016-02-16 09:54:01 +01:00
Dirk Wetter
61c1669687 Merge pull request #292 from dcooper16/multiple_certificates
Detect multiple certificates cleanup
2016-02-14 00:08:52 +01:00
Sietse van der Molen
394f186000 also remove carriage returns, fix for csv 2016-02-12 12:40:31 +01:00
Sietse van der Molen
b2e4df60ca fix json output
use double quotes instead of single quotes
delete newlines from strings
2016-02-12 11:05:36 +01:00
David Cooper
02239be295 Detect multiple certificates cleanup
This corrects the indentation within determine_trust() when there are multiple certificates and the output for "Chain of trust (experim.)" takes up more than one lines.

In addition, it fixes the ID field of the JSON output for entries related to the certificate. At the moment, each ID string begins with a blank space. This changes it to remove the space if there is one certificate and to add "Server Certificate #X" at the beginning of each ID if there is more than one certificate.

Perhaps there's a better way than just using, for example, "Server Certificate #1 key_size" as a way to distinguish multiple "key_size" entries in the JSON file. This is just one idea, and it can certainly be changed if those who intend to use the JSON output prefer something else.
2016-02-09 13:35:46 -05:00
Dirk Wetter
70cd658447 - FIX #283 (regression from 1a8ed3d70a)
- minor output fixes for BEAST
- >4096 bit RSA keys labled in litemangenta now as it could have compatibility probs
- -V 0x.. or -V 0X.. gives at least a warning
2016-02-07 19:13:59 +01:00
Thomas Jensen
c48b27a9a9 fix typo in b93fc824 2016-02-07 03:07:30 +01:00
Dirk
b93fc82489 slightly better output for OCSP stapling 2016-02-06 22:31:32 +01:00
Dirk
a676742256 Remaining issues solved for OpenSSL 1.1.0 compliance, output corrections, CN/SNI improvements 2016-02-03 17:55:53 +01:00
Dirk
9cf3e21c3d - swapped sig_algo and server key size
- output improvements for unknown sig algos like GOST
2016-02-03 09:55:47 +01:00
Dirk
ea18d2f02c - fix: discovering the CN for the default host (without SNI)
- CN parsing of certificate improved
- CN / subject can be also cyrillic now -- supposed the terminal supports the charset
2016-02-03 00:05:57 +01:00
Dirk
dd65050ee1 - "secret" env switch shows during -e/-E the signature algorithm (see also #276)
- exp. date check corrected esp. for openssl 1.1.0
- warning relaxed for chain of trust
2016-02-01 22:06:27 +01:00
dcooper16
9f998d8c53 Number of trusted certificate files in $INSTALL_DIR/etc/*.pem
The number of .pem files in $INSTALL_DIR/etc is currently hard-coded into determine_trust. This modifies the code so that the number of files can be changed without having to change the code.
2016-02-01 14:11:50 -05:00
Dirk Wetter
f7853f36a0 - added SSL_CERT_FILE=/dev/null
- output cleanups in determine_trust()
2016-02-01 17:33:59 +01:00
dcooper16
abffd1b81e Fix chain of trust problem
This should fix issue #278. I'm not sure whether openssl verify will ever print out more than one error, so to be safe, I wrote the code to handle the possibility that it might; if there is more than one error, it just takes the first and ignores the rest.
2016-02-01 11:17:13 -05:00
Dirk Wetter
8f9b38f7d4 - LF and other corrections for HPKP
- output corrections for 2 x HPKP (e.g. scotthelme)
2016-02-01 13:23:28 +01:00
Dirk
0bfe12742e correct signature keysizes, FIX #249 2016-02-01 10:19:23 +01:00
Dirk
c62abaf215 fix colored output in wide mode (FIX #277) 2016-01-31 23:53:13 +01:00
Dirk
5ae9bb8c13 - typo in IPv4 header
- fixed recognition of XML,HTML to separate header
- fixed -V <pattern
2016-01-31 21:02:18 +01:00
Dirk
1726d3b41c minor change of color 2016-01-31 11:04:59 +01:00
Dirk
f7baa560c2 - typos, etc 2016-01-31 10:54:45 +01:00
Dirk
c564e305a7 - FIX #273 2016-01-31 01:55:23 +01:00
Dirk
fc346a35fe - indentation reverted to old value if in only one certificate
- minor cleanups in the output
2016-01-30 23:59:29 +01:00
dcooper16
2bf9c5d81e Detect multiple certificates
Modifies --server-defaults to handle cases in which the server has more than one certificate (e.g., one with an RSA key and one with an ECC key).
2016-01-28 17:06:34 -05:00
Dirk
495b9cda9b - several fixes/improvements for new JSON/CSV file feature #268
* no color code in files
  * rc4 ciphers were missing
  * NODE was missing
  * calling of NODEIP/PORT was not neccessary
  * default naming of files similar to $LOGFILE
2016-01-23 23:33:17 +01:00
Dirk
8a2fe5915a - /usr/bin/printf --> printf 2016-01-23 20:33:46 +01:00
Dirk
1a8ed3d70a - JSON/CSV from #268, labeled it experimental
- fixes partly #31
- several fixes to it (backticks, single sq brackets, renaming funcs, removed lf in JSON, ...)
2016-01-23 19:18:33 +01:00
Thomas Martens
b16ab6a021 added colorblind option
if colorblind option is set swap green and blue in the output
2016-01-22 20:40:08 +01:00
Thomas Martens
8bae1bc1ed added --mapping=no-rfc
don't display the RFC ciphername in the cipher checks.
2016-01-19 21:55:06 +01:00
Dirk
b97788ba73 typo fixed 2016-01-15 17:30:47 +01:00
Dirk
5257c2f38a - inline license clarifications
(separate file needed later)
2016-01-15 17:04:16 +01:00
Dirk
a9643b6d1e - hooks for rfc/non-rfc
- FIX for beast: no CBC cipher at all is  now displayed
- minor cosmetic stuff
2016-01-15 16:37:47 +01:00
Dirk
2871aaaee3 - optical cleanups for #265
- don't do browser tests for non-HTTP services
2016-01-15 15:53:03 +01:00
Frank Breedijk
55c0b24278 Don't forget to add help message 2016-01-13 10:26:12 +01:00
Frank Breedijk
ab47f8ada9 Added client simulations based on @ivanr s list on ssllabs 2016-01-13 10:21:01 +01:00
Dirk
dc4f90ac48 missing linefeed 2015-12-29 17:07:03 +01:00
Dirk
b962ccde53 FIX #262 2015-12-29 10:05:20 +01:00
Dirk
3b17c9e321 cosmetic corrections to help 2015-12-27 14:51:18 +01:00
Dirk
914e364d1e - fix headline for non-socket support 2015-12-27 13:33:53 +01:00
Dirk
e10da3a78a - minor adjustmentents to program style 2015-12-24 23:00:23 +01:00
Dirk
5c19bf5892 - fix for web sites having leading spaces b4 html/xml content starts 2015-12-22 21:08:52 +01:00
Dirk
c3269f1927 - Fixes for #260 2015-12-22 20:31:52 +01:00
Dirk Wetter
f65fa69c3c Merge pull request #248 from lainegholson/master
Add HTTP2/ALPN support
2015-12-22 12:05:53 +01:00
Frank Breedijk
826ac43504 Redirect test that doesn't depend om JSON/CSV output 2015-12-21 20:59:40 +01:00
Laine Gholson
d2df8b8590 Fix unrelated typos 2015-12-21 10:37:23 -06:00
Laine Gholson
d0122698ed Fix ALPN when testing multiple IPs 2015-12-13 13:16:37 -06:00
Laine Gholson
d43351e2cb Undo commit f56fdd4 2015-12-13 13:13:51 -06:00
Laine Gholson
f56fdd43da Don't output reason not testing spdy when testing server prefs 2015-12-12 23:09:42 -06:00
Laine Gholson
1bd08f34bd Remove redundant newlines 2015-12-12 22:58:52 -06:00
Laine Gholson
e8b04c77d3 Consider h2 a valid NPN protocol 2015-12-12 20:07:24 -06:00
Laine Gholson
3d28f44e56 Change flag order 2015-12-12 18:41:13 -06:00
Laine Gholson
33bda6408a Add HTTP2/ALPN support 2015-12-12 18:20:57 -06:00
Dirk
bac7cde3bd - re-adjusted preference for rfc/iana mapping file 2015-12-11 13:13:22 +01:00
Dirk
867d698a16 - days left until expiration 2015-12-08 17:51:46 +01:00
Dirk
1f39ab8241 - fix timestamp in log file 2015-12-08 16:37:35 +01:00
Dirk
041b77c5ed - sanity check whether URL/URI is last arg
- typo fix while logging (fall back CVS tags weren't written
2015-12-08 13:31:52 +01:00
Dirk
2e0e7b83d5 reverse non-typo
drill comes later
2015-11-28 17:33:10 +01:00
Dirk Wetter
ad8f82f190 Merge pull request #240 from k0ste/master
Add drill support (ldns lib), fix mistype
2015-11-28 17:14:18 +01:00
Laine Gholson
7fee2fe29b Show SHA384 certificates as secure 2015-11-26 13:53:35 -06:00
Konstantin Shalygin
30d046a6a5 fix PWD mistype 2015-11-23 20:02:06 +06:00
Konstantin Shalygin
43cb1d8763 add drill support 2015-11-23 19:54:41 +06:00