Skip to content

Commit

Permalink
Remove deprecation warning for Go 1.15. (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacknz authored Jan 22, 2024
1 parent be95cca commit 0d9656d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions transport/tlscommon/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,8 @@ package tlscommon
import (
"crypto/tls"
"errors"
"sync"

"github.com/elastic/elastic-agent-libs/logp/cfgwarn"
)

var warnOnce sync.Once

// Config defines the user configurable options in the yaml file.
type Config struct {
Enabled *bool `config:"enabled" yaml:"enabled,omitempty"`
Expand Down Expand Up @@ -97,10 +92,6 @@ func LoadTLSConfig(config *Config) (*TLSConfig, error) {
// Validate values the TLSConfig struct making sure certificate sure we have both a certificate and
// a key.
func (c *Config) Validate() error {
warnOnce.Do(func() {
cfgwarn.Deprecate("8.0.0", "Treating the CommonName field on X.509 certificates as a host name when no Subject Alternative Names are present is going to be removed. Please update your certificates if needed.")
})

return c.Certificate.Validate()
}

Expand Down

0 comments on commit 0d9656d

Please sign in to comment.