Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete "Treating the CommonName field on X.509 certificates as a host name..." warning #178

Merged
merged 2 commits into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading