zeroshade commented on code in PR #355:
URL: https://github.com/apache/arrow-adbc/pull/355#discussion_r1081663877
##########
go/adbc/driver/flightsql/flightsql_adbc.go:
##########
@@ -116,22 +122,32 @@ type database struct {
func (d *database) SetOptions(cnOptions map[string]string) error {
if val, ok := cnOptions[OptionSSLInsecure]; ok && val ==
adbc.OptionValueEnabled {
- d.creds = insecure.NewCredentials()
- } else {
- // option specified path to certificate file
- if cert, ok := cnOptions[OptionSSLCertFile]; ok {
- c, err := credentials.NewClientTLSFromFile(cert, "")
- if err != nil {
- return adbc.Error{
- Msg: "invalid SSL certificate passed",
- Code: adbc.StatusInvalidArgument,
- }
+ if d.uri.Scheme != "grpc+tls" {
+ return adbc.Error{
+ Msg: "Connection is not TLS-enabled",
+ Code: adbc.StatusInvalidArgument,
+ }
+ }
+ d.creds = credentials.NewTLS(&tls.Config{InsecureSkipVerify:
true})
Review Comment:
hmm, is that how the python/c++ grpc side works? it checks if the schema
includes `tls` and uses the insecure if it's not there? Should we change the
var name `OptionSSLInsecure` to instead be `OptionSSLSkipVerify` ?
--
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]