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:
@@ -53,7 +53,9 @@ lint_task:
|
||||
- errcheck
|
||||
- linters:
|
||||
- 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
|
||||
lint_config_file:
|
||||
path: /tmp/lint.yml
|
||||
|
||||
@@ -202,6 +202,8 @@ func (s *Server) ListenAndServe() {
|
||||
|
||||
// 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()
|
||||
|
||||
Reference in New Issue
Block a user