Skip to content

Commit

Permalink
fix tls test
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Le <[email protected]>
  • Loading branch information
alexqyle committed Oct 24, 2023
1 parent 530244e commit 0c97b86
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/util/tls/test/tls_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,11 @@ func TestTLSServerWithLocalhostCertWithClientCertificateEnforcementUsingClientCA
cfg.GRPCTLSConfig.ClientAuth = "RequireAndVerifyClientCert"

// TODO: Investigate why we don't really receive the error about the
// bad certificate from the server side and just see connection
// certificate required from the server side and just see connection
// closed/reset instead
badCertErr := errorContainsString("remote error: tls: bad certificate")
// In Go 1.21, TLS 1.3 would return certificate required error instead
// of bad certificate error
certRequiredErr := errorContainsString("remote error: tls: certificate required")
newIntegrationClientServer(
t,
cfg,
Expand All @@ -358,7 +360,7 @@ func TestTLSServerWithLocalhostCertWithClientCertificateEnforcementUsingClientCA
tlsConfig: tls.ClientConfig{
InsecureSkipVerify: true,
},
httpExpectError: badCertErr,
httpExpectError: certRequiredErr,
grpcExpectError: unavailableDescErr,
},
{
Expand All @@ -367,7 +369,7 @@ func TestTLSServerWithLocalhostCertWithClientCertificateEnforcementUsingClientCA
tlsConfig: tls.ClientConfig{
CAPath: certs.caCertFile,
},
httpExpectError: badCertErr,
httpExpectError: certRequiredErr,
grpcExpectError: unavailableDescErr,
},
{
Expand Down Expand Up @@ -396,7 +398,7 @@ func TestTLSServerWithLocalhostCertWithClientCertificateEnforcementUsingClientCA
CertPath: certs.client2CertFile,
KeyPath: certs.client2KeyFile,
},
httpExpectError: badCertErr,
httpExpectError: certRequiredErr,
grpcExpectError: unavailableDescErr,
},
},
Expand Down

0 comments on commit 0c97b86

Please sign in to comment.