-
Notifications
You must be signed in to change notification settings - Fork 48
Description
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