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

Security protocols mismatch in BrowserCore.cs #62

Closed
Mr-160R opened this issue Apr 16, 2019 · 5 comments · Fixed by #63
Closed

Security protocols mismatch in BrowserCore.cs #62

Mr-160R opened this issue Apr 16, 2019 · 5 comments · Fixed by #63

Comments

@Mr-160R
Copy link

Mr-160R commented Apr 16, 2019

There's a security protocols configuration in the BrowserCore.cs

ServicePointManager.SecurityProtocol |= SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; // Updates protocol for target framework 4.5.2

But according to the .net standard sources the SSL 3 is not allowed, please see:
https://github.com/dotnet/corefx/blob/d6173e069a9bcedfdfd7f4f41e67d23f67157b61/src/System.Net.ServicePoint/src/System/Net/ServicePointManager.cs#L39

In this case if you run a BrowseSharp browser in a .net core app you'll get a NotSupportedException exception.

@ForeverZer0
Copy link

Indeed, after some research trying to debug why I kept getting the above exception, even after manually setting ServicePointManager.SecurityProtocol, I discovered the hard-coded line mentioned here was just overriding it, making this unusable in .netcore app.

@Jayx239
Copy link
Owner

Jayx239 commented Apr 19, 2019

Thanks for pointing this out. I will remove this from the constructor. I haven't tested browsesharp with .net core, so please let me know if you find any more issues like this.

Also, did you clone the repo or are you using the nuget package?

@ForeverZer0
Copy link

ForeverZer0 commented Apr 19, 2019

I personally was using the nuget package, and was just viewing the code on github without cloning. Was hoping I could use a quick fix by making derived class of the standard browser and calling different non-public constructor, but it was not a direct decedent to accomplish easily.

Thanks for the quick reply, this library looks extremely promising, exactly what I was looking for.

@Jayx239
Copy link
Owner

Jayx239 commented Apr 20, 2019

I am packaging and deploying the updated nuget package now with that line removed. Version 0.0.8 will be available within the next hour.

@ForeverZer0
Copy link

Fantastic, thank you so much. :)

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 a pull request may close this issue.

3 participants