|
|
@@ -51,6 +51,7 @@ const (
|
|
|
|
|
|
// From go/src/crypto/tls/cipher_suites.go
|
|
|
var tlsCipherSuiteNames = map[uint16]string{
|
|
|
+ // TLS 1.2
|
|
|
0x0005: "TLS_RSA_WITH_RC4_128_SHA",
|
|
|
0x000a: "TLS_RSA_WITH_3DES_EDE_CBC_SHA",
|
|
|
0x002f: "TLS_RSA_WITH_AES_128_CBC_SHA",
|
|
|
@@ -73,6 +74,16 @@ var tlsCipherSuiteNames = map[uint16]string{
|
|
|
0xc02c: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
|
|
|
0xcca8: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
|
|
|
0xcca9: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
|
|
|
+
|
|
|
+ // TLS 1.3
|
|
|
+ 0x1301: "TLS_AES_128_GCM_SHA256",
|
|
|
+ 0x1302: "TLS_AES_256_GCM_SHA384",
|
|
|
+ 0x1303: "TLS_CHACHA20_POLY1305_SHA256",
|
|
|
+}
|
|
|
+
|
|
|
+var tlsVersionNames = map[uint16]string{
|
|
|
+ tls.VersionTLS12: "TLS1.2",
|
|
|
+ 772: "TLS1.3", // tls.VersionTLS13 constant available in Go 1.12+
|
|
|
}
|
|
|
|
|
|
// Service listens and dials all configured unconnected devices, via supported
|
|
|
@@ -281,7 +292,7 @@ next:
|
|
|
protoConn := protocol.NewConnection(remoteID, rd, wr, s.model, c.String(), deviceCfg.Compression)
|
|
|
modelConn := completeConn{c, protoConn}
|
|
|
|
|
|
- l.Infof("Established secure connection to %s at %s (%s)", remoteID, c, tlsCipherSuiteNames[c.ConnectionState().CipherSuite])
|
|
|
+ l.Infof("Established secure connection to %s at %s", remoteID, c)
|
|
|
|
|
|
s.model.AddConnection(modelConn, hello)
|
|
|
continue next
|