-
Notifications
You must be signed in to change notification settings - Fork 341
Implement SslMode=preferred #158
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
Conversation
2702824
to
98725bb
Compare
/// Do not use SSL. This is the default. | ||
/// Use SSL if the server supports it. This is the default. | ||
/// </summary> | ||
Preferred, |
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.
We should keep the same order as https://github.com/mysql/mysql-connector-net/blob/5864e6b21a8b32f5154b53d1610278abb3cb1cee/Source/MySql.Data/MysqlDefs.cs#L363 so that default(MySqlSslMode)
is the same (source compatibility). (Even though that's not the same default that the connector would actually use.)
@@ -87,8 +87,13 @@ public MySqlSession(ConnectionPool pool, int poolGeneration) | |||
if (cs.UseCompression && (initialHandshake.ProtocolCapabilities & ProtocolCapabilities.Compress) == 0) | |||
cs = cs.WithUseCompression(false); | |||
|
|||
if (cs.SslMode != MySqlSslMode.None) | |||
var serverSupporsSsl = (initialHandshake.ProtocolCapabilities & ProtocolCapabilities.Ssl) != 0; |
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.
Typo: Supports
8c96885
to
3caec34
Compare
3caec34
to
6dda8a5
Compare
I changed the order to match. I left out the I don't think that Aliases count as an integer value for enumerations, so the integer values should still match up without it. |
I ran |
Shipped in 0.11.0. |
SslMode=preferred
as default functionality for SslMode (this now matches Oracle's connector)SslMode=preferred
ssl-ca
)ssl-ca
)