Skip to content

Commit

Permalink
fix some comments
Browse files Browse the repository at this point in the history
Signed-off-by: lhy1024 <[email protected]>
  • Loading branch information
lhy1024 committed Aug 16, 2024
1 parent 44c0b7e commit b346fa4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/tlsutil/tlsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ type TLSConfig struct {
CertPath string `toml:"cert-path" json:"cert-path"`
// KeyPath is the path of file that contains X509 key in PEM format.
KeyPath string `toml:"key-path" json:"key-path"`
// CertAllowedCNs is a CN which must be provided by a client
// CertAllowedCNs is the list of CN which must be provided by a client
CertAllowedCNs []string `toml:"cert-allowed-cn" json:"cert-allowed-cn"`

SSLCABytes []byte
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/grpcutil/grpcutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type TLSConfig struct {
CertPath string `toml:"cert-path" json:"cert-path"`
// KeyPath is the path of file that contains X509 key in PEM format.
KeyPath string `toml:"key-path" json:"key-path"`
// CertAllowedCNs is a CN which must be provided by a client
// CertAllowedCNs is the list of CN which must be provided by a client
CertAllowedCNs []string `toml:"cert-allowed-cn" json:"cert-allowed-cn"`

SSLCABytes []byte
Expand Down
1 change: 0 additions & 1 deletion server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,6 @@ func (c *Config) GenEmbedEtcdConfig() (*embed.Config, error) {
if len(c.Security.CertAllowedCNs) > 1 {
cfg.ClientTLSInfo.AllowedCNs = c.Security.CertAllowedCNs
}
fmt.Println(" c.Security.CertAllowedCNs", c.Security.CertAllowedCNs)
cfg.PeerTLSInfo.ClientCertAuth = len(c.Security.CAPath) != 0
cfg.PeerTLSInfo.TrustedCAFile = c.Security.CAPath
cfg.PeerTLSInfo.CertFile = c.Security.CertPath
Expand Down

0 comments on commit b346fa4

Please sign in to comment.