1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-18 14:47:03 +00:00

smtpsrv: Add comment on BuildNameToCertificate being deprecated

tls.Config.BuildNameToCertificate was deprecated in Go 1.14, and is no
longer necessary.

However, we support down to 1.11, so we will keep it for now.

This patch adds a TODO to remove it in the future once the minimum
supported version is 1.14; and adjust the CI linter accordingly.
This commit is contained in:
Alberto Bertogli
2020-05-13 23:28:09 +01:00
parent 70387207f2
commit 7fa564f822
2 changed files with 5 additions and 1 deletions

View File

@@ -53,7 +53,9 @@ lint_task:
- errcheck - errcheck
- linters: - linters:
- staticcheck - staticcheck
text: "SA1015:" # SA1015: time.Tick leaks but it's ok on endless functions.
# SA1019: BuildNameToCertificate deprecation, remove on Go >= 1.14.
text: "SA1015:|SA1019:"
exclude-use-default: true exclude-use-default: true
lint_config_file: lint_config_file:
path: /tmp/lint.yml path: /tmp/lint.yml

View File

@@ -202,6 +202,8 @@ func (s *Server) ListenAndServe() {
// At this point the TLS config should be done, build the // At this point the TLS config should be done, build the
// name->certificate map (used by the TLS library for SNI). // 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() s.tlsConfig.BuildNameToCertificate()
go s.periodicallyReload() go s.periodicallyReload()