Browse Source

Fix: selected TLS profile not reported in notices or metrics

Rod Hynes 7 years ago
parent
commit
3a183a3052
2 changed files with 3 additions and 1 deletions
  1. 1 0
      psiphon/dialParameters.go
  2. 2 1
      psiphon/dialParameters_test.go

+ 1 - 0
psiphon/dialParameters.go

@@ -281,6 +281,7 @@ func MakeDialParameters(
 	if (!isReplay || !replayTLSProfile) &&
 		protocol.TunnelProtocolUsesMeekHTTPS(dialParams.TunnelProtocol) {
 
+		dialParams.SelectedTLSProfile = true
 		dialParams.TLSProfile = SelectTLSProfile(p)
 	}
 

+ 2 - 1
psiphon/dialParameters_test.go

@@ -141,7 +141,7 @@ func runDialParametersAndReplay(t *testing.T, tunnelProtocol string) {
 		t.Fatalf("missing port number fields")
 	}
 
-	if dialParams.SSHClientVersion == "" || dialParams.SSHKEXSeed == nil {
+	if !dialParams.SelectedSSHClientVersion || dialParams.SSHClientVersion == "" || dialParams.SSHKEXSeed == nil {
 		t.Fatalf("missing SSH fields")
 	}
 
@@ -174,6 +174,7 @@ func runDialParametersAndReplay(t *testing.T, tunnelProtocol string) {
 
 	if protocol.TunnelProtocolUsesMeekHTTPS(tunnelProtocol) &&
 		(dialParams.MeekSNIServerName == "" ||
+			!dialParams.SelectedTLSProfile ||
 			dialParams.TLSProfile == "") {
 		t.Fatalf("missing meek HTTPS fields")
 	}