Skip to content

Commit 6149788

Browse files
committed
fix linter error
1 parent 86a397b commit 6149788

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web/tls_config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ type TLSConfig struct {
5151
MinVersion TLSVersion `yaml:"min_version"`
5252
MaxVersion TLSVersion `yaml:"max_version"`
5353
PreferServerCipherSuites bool `yaml:"prefer_server_cipher_suites"`
54-
ClientCertAllowedSanDns string `yaml:"client_cert_allowed_san_dns"`
54+
ClientCertAllowedSanDNS string `yaml:"client_cert_allowed_san_dns"`
5555
}
5656

5757
type FlagConfig struct {
@@ -76,12 +76,12 @@ func (t *TLSConfig) VerifyPeerCertificate(rawCerts [][]byte, verifiedChains [][]
7676
}
7777

7878
for _, san := range cert.DNSNames {
79-
if san == t.ClientCertAllowedSanDns {
79+
if san == t.ClientCertAllowedSanDNS {
8080
return nil
8181
}
8282
}
8383

84-
return fmt.Errorf("could not find configured SAN DNS in client cert: %s", t.ClientCertAllowedSanDns)
84+
return fmt.Errorf("could not find configured SAN DNS in client cert: %s", t.ClientCertAllowedSanDNS)
8585
}
8686

8787
type HTTPConfig struct {
@@ -181,7 +181,7 @@ func ConfigToTLSConfig(c *TLSConfig) (*tls.Config, error) {
181181
cfg.ClientCAs = clientCAPool
182182
}
183183

184-
if c.ClientCertAllowedSanDns != "" {
184+
if c.ClientCertAllowedSanDNS != "" {
185185
// verify that the client cert contains the allowed domain name
186186
cfg.VerifyPeerCertificate = c.VerifyPeerCertificate
187187
}

0 commit comments

Comments
 (0)