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

Use TLS 1.2 in ASP.NET Core 3.1 #47

Open
alaa-m opened this issue Jun 1, 2020 · 1 comment
Open

Use TLS 1.2 in ASP.NET Core 3.1 #47

alaa-m opened this issue Jun 1, 2020 · 1 comment

Comments

@alaa-m
Copy link

alaa-m commented Jun 1, 2020

Hi guys,

I am using eos-sharp with Xamarin to build a wallet app for eos.io bloackchain

The problem is when I tried to connect to Blockchain node which support only TLS1.2

HttpClient couldn't connect to node and thrown SSL exception:

The SSL connection could not be established.

After doing some research I found that the solution is to add

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

before connection to Blockchain node API. But unfortunately it doesn't affect HttpClient on .Net Core

Finally I found this Solution on Stackoverflow

https://stackoverflow.com/questions/49399205/how-to-use-tls-1-2-in-asp-net-core-2-0

And the solution is to use HttpHandler with HttpClient :

var handler = new HttpClientHandler
{
SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls
};

HttpClient client = new HttpClient(handler);

My question is can I addHttoClient Handler which supports TLS12 to EosSharpHttpHandler

And make it optionally to force support tls12?

Thanks

@adolfommoyano
Copy link

adolfommoyano commented Oct 13, 2022

@alaa-m Hi, have you find any solutions? I am having trouble with http requests to the node

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

No branches or pull requests

2 participants