Skip to content
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 SslProtocols property to ConfigurationOptions #603

Merged
merged 5 commits into from
Apr 6, 2017

Conversation

JonCole
Copy link
Contributor

@JonCole JonCole commented Mar 21, 2017

This property allows you to configure the list of acceptable SSL/TLS Protocols for encrypted communication. Without this setting, users are required to make changes to machine wide settings, which can break other applications that are not compatible.

| syncTimeout={int} | `SyncTimeout` | `1000` | Time (ms) to allow for synchronous operations |
| tiebreaker={string} | `TieBreaker` | `__Booksleeve_TieBreak` | Key to use for selecting a server in an ambiguous master scenario |
| version={string} | `DefaultVersion` | (`3.0` in Azure, else `2.0`) | Redis version level (useful when the server does not make this available) |
| writeBuffer={int} | `WriteBuffer` | `4096` | Size of the output buffer |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line-ending issue here showing the entire table as changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you view this in a text editor, I just added more space at the end of each row so that the last set of |'s would line up since I needed more space for the one row I added. Nothing significant was changed other than those extra spaces on each row - can revert if it bothers you.


return tmp;
}
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgive the ignorance here - but why is this !CORE_CLR specific?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CORE_CLR was purely because I don't have the right tools locally to test my changes for core clr can thus couldn't even compile to see if I got everything correct. I suspect Core CLR would support the same concept but I don't have a way to validate currently.

@@ -78,6 +90,10 @@ internal static void Unknown(string key)
ConfigChannel = "configChannel", AbortOnConnectFail = "abortConnect", ResolveDns = "resolveDns",
ChannelPrefix = "channelPrefix", Proxy = "proxy", ConnectRetry = "connectRetry",
ConfigCheckSeconds = "configCheckSeconds", ResponseTimeout = "responseTimeout", DefaultDatabase = "defaultDatabase";
#if !CORE_CLR
internal const string SslProtocols = "sslProtocols";
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as comment above - what's specific to non-Core? The documentation fragmenting between the two is not an awesome distinction to have to make.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above - just didn't have a way to validate that I changed the core clr portions of the code correctly, so I left it out. Shouldn't be too hard to remove this if someone has the right build pieces locally.

@NickCraver
Copy link
Collaborator

Hmmm, I desperately need to change this over to the VS 2017 project system to make life easier on everyone. That's one reason I'm trying to go through PRs and make sure nothing broken by that move is left behind.

@JonCole
Copy link
Contributor Author

JonCole commented Mar 22, 2017

So, I think I installed the right version of the .NET Core SDK, but there doesn't seem to be an SslStream.AuthenticateAsClientAsync method/extension that takes the SslProtocols parameter, so I am not sure we can even support this on CORE_CLR. Suggestions?

@NickCraver
Copy link
Collaborator

NickCraver commented Mar 22, 2017

@JonCole it appears to be there for me, as an example:

ssl.AuthenticateAsClientAsync(host, new X509CertificateCollection(), SslProtocols.Tls11, checkCertificateRevocation: true)

...so I think we can just simplify everything here and remove a lot of #if wraps.

@JonCole
Copy link
Contributor Author

JonCole commented Mar 23, 2017

@NickCraver - Sounds good. Would you mind making that change when you merge the PR?

@JonCole
Copy link
Contributor Author

JonCole commented Mar 24, 2017

@NickCraver - I went ahead and made the change to use that signature for core clr, but was still unable to build locally, so I am hoping it works now.

@mgravell
Copy link
Collaborator

mgravell commented Apr 6, 2017

I was going to say that ssl is bad for naming since the one protocol we probably don't want is ssl, but: the code as implemented here is consistent with UseSsl etc, so if anything: I can only kick myself for being stupid a few years ago. My bad. Merging.

@mgravell mgravell closed this Apr 6, 2017
@mgravell mgravell reopened this Apr 6, 2017
@mgravell mgravell merged commit 2b9a2a5 into StackExchange:master Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants