@@ -443,13 +443,15 @@ type configJSON struct {
443443}
444444
445445type securityConfig struct {
446- CertFile string `json:"cert-file"`
447- KeyFile string `json:"key-file"`
448- ClientCertFile string `json:"client-cert-file"`
449- ClientKeyFile string `json:"client-key-file"`
450- CertAuth bool `json:"client-cert-auth"`
451- TrustedCAFile string `json:"trusted-ca-file"`
452- AutoTLS bool `json:"auto-tls"`
446+ CertFile string `json:"cert-file"`
447+ KeyFile string `json:"key-file"`
448+ ClientCertFile string `json:"client-cert-file"`
449+ ClientKeyFile string `json:"client-key-file"`
450+ CertAuth bool `json:"client-cert-auth"`
451+ TrustedCAFile string `json:"trusted-ca-file"`
452+ AutoTLS bool `json:"auto-tls"`
453+ AllowedCN string `json:"allowed-cn"`
454+ AllowedHostname string `json:"allowed-hostname"`
453455}
454456
455457// NewConfig creates a new Config populated with default values.
@@ -629,6 +631,8 @@ func (cfg *configYAML) configFromFile(path string) error {
629631 tls .ClientKeyFile = ysc .ClientKeyFile
630632 tls .ClientCertAuth = ysc .CertAuth
631633 tls .TrustedCAFile = ysc .TrustedCAFile
634+ tls .AllowedCN = ysc .AllowedCN
635+ tls .AllowedHostname = ysc .AllowedHostname
632636 }
633637 copySecurityDetails (& cfg .ClientTLSInfo , & cfg .ClientSecurityJSON )
634638 copySecurityDetails (& cfg .PeerTLSInfo , & cfg .PeerSecurityJSON )
0 commit comments