git » chasquid » commit 6633f07

smtpsrv: Remove obsolete call to tls.BuildNameToCertificate

author Alberto Bertogli
2021-10-08 16:43:43 UTC
committer Alberto Bertogli
2021-10-08 22:11:29 UTC
parent e1a71105c38702dcf99204c9635f433eb9cf5bff

smtpsrv: Remove obsolete call to tls.BuildNameToCertificate

tls.BuildNameToCertificate has been deprecated, and calling it is no
longer necessary since Go 1.14.

Now that our minimum supported Go version is 1.15, we can remove it.

internal/smtpsrv/server.go +0 -6

diff --git a/internal/smtpsrv/server.go b/internal/smtpsrv/server.go
index d19fa0f..422cf55 100644
--- a/internal/smtpsrv/server.go
+++ b/internal/smtpsrv/server.go
@@ -203,12 +203,6 @@ func (s *Server) ListenAndServe() {
 		log.Fatalf("At least one valid certificate is needed")
 	}
 
-	// At this point the TLS config should be done, build the
-	// name->certificate map (used by the TLS library for SNI).
-	// TODO: Once we support only Go >= 1.14, we can drop this, as it is no
-	// longer necessary.
-	s.tlsConfig.BuildNameToCertificate()
-
 	go s.periodicallyReload()
 
 	for m, addrs := range s.addrs {