Skip to content

Commit

Permalink
Merge pull request #213 from xmidt-org/hotfix/allow-invalid-certs
Browse files Browse the repository at this point in the history
Hotfix/allow invalid certs
  • Loading branch information
johnabass authored Apr 23, 2024
2 parents 5a68ab4 + c28c6c6 commit 953e209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xhttp/xhttpserver/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func NewTlsConfig(t *Tls, extra ...PeerVerifier) (*tls.Config, error) {
}

tc.ClientCAs = caCertPool
tc.ClientAuth = tls.RequireAndVerifyClientCert
tc.ClientAuth = tls.RequestClientCert
}

tc.BuildNameToCertificate() // nolint: staticcheck
Expand Down
2 changes: 1 addition & 1 deletion xhttp/xhttpserver/tls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ func testNewTlsConfigWithClientCACertificateFile(t *testing.T, certificateFile,
assert.Equal([]string{"http/1.1"}, tc.NextProtos)
assert.NotEmpty(tc.Certificates)
assert.NotNil(tc.ClientCAs)
assert.Equal(tls.RequireAndVerifyClientCert, tc.ClientAuth)
assert.Equal(tls.RequestClientCert, tc.ClientAuth)
}

func testNewTlsConfigLoadClientCACertificateError(t *testing.T, certificateFile, keyFile string) {
Expand Down

0 comments on commit 953e209

Please sign in to comment.