From efb4b4635d0496d9775624a0ae8ff217d932ef5a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sat, 14 Oct 2023 20:26:30 +0100 Subject: [PATCH] Don't send a TLS ALPN name --- src/core/tls.go | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/src/core/tls.go b/src/core/tls.go index 3538334..8a17b40 100644 --- a/src/core/tls.go +++ b/src/core/tls.go @@ -3,7 +3,6 @@ package core import ( "crypto/tls" "crypto/x509" - "fmt" ) func (c *Core) generateTLSConfig(cert *tls.Certificate) (*tls.Config, error) { @@ -17,32 +16,14 @@ func (c *Core) generateTLSConfig(cert *tls.Certificate) (*tls.Config, error) { VerifyConnection: c.verifyTLSConnection, InsecureSkipVerify: true, MinVersion: tls.VersionTLS13, - NextProtos: []string{ - fmt.Sprintf("yggdrasil/%d.%d", ProtocolVersionMajor, ProtocolVersionMinor), - }, } return config, nil } -func (c *Core) verifyTLSCertificate(rawCerts [][]byte, _ [][]*x509.Certificate) error { - if len(rawCerts) != 1 { - return fmt.Errorf("expected one certificate") - } - - /* - opts := x509.VerifyOptions{} - cert, err := x509.ParseCertificate(rawCerts[0]) - if err != nil { - return fmt.Errorf("failed to parse leaf certificate: %w", err) - } - - _, err = cert.Verify(opts) - return err - */ - +func (c *Core) verifyTLSCertificate(_ [][]byte, _ [][]*x509.Certificate) error { return nil } -func (c *Core) verifyTLSConnection(cs tls.ConnectionState) error { +func (c *Core) verifyTLSConnection(_ tls.ConnectionState) error { return nil }