Преглед изворни кода

Fix: Fix if condition problem at opensslConn.go L99. Changed string condition to != empty.

Draven J пре 10 година
родитељ
комит
6c1e54914f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      psiphon/opensslConn.go

+ 1 - 1
psiphon/opensslConn.go

@@ -96,7 +96,7 @@ func newOpenSSLConn(rawConn net.Conn, hostname string, config *CustomTLSConfig)
 		return nil, ContextError(err)
 		return nil, ContextError(err)
 	}
 	}
 
 
-	if config.SNIServerName {
+	if config.SNIServerName != "" {
 		// Explicitly exclude IPs:
 		// Explicitly exclude IPs:
 		// - "Literal IPv4 and IPv6 addresses are not permitted": https://tools.ietf.org/html/rfc6066#page-6.
 		// - "Literal IPv4 and IPv6 addresses are not permitted": https://tools.ietf.org/html/rfc6066#page-6.
 		// - OpenSSL does not appear to enforce this rule itself.
 		// - OpenSSL does not appear to enforce this rule itself.