From f24676ba5ab294d3bd250479718564eb404b93b6 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 26 Feb 2019 11:49:02 +0100 Subject: [PATCH] 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 --- gui/default/index.html | 2 +- lib/connections/service.go | 13 ++++++++++++- lib/connections/structs.go | 8 +++++++- lib/model/model.go | 3 +++ lib/model/model_test.go | 6 ++++++ lib/tlsutil/tlsutil.go | 8 +++++++- 6 files changed, 36 insertions(+), 4 deletions(-) diff --git a/gui/default/index.html b/gui/default/index.html index 308879d3d..d8253837f 100644 --- a/gui/default/index.html +++ b/gui/default/index.html @@ -709,7 +709,7 @@  Address - +