We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quic-go/transport.go
Lines 176 to 184 in f633dca
Test case:
// env: // go1.21.0 // github.com/quic-go/quic-go v0.38.0 func TestQUICTLS(t *testing.T) { quicConf := &quic.Config{ HandshakeIdleTimeout: 5 * time.Second, DisablePathMTUDiscovery: true, } tlsConf := &tls.Config{ NextProtos: []string{"h3"}, } //tlsConf.ServerName = "quic.nginx.org." addr := "quic.nginx.org:443" _, err := quic.DialAddr(context.TODO(), addr, tlsConf, quicConf) if err != nil { t.Error(err) } }
The result is:
--- FAIL: TestQUICTLS (0.64s) example_test.go:30: CRYPTO_ERROR 0x12a (local): tls: failed to verify certificate: x509: certificate is valid for quic.nginx.org, not quic.nginx.org:443 FAIL exit status 1
one way to fix it:
if tlsConf.ServerName == "" { if i := strings.LastIndex(hostname, ":"); i > 0 { tlsConf.ServerName = hostname[:i] } else { tlsConf.ServerName = hostname } }
The text was updated successfully, but these errors were encountered:
I see the bug. However, the fix is not correct, it would try to break split IPv6 addresses.
Sorry, something went wrong.
@chaosmatrix Could you try out #4046 please? A review would also be appreciated :)
If this fixes your problem, we could cut a patch release today or tomorrow.
It fixes my problem, thanks.
Successfully merging a pull request may close this issue.
quic-go/transport.go
Lines 176 to 184 in f633dca
Test case:
The result is:
one way to fix it:
The text was updated successfully, but these errors were encountered: