mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
chore: Update golangci lint to 2.0.x (#572)
* Update to golangci lint 2.0.x Signed-off-by: James Hillyerd <james@hillyerd.com> * Fix new lint warnings Signed-off-by: James Hillyerd <james@hillyerd.com> --------- Signed-off-by: James Hillyerd <james@hillyerd.com>
This commit is contained in:
@@ -214,7 +214,7 @@ func (s *Session) authorizationHandler(cmd string, args []string) {
|
||||
s.enterState(QUIT)
|
||||
|
||||
case "STLS":
|
||||
if !s.Server.config.TLSEnabled || s.Server.config.ForceTLS {
|
||||
if !s.config.TLSEnabled || s.config.ForceTLS {
|
||||
// Invalid command since TLS unconfigured.
|
||||
s.logger.Debug().Msgf("-ERR TLS unavailable on the server")
|
||||
s.send("-ERR TLS unavailable on the server")
|
||||
@@ -230,7 +230,7 @@ func (s *Session) authorizationHandler(cmd string, args []string) {
|
||||
|
||||
// Start TLS connection handshake.
|
||||
s.send("+OK Begin TLS Negotiation")
|
||||
tlsConn := tls.Server(s.conn, s.Server.tlsConfig)
|
||||
tlsConn := tls.Server(s.conn, s.tlsConfig)
|
||||
if err := tlsConn.Handshake(); err != nil {
|
||||
s.logger.Error().Msgf("-ERR TLS handshake failed %v", err)
|
||||
s.ooSeq(cmd)
|
||||
|
||||
Reference in New Issue
Block a user