-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add TLS-Support #89
New issue
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
Add TLS-Support #89
Conversation
Fixes #25
See also #79
@@ -21,15 +21,15 @@ func TestDSNParser(t *testing.T) { | |||
out string | |||
loc *time.Location | |||
}{ | |||
{"username:password@protocol(address)/dbname?param=value", "&{user:username passwd:password net:protocol addr:address dbname:dbname params:map[param:value] loc:%p}", time.UTC}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't spot the changes here. Should be ok :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config struct has 2 new fields
LGTM for me, but m server doesn't have SSL built in, so I didn't test this. If you tested it, I'm fine with it. |
Thought about it... |
@@ -254,6 +254,35 @@ func (mc *mysqlConn) writeAuthPacket() error { | |||
// Charset [1 byte] | |||
data[12] = mc.charset | |||
|
|||
// SSL Connection Request Packet | |||
// http://dev.mysql.com/doc/internals/en/connection-phase.html#packet-Protocol::SSLRequest | |||
if mc.cfg.tls != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if case is the only part that could break without being noticed by Travis. I don't think this is worth all the effort. I have 2 test systems with TLS enabled, this should be enough.
Fixes #25
Currently with Go 1.0 API in tests until Travis CI supports Go 1.1