Browse Source

Update utls

Rod Hynes 7 years ago
parent
commit
6f97f3b3e2
2 changed files with 10 additions and 4 deletions
  1. 7 1
      vendor/github.com/Psiphon-Labs/utls/handshake_client.go
  2. 3 3
      vendor/vendor.json

+ 7 - 1
vendor/github.com/Psiphon-Labs/utls/handshake_client.go

@@ -124,7 +124,13 @@ func (c *Conn) clientHandshake() error {
 	// Session resumption is not allowed if renegotiating because
 	// Session resumption is not allowed if renegotiating because
 	// renegotiation is primarily used to allow a client to send a client
 	// renegotiation is primarily used to allow a client to send a client
 	// certificate, which would be skipped if session resumption occurred.
 	// certificate, which would be skipped if session resumption occurred.
-	if sessionCache != nil && c.handshakes == 0 {
+	if sessionCache != nil && c.handshakes == 0 &&
+		// [Psiphon]
+		// Add nil guard as conn.RemoteAddr may be nil. When nil and
+		// when no ServerName for clientSessionCacheKey to use, skip
+		// caching entrely.
+		(c.conn.RemoteAddr() != nil || len(c.config.ServerName) > 0) {
+
 		// Try to resume a previously negotiated TLS session, if
 		// Try to resume a previously negotiated TLS session, if
 		// available.
 		// available.
 		cacheKey = clientSessionCacheKey(c.conn.RemoteAddr(), c.config)
 		cacheKey = clientSessionCacheKey(c.conn.RemoteAddr(), c.config)

+ 3 - 3
vendor/vendor.json

@@ -33,10 +33,10 @@
 			"revisionTime": "2017-02-28T16:03:01Z"
 			"revisionTime": "2017-02-28T16:03:01Z"
 		},
 		},
 		{
 		{
-			"checksumSHA1": "vlwXc96qUPfAMxyDMrzCX4cDYHA=",
+			"checksumSHA1": "w45xnSldeRZ4vholDnWC2UXtCmo=",
 			"path": "github.com/Psiphon-Labs/utls",
 			"path": "github.com/Psiphon-Labs/utls",
-			"revision": "6ee8d02ba07905b8b18e2d8e3446892be54f5393",
-			"revisionTime": "2018-05-16T17:21:43Z"
+			"revision": "1a44c8e029c022209b20483686b370d27782f03f",
+			"revisionTime": "2018-05-17T16:36:24Z"
 		},
 		},
 		{
 		{
 			"checksumSHA1": "zaEXXT0xMkEADcxW9GvBK0iYe1A=",
 			"checksumSHA1": "zaEXXT0xMkEADcxW9GvBK0iYe1A=",