Skip to content

Commit

Permalink
enable setup common name whitelist for tls checking
Browse files Browse the repository at this point in the history
Signed-off-by: Frank Yang <[email protected]>
  • Loading branch information
yyb196 committed Apr 2, 2018
1 parent 45f33ea commit 2eb6b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ type TLSConfig struct {
CA string `json:"tlscacert,omitempty"`
Cert string `json:"tlscert,omitempty"`
Key string `json:"tlskey,omitempty"`
VerifyRemote bool
ManagerWhiteList string
VerifyRemote bool `json:"tlsverify"`
ManagerWhiteList string `json:"manager-whitelist"`
}

// NewAPIClient initializes a new API client for the given host
Expand Down
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,9 @@ func getUnknownFlags(flagSet *pflag.FlagSet, fileFlags map[string]interface{}) e
var unknownFlags []string

for k := range fileFlags {
if k == "TLS" {
continue
}
f := flagSet.Lookup(k)
if f == nil {
unknownFlags = append(unknownFlags, k)
Expand Down

0 comments on commit 2eb6b2a

Please sign in to comment.