You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When connecting to multiple databases from the same program using TLS the current logic in parseDSNParams regarding the tlsconfig.ServerName is counterintuitive. It manipulates the global TLSConfig instance from the registry by setting the tlsconfig.ServerName property.
This results in an error like this (when trying to talk to multiple AWS Aurora databases):
x509: certificate is valid for cluster-cfcc3334-[..].eu-west-1.rds.amazonaws.com, cluster-cfcc3334-[..].eu-west-1.rds.amazonaws.com, not cluster-a865301d-[..].eu-west-1.rds.amazonaws.com
The easiest fix would be to take a copy of the global TLSConfig and use this copy for the DB specific parameter (like ServerName). Like this:
Issue description
When connecting to multiple databases from the same program using TLS the current logic in parseDSNParams regarding the tlsconfig.ServerName is counterintuitive. It manipulates the global TLSConfig instance from the registry by setting the tlsconfig.ServerName property.
This results in an error like this (when trying to talk to multiple AWS Aurora databases):
The easiest fix would be to take a copy of the global TLSConfig and use this copy for the DB specific parameter (like ServerName). Like this:
dsn.go / starting line 509
Configuration
Driver version (or git SHA): 2e00b5c
Go version: 1.7.5
Server version: AWS Aurora 5.6.10a
The text was updated successfully, but these errors were encountered: