zeroshade commented on code in PR #381:
URL: https://github.com/apache/arrow-adbc/pull/381#discussion_r1085726345
##########
go/adbc/driver/flightsql/flightsql_adbc.go:
##########
@@ -116,47 +122,81 @@ type database struct {
}
func (d *database) SetOptions(cnOptions map[string]string) error {
- if d.uri.Scheme == "grpc+tls" {
- d.creds = credentials.NewTLS(&tls.Config{})
- } else {
- d.creds = insecure.NewCredentials()
- }
+ var tlsConfig tls.Config
- if val, ok := cnOptions[OptionSSLSkipVerify]; ok && val ==
adbc.OptionValueEnabled {
- if d.uri.Scheme != "grpc+tls" {
+ mtlsCert := cnOptions[OptionMTLSCertChain]
+ mtlsKey := cnOptions[OptionMTLSPrivateKey]
Review Comment:
is an empty string a valid value for either of this? You could use the form
`mtlsCert, tlsCertOK := cnOptions[OptionMTLSCertChain]` to see if the key
existed but an empty string was provided (the second return is a boolean saying
whether the key existed in the map). Same for `mtlsKey`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]