proxy: add debug message for cert pool

This commit is contained in:
Bobby DeSimone 2019-03-24 17:12:37 -07:00
parent 45e6a8dc57
commit b93a8aa79c
No known key found for this signature in database
GPG key ID: AEE4CF12FE86D07E

View file

@ -78,12 +78,14 @@ func NewGRPCClientConn(opts *Options) (*grpc.ClientConn, error) {
if ok := cp.AppendCertsFromPEM(ca); !ok {
return nil, fmt.Errorf("failed to append CA cert to certPool")
}
log.Debug().Msg("proxy/clients: using a custom certificate authority")
} else {
newCp, err := x509.SystemCertPool()
if err != nil {
return nil, err
}
cp = newCp
log.Debug().Msg("proxy/clients: using system certificate pool")
}
log.Debug().Str("cert-override-name", opts.OverrideCertificateName).Str("addr", connAddr).Msgf("proxy/clients: grpc connection")