We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Follow these steps:
x509.CertPool
mysql.RegisterTLSConfig("custom", &tls.Config{ RootCAs: rootCertPool })
tls=custom
Expected: The connection to server B succeeds. Actual: The connection to server B fails with error: x509: certificate is valid for A, not B
x509: certificate is valid for A, not B
See https://github.com/go-sql-driver/mysql/blob/master/dsn.go#L513 for the root cause. The registered config is mutated by the first connection (to A), and thereafter it can only be used to connect to A.
Driver version (or git SHA): 2e00b5c
Go version: 1.7.1
Server version: MySQL 5.7
Server OS: Ubuntu 15.10
The text was updated successfully, but these errors were encountered:
Cf. https://github.com/golang/go/blob/master/src/net/http/server.go#L2841
Sorry, something went wrong.
44fa292
Updated github.com/go-sql-driver/mysql to the master HEAD.
8cd7f36
Fixes bug go-sql-driver/mysql#536.
utils: don't mutate registered tls configs (go-sql-driver#600)
ef769bd
Fixes go-sql-driver#536
a6af165
No branches or pull requests
Issue description
Follow these steps:
x509.CertPool
and add a CA cert valid for two mysql servers (A and B).mysql.RegisterTLSConfig("custom", &tls.Config{ RootCAs: rootCertPool })
tls=custom
.tls=custom
.Expected: The connection to server B succeeds.
Actual: The connection to server B fails with error:
x509: certificate is valid for A, not B
See https://github.com/go-sql-driver/mysql/blob/master/dsn.go#L513 for the root cause. The registered config is mutated by the first connection (to A), and thereafter it can only be used to connect to A.
Configuration
Driver version (or git SHA): 2e00b5c
Go version: 1.7.1
Server version: MySQL 5.7
Server OS: Ubuntu 15.10
The text was updated successfully, but these errors were encountered: