syncthing/lib/connections
Jakob Borg f24676ba5a
lib/tlsutil: Enable TLS 1.3 when available, on test builds (fixes #5065) (#5558)
* lib/tlsutil: Enable TLS 1.3 when available, on test builds (fixes #5065)

This enables TLS 1.3 negotiation on Go 1.12 by setting the GODEBUG
variable. For now, this just gets enabled on test versions (those with a
dash in the version number).

Users wishing to enable this on production builds can set GODEBUG
manually.

The string representation of connections now includes the TLS version
and cipher suite. This becomes part of the log output on connections.
That is, when talking to an old client:

    Established secure connection .../TLS1.2-TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

and now potentially:

    Established secure connection .../TLS1.3-TLS_AES_128_GCM_SHA256

(The cipher suite was there previously in the log output, but not the
TLS version.)

I also added this info as a new Crypto() method on the connection, and
propagate this out to the API and GUI, where it can be seen in the
connection address hover (although with bad word wrapping sometimes).

* wip

* wip
2019-02-26 11:49:02 +01:00
..
config.go Remove KCP (fixes #4737) (#4741) 2018-02-09 11:40:57 +01:00
connections_test.go Remove KCP (fixes #4737) (#4741) 2018-02-09 11:40:57 +01:00
debug.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
deprecated.go Remove KCP (fixes #4737) (#4741) 2018-02-09 11:40:57 +01:00
lan_test.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
limiter.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
limiter_test.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
relay_dial.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
relay_listen.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
service.go lib/tlsutil: Enable TLS 1.3 when available, on test builds (fixes #5065) (#5558) 2019-02-26 11:49:02 +01:00
structs.go lib/tlsutil: Enable TLS 1.3 when available, on test builds (fixes #5065) (#5558) 2019-02-26 11:49:02 +01:00
tcp_dial.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
tcp_listen.go all: Hide implementations behind interfaces for mocked testing (#5548) 2019-02-26 08:09:25 +00:00
util.go lib/connections: Add KCP support (fixes #804) 2017-03-07 12:44:16 +00:00