Skip to content

Commit

Permalink
update: apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Samuel Gaist <samuel.gaist@idiap.ch>
Signed-off-by: Leonardo Grasso <me@leonardograsso.com>
  • Loading branch information
2 people authored and poiana committed Feb 29, 2024
1 parent 12f17c9 commit e150044
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ type Client struct {

// Config is the configuration definition for connecting to a Falco gRPC server.
type Config struct {
Hostname string
Port uint16
CertFile string
KeyFile string
CARootFile string
UnixSocketPath string
DialOptions []grpc.DialOption
InsecureSkipMutualTLSAuth bool
Hostname string
Port uint16
CertFile string
KeyFile string
CARootFile string
UnixSocketPath string
DialOptions []grpc.DialOption
InsecureSkipMutualTLSAuth bool
}

const targetFormat = "%s:%d"
Expand Down Expand Up @@ -71,7 +71,7 @@ func newNetworkClient(ctx context.Context, config *Config) (*Client, error) {
InsecureSkipVerify: config.InsecureSkipMutualTLSAuth,
}
certPool := x509.NewCertPool()
if(!config.InsecureSkipMutualTLSAuth){
if !config.InsecureSkipMutualTLSAuth {
rootCA, err := ioutil.ReadFile(config.CARootFile)
if err != nil {
return nil, fmt.Errorf("error reading the CA Root file certificate: %v", err)
Expand Down

0 comments on commit e150044

Please sign in to comment.