Having nil RootCAs enable to use host root CA set :
(From TLS pkg)
// RootCAs defines the set of root certificate authorities
// that clients use when verifying server certificates.
// If RootCAs is nil, TLS uses the host's root CA set.
RootCAs *x509.CertPool
And leaving the AuthType nil we can use the default "NoClientCert" method:
(From TLS ClientAuthType)
// NoClientCert indicates that no client certificate should be requested
// during the handshake, and if any certificates are sent they will not
// be verified.
NoClientCert ClientAuthType = iota
And we leave the InsecureSkipVerify to FALSE based on the parameters.
if !connOption.SSLVerify {
config.InsecureSkipVerify = true
}
This prevents certificate errors when trying to connect via TLS without a wallet. Options that worked for me:
Then I used JDBC string since "connStr" was the only this I was sure was correct.
Using normal go-ora:
Using gorm:
To explain:
Basically this change the tlsConfig object from:
To
Having nil RootCAs enable to use host root CA set :
And leaving the AuthType nil we can use the default "NoClientCert" method:
And we leave the InsecureSkipVerify to FALSE based on the parameters.