Просмотр исходного кода

Remove obsolete verifyLegacyCertificate case

Rod Hynes 5 лет назад
Родитель
Сommit
3e9804b6ca
2 измененных файлов с 3 добавлено и 8 удалено
  1. 0 1
      psiphon/feedback.go
  2. 3 7
      psiphon/net.go

+ 0 - 1
psiphon/feedback.go

@@ -163,7 +163,6 @@ func SendFeedback(ctx context.Context, config *Config, diagnostics, uploadPath s
 			feedbackUploadCtx,
 			config,
 			untunneledDialConfig,
-			nil,
 			uploadURL.SkipVerify)
 		if err != nil {
 			return errors.Trace(err)

+ 3 - 7
psiphon/net.go

@@ -318,25 +318,21 @@ func ResolveIP(host string, conn net.Conn) (addrs []net.IP, ttls []time.Duration
 }
 
 // MakeUntunneledHTTPClient returns a net/http.Client which is configured to
-// use custom dialing features -- including BindToDevice, etc. If
-// verifyLegacyCertificate is not nil, it's used for certificate verification.
+// use custom dialing features -- including BindToDevice, etc.
+//
 // The context is applied to underlying TCP dials. The caller is responsible
 // for applying the context to requests made with the returned http.Client.
 func MakeUntunneledHTTPClient(
 	ctx context.Context,
 	config *Config,
 	untunneledDialConfig *DialConfig,
-	verifyLegacyCertificate *x509.Certificate,
 	skipVerify bool) (*http.Client, error) {
 
 	dialer := NewTCPDialer(untunneledDialConfig)
 
-	// Note: when verifyLegacyCertificate is not nil, some
-	// of the other CustomTLSConfig is overridden.
 	tlsConfig := &CustomTLSConfig{
 		Parameters:                    config.GetParameters(),
 		Dial:                          dialer,
-		VerifyLegacyCertificate:       verifyLegacyCertificate,
 		UseDialAddrSNI:                true,
 		SNIServerName:                 "",
 		SkipVerify:                    skipVerify,
@@ -430,7 +426,7 @@ func MakeDownloadHTTPClient(
 	} else {
 
 		httpClient, err = MakeUntunneledHTTPClient(
-			ctx, config, untunneledDialConfig, nil, skipVerify)
+			ctx, config, untunneledDialConfig, skipVerify)
 		if err != nil {
 			return nil, false, errors.Trace(err)
 		}