I had a web client using the Ziti Go SDK that was working well, but after upgrading the version to v0.16.8 started to get the below error when trying to start the server/listener:
→ “ERRO[0001] tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config”
I tracked this down to the following file ~/go/pkg/mod/github.com/openziti/sdk-golang@v0.16.8/ziti/edge/api/client.go, and was able to bypass the error by overriding the tlsConfig and setting InsecureSkipVerify or ServerName as shown below:
Transport: &http.Transport{
// TLSClientConfig: tlsCfg,
TLSClientConfig: &tls.Config{
InsecureSkipVerify: true,
},
},
Just wanted to post in case anyone having the same issue, or to see if there is a better way to circumvent this error. I couldn’t find any reference to this in the latest docs: ziti package - github.com/openziti/sdk-golang/ziti - pkg.go.dev. Now running into a subsequent auth issue that also was not there before the upgrade, but will post in a different thread. For reference, the two lines below are basically all I am doing to connect:
http.ServeTLS(listenWithZiti(“go-web-service”), nil, certFile, keyFile)
…
listener, err := ziti.NewContext().ListenWithOptions(service, &options)