Skip to content

Commit

Permalink
Specify default logger in app.CopyAndConfigureTLS
Browse files Browse the repository at this point in the history
As some code begins migrating to slog, there will be no logrus
logger to provide to this function. Until the transition is
complete, allow a nil logger to be provided and use the default
logger instead.
  • Loading branch information
rosstimothy committed Oct 25, 2024
1 parent 702e7a1 commit beb5bcb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/srv/app/connections_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,9 @@ func (c *ConnectionsHandler) deleteConnAuth(conn net.Conn) {
// for Teleport application proxy servers.
func CopyAndConfigureTLS(log logrus.FieldLogger, client authclient.AccessCache, config *tls.Config) *tls.Config {
tlsConfig := config.Clone()
if log == nil {
log = logrus.StandardLogger()
}

// Require clients to present a certificate
tlsConfig.ClientAuth = tls.RequireAndVerifyClientCert
Expand Down

0 comments on commit beb5bcb

Please sign in to comment.